Charlotte Foust
cfoust at infostatsystems.com
Tue Sep 11 10:00:14 CDT 2007
Yes, I know you don't actually modify their code, but we hand code business rules into our data entities. They can't be generated by CodeSmith because The rules differ from entity to entity, so they have to be in the abstraction layer and preserved when the class is regenerated. And I have nothing against time saving tools. I just think users need to understand exactly what that code is doing, and the best way to understand that is to write code yourself, explore the various options for doing things, and try to figure out why the tool might do it differently. I question whether the generated code is written "better", any more than a production line widget is any "better" than a hand crafted widget. It is certainly written more quickly, but my experience suggests that only means cheaper, not necessarily better. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Robert L. Stewart Sent: Tuesday, September 11, 2007 6:17 AM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Access to VB.Net Charlotte, I am teaching a special interest group, Database and GUI Design. We are using the Codesmith/netTiers combination and most of the people in the group have limited experience in .Net. What I have found is that it actually does so much that it is difficult to get your arms around all that it does do. It uses the Enterprise Library to base itself on. While it is huge, it is also extremely feature rich. All you really have to learn is to program the GUI. Do you worry about, or even know how Access saves a record? No, you call the method to do it. Dim svcName as new tblNamesService Set svcName = tblNamesService.getall() dim entName as tblNames ...code here to load the row (entity) txtFirstName = entName.FirstName (for example) ...and edit it svcName.save(entName) That is an example of the simplicity of using the combination of Codesmith and netTiers to do a data layer. Now if you want to write all the ADO code for the connection getting the data and manipulating it, be my guest. Personally I don't have the time or energy to replicate something that is actually written better than I could. Same with Clipper years ago, I used a code generator called Zachery. It wrote much tighter code than I ever did. I was on their beta team for about 3 years. And no, you don't modify their code. They give you an abstraction layer, a class that inherits the generated class, where you can make changes that do not get erased each time you regenerate it. Robert At 11:13 PM 9/10/2007, you wrote: >Date: Mon, 10 Sep 2007 14:41:10 -0700 >From: "Charlotte Foust" <cfoust at infostatsystems.com> >Subject: Re: [AccessD] Access to VB.Net >To: "Access Developers discussion and problem solving" > <accessd at databaseadvisors.com> >Message-ID: > <F55048AF7E974F429BB24597D7355EEA4BA9F9 at INFOSERVER04.infostat.local> >Content-Type: text/plain; charset="us-ascii" > >Robert, > >I have to say that tools like Codesmith are very useful, but they're >more useful if you understand what they're writing. They can also be >very stupid (same like computers, natch) so you need to be able to >modify the code intelligently, since one size rarely fits all, >regardless of what the code writer thinks. LOL > >Charlotte Foust -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com