Albert D. Kallal
Active member
- Local time
- Today, 12:15
- Joined
- Jun 11, 2009
- Messages
- 102
I think the issue to garner interest is you have to make a really great case as to why this approach is going to benefit the typical Access developer.
So, as always, there should be a tangible benefit here, and one that developers see this, and go, gee, I want to do this!
I mean, right around the time of FoxPro, and a few more programs in the early PC days? (DOS, screen based systems).
These so called 4th GL or so called “code generators” were really common. And ONE big reason these “code” generator systems were common is that those older systems did not have the concept of a object. So, to layout a screen, they generated code. FoxPro power tools comes to mind (it was too time consuming to do all those input @ signs with a x and y coordinate system - so, power tools to the rescue was the solution (until later on, FoxPro had it's own form designers built in).
So, the idea being floated here is: "to enable control re-use".
Is that really the goal? I mean, we have a re-usable tool box of controls.
There’s not a lot of benefits to re-using a control on a form vs that of simply dragging one from the toolbox into the form.
However, what is common and a way to re-use controls and bits and parts in other systems?
Well, be it .net desktop, or even asp.net – especially web forms?
They introduced the concept of a “user” control. That is a custom control with specific behaviors that one could use over and over.
However, great, we have a re-usable “user control” – now what????
Yes, I actually mean this – now what? Or so what?
You see re-use of a built-in text box, or a custom one? Nah, no real benefit.
However, re-using a set of controls with a SPECIFIC purpose, one that you can use over and over? Ok, now we are talking!!!!
Re use of controls does not "just" occur, it will occur with a goal, and specific purpose in mind.
While I just lamented that Access does not have the concept of “user controls”?
Well, it turns out there are some really nice workarounds – and they are called sub forms.
Most don’t realize that when building Access applications and using forms + sub forms? One is actually cobbling together a set of objects – and those sub forms can have a HIGH re-use factor. It also allows complex data modeling, and often without requiring code.
A simple example?
Say throughout your application you need to display your company address in quite a few places (forms, and even reports).
So, build a form that displays the company address, and now you can drag + drop that pre-made and re-usable “object thing” into any form or report.
Hence this:
Or, say this:
In above, I dropped in the sub form 3 times!!!!
(and you not making copies of that sub form - it is a true new object instance of the original sub form).
How about we need to prompt the user for a start date, and a end date (super common goal). Well, once again, build a sub form that does this for you (and use me.Parent to pass the selected values to the parent form – even to run code in the parent form).
So, you have a form, but you want to use it for VAST different purposes (so, that trick of sending events from the sub form to the main form is the magic here).
So, now we have this:
Or this form:
Note in the above 2 date prompt forms? We are NOT even coping the sub form, but 100% re-using the subform – you can’t get better then actually “using” the ONE same form over and over.
And the big bonus points? Well, then your UI is being re-used over and over - you thus have a more consistent UI experience.
So, keep in mind the real power of say "user controls" in .net for desktop for web?
It not that you re-using "some" controls, it's that you can create a UI widget that can be used over and over with a specific purpose.
My "guess" is that since Access can do the above?
And since coming from other platforms that do, and did have user controls?
Well, until I grasped the above concept (of subforms = re-useable sets of controls), then I did miss the concpet of re-usable controls.
However, in all these years, the goal was not just I want to re-use some control, but that of cobbling together a few controls with a specific purpose was the reason here. So, the challenge here is not "just" to re-use some controls, but to re-use them with a given purpose you design for the given application (like an address, or the "many" times and places you will need a start + end date prompt).
So, I'm not really convinced that using meta-data to drive controls on a form at runtime going to yield a lot of benefits like the above examples.
However, there may well be some really great use cases in which this approach yields benefits to an Access develpoer.
The real issue?
Well, Access tools are really great, they are RAD, and for the most part it's going to be difficult to come up with a better design model and approach then what we have with Access now. Might be "some" benefits, but they will have to be noteworthy and significant to garner interest from the general Access community.....
I in no way want to throw "cold" water on some of these re-use ideas you are floating here - but the case will have to be really compelling with some really great use examples (such as I shared above) that would then generate increased interest in such concepts.
So, have I in the past done some forms in which I change the properties, and bind the data sources at runtime? Yes, I have, but such use cases are rare for the benefits, and I think for most, the above sub-form approach will suffice for a significant portion of "re-use" goals for Access developers.
R
Albert
So, as always, there should be a tangible benefit here, and one that developers see this, and go, gee, I want to do this!
I mean, right around the time of FoxPro, and a few more programs in the early PC days? (DOS, screen based systems).
These so called 4th GL or so called “code generators” were really common. And ONE big reason these “code” generator systems were common is that those older systems did not have the concept of a object. So, to layout a screen, they generated code. FoxPro power tools comes to mind (it was too time consuming to do all those input @ signs with a x and y coordinate system - so, power tools to the rescue was the solution (until later on, FoxPro had it's own form designers built in).
So, the idea being floated here is: "to enable control re-use".
Is that really the goal? I mean, we have a re-usable tool box of controls.
There’s not a lot of benefits to re-using a control on a form vs that of simply dragging one from the toolbox into the form.
However, what is common and a way to re-use controls and bits and parts in other systems?
Well, be it .net desktop, or even asp.net – especially web forms?
They introduced the concept of a “user” control. That is a custom control with specific behaviors that one could use over and over.
However, great, we have a re-usable “user control” – now what????
Yes, I actually mean this – now what? Or so what?
You see re-use of a built-in text box, or a custom one? Nah, no real benefit.
However, re-using a set of controls with a SPECIFIC purpose, one that you can use over and over? Ok, now we are talking!!!!
Re use of controls does not "just" occur, it will occur with a goal, and specific purpose in mind.
While I just lamented that Access does not have the concept of “user controls”?
Well, it turns out there are some really nice workarounds – and they are called sub forms.
Most don’t realize that when building Access applications and using forms + sub forms? One is actually cobbling together a set of objects – and those sub forms can have a HIGH re-use factor. It also allows complex data modeling, and often without requiring code.
A simple example?
Say throughout your application you need to display your company address in quite a few places (forms, and even reports).
So, build a form that displays the company address, and now you can drag + drop that pre-made and re-usable “object thing” into any form or report.
Hence this:
Or, say this:
In above, I dropped in the sub form 3 times!!!!
(and you not making copies of that sub form - it is a true new object instance of the original sub form).
How about we need to prompt the user for a start date, and a end date (super common goal). Well, once again, build a sub form that does this for you (and use me.Parent to pass the selected values to the parent form – even to run code in the parent form).
So, you have a form, but you want to use it for VAST different purposes (so, that trick of sending events from the sub form to the main form is the magic here).
So, now we have this:
Or this form:
Note in the above 2 date prompt forms? We are NOT even coping the sub form, but 100% re-using the subform – you can’t get better then actually “using” the ONE same form over and over.
And the big bonus points? Well, then your UI is being re-used over and over - you thus have a more consistent UI experience.
So, keep in mind the real power of say "user controls" in .net for desktop for web?
It not that you re-using "some" controls, it's that you can create a UI widget that can be used over and over with a specific purpose.
My "guess" is that since Access can do the above?
And since coming from other platforms that do, and did have user controls?
Well, until I grasped the above concept (of subforms = re-useable sets of controls), then I did miss the concpet of re-usable controls.
However, in all these years, the goal was not just I want to re-use some control, but that of cobbling together a few controls with a specific purpose was the reason here. So, the challenge here is not "just" to re-use some controls, but to re-use them with a given purpose you design for the given application (like an address, or the "many" times and places you will need a start + end date prompt).
So, I'm not really convinced that using meta-data to drive controls on a form at runtime going to yield a lot of benefits like the above examples.
However, there may well be some really great use cases in which this approach yields benefits to an Access develpoer.
The real issue?
Well, Access tools are really great, they are RAD, and for the most part it's going to be difficult to come up with a better design model and approach then what we have with Access now. Might be "some" benefits, but they will have to be noteworthy and significant to garner interest from the general Access community.....
I in no way want to throw "cold" water on some of these re-use ideas you are floating here - but the case will have to be really compelling with some really great use examples (such as I shared above) that would then generate increased interest in such concepts.
So, have I in the past done some forms in which I change the properties, and bind the data sources at runtime? Yes, I have, but such use cases are rare for the benefits, and I think for most, the above sub-form approach will suffice for a significant portion of "re-use" goals for Access developers.
R
Albert
Last edited: