Anybody using Kathleen Dollard's Code Generation

Anybody using Kathleen Dollard's Code Generation

Old forum URL: forums.lhotka.net/forums/t/3378.aspx


MisterB posted on Tuesday, August 14, 2007

Hi,

has anyone taken Kathleen Dollard's code that accompanied her book "Code Generation in Microsoft .Net" and used it as a basis for a live project?

B

david.wendelken replied on Friday, August 17, 2007

Not using it.  I've been doing code generation for almost 20 years and I learned a few tricks from her, though.

MisterB replied on Friday, August 17, 2007

Hi David,

I too have been developing code generation systems in one form or another for many years but never using an XML approach until recently and never generating WinForms UI. What approach do you use?

B

david.wendelken replied on Friday, August 17, 2007

I'm not using xml as a basis for code generation yet.

I use a custom csla library that understands the sql server database structure and c# code.

That, or I just use a single sql statement if it's simple enough (like for the stored procedures to insert, update, etc.)

I'm not sophisticated enough with my object modeling to need an intermediate xml layer yet, nor have I had the time to build the intermediate tools I would need.

 

ben replied on Wednesday, September 19, 2007

Hi,

 

I am using Code Generation from Kathleen Dollard since last year. I’ve tried other code generators and I think that the XML and XSLT is the best approach.

 

I am working in an application where the 90% of all code is autogenerated. I am generating also the UI.

 

The most important things (to me) from the Kathleen’s purpose is:

 

- You can generate huge amounts of metadata from your database.

- You can generate not only the classes of your application but also the stored procedures needed in your database. And if you want, you can synchronize your database with the new generated stored procedures in the same process (with the same click you used to generate them).

- You can infer the relationships between classes. This makes easier regenerate the full application in 10 minutes with just one click.

- You can regenerate almost everything any time you want. As the database is the main metadata source, when the database changes you can regenerate your metadata, your stored procedures and your application’s classes.

- As you have all your inference rules in different XSLT files you have all development process documented and you know the why of every line of code (auto generated).

- When there is a bug in your classes or stored procedures, the problem is cloned in many objects, so it is easy to detect it. Then you look for a solution, you change your XSLT files and your make one click on your mouse. In few minutes the problem is gone in all the application. This is amazing!

 

 

Benjamin Moles

MisterB replied on Wednesday, September 19, 2007

Thanks for your input Benjamin. The XML and XSLT is the best approach  I have seen and it is the only one that produces the UI (apart from RubyOnRails). I would be very interested in discussing this further with you directly so if it interests you also please email me at bwatson@doctour.com.

Philip replied on Thursday, September 27, 2007

I believe that XML and XSLT based generation is very powerful and flexible. I am the author of Code Complete a code generator based solely on XML and XSLT, and the whole idea has been inspired by the Kathleen Dollard's book.

Regards

Philip

MisterB replied on Friday, September 28, 2007

Thank you for your reply Philip. I have had a brief look at Code Complete and it looks exactly what I'm looking for, but I have just a few questions like what version of CSLA does it target? Do you intend to keep it inline with future development of the CSLA framework? If this is not the place to ask such questions can you guide me to the right place.

Regards

Brian

Philip replied on Wednesday, October 03, 2007

The current version of Code Complete supports the latest version of CSLA.NET and we update the Code Generator to support always the latest version.

To learn more about Code Complete you can visit http://www.eurowisesoft.com

Regards

Philip

Copyright (c) Marimer LLC