>
For Each txt As TextBox in txtt
AddHandler txt.Click, AddressOf someFunction
Next
In ms-access, you simply assign the function name as follows:
For Each txt in "some collection"
txt.Onclick = "=SomeFunctionName"
next
>
3 lines of code vs 60 lines of code. This is one of the big differences
between OOP coding and None-OOP coding.
Well, actually..it only 3 lines in ms-access also...
And, I should point out this feature/fact has nothing to do with a oo vs non
oo environment. The only
difference is that you have a syntax that lets you assign code to a event
for a control. As mentioned, in ms-access, you can assign the function name
as a expression to the on-click property..and you DO NOT have to open up
the code editor and enter code for each click event (as this example shows).
Where Access is still the super champ is in small projects because you
don't have to load up Visual Studio and all its overhead. Access is a
self contained database programming platform for desktop database
systems.
I like .Net mostly because I am very familiar with it, and it is way
easier to use than VBA once you have a handle on OOP coding.
Rich
It still takes a ton of MORE work to build things that edit and
display data. Take a look at these screens:
http://www.members.shaw.ca/AlbertKal...icles/Grid.htm
the .net is missing continues forms..and thus you have to resort to complex
coding as compared to simply drag and drop building of forms. (there is some
data repeater controls for .net..but, it takes code).
Further, there is no equivalent of sub-forms, and again that is a huge
design
advantage. For example, I can display related table data, and build a
re-useable form that I drop into ANY form that displays the related customer
data. This approach takes NO code. In the .net environment, again you have
no
equivalent. You can see some examples of sub-forms here as to what I mean:
http://www.members.shaw.ca/AlbertKal...000000005.html
And, data bound forms have huge number of events (for example, a form load
has two events - on-open, and on-load... (the first event allows the form
load to be cancelled based on information in the forms controls). And, if we
cancel, then form never displays. In .net, you only have the .load event,
and can't cancel a form load. You only ability is to pull the code out
of the form, and have the *calling* code test for cases in which the form
should not load..and that is a pain (the code that checks for a legal form
load
belongs with the form).
And, we have multiple updates events also (before update, after update),
for delete events...we have many more events (before del confirm, after del
confirm, on delete).
If you need to write a game, or need a rich interface, then .net is the way
to go. However, if you just need a line of business application, and need to
edit data...ms-access still run circles around vb.net.
And, you not mentioned the report writer...one of the best in the business.
And, if you look at the new forms designer in a2007, we have anchoring of
controls, and even the ribbon bar gives us "stacked", and "tabular"
arranging of our controls. These handy new features make the forms developer
much more productive then previous versions. And, we can use xml mark-up to
create custom ribbon bars now.
And, while we don't have a true OO environment, we can create class
objects....it not that bad....
Without question, I sure you can come up with some things in .net that are
simply better, and easier then ms-access to accomplish. The new data binding
abilities of the .net environment go a LONG way to helping developers.
However, for the majority of data management systems, ms-access is rather
impressive tool, and IMHO still top dog when it comes to productively and
rapid application design (RAD).
The .net environment is a greater development system, and allows one to
build a FAR more rich interface then ms-access. - no debate here. the
problem is that most applcaitons don't need that rich interface. (and, if
they do..then .net becomes a good choice).
And, .net really shines when you start to include web services and
connectivity. the .net environment is "the" killer development system...but,
it just depends on the type of application you are building. for example, if
you have a "team" working on large project, then the OO desing approach is
going to yeild dividends. (we have souce code contorl for ms-access...but,
really, if your project is larger then one person to deveop..then you have
to question if ms-access is the right tool).
Further, when you start involving a server into this mix..then again .net
start to shine even more. I can honestly say that I *really* did wait for 10
years to see the day when the sql server can consume CLR (assemblies) from
..net. This one of controversial features of the new sql server, but I love
the concept!!!
Without question, some projects overlap in terms of what tool to use. In
those cases, I likely use ms-access, and you use .net...because that is what
you know best....
This much comes down to the right horse for the right course..and also what
tools you know best...
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com