Code Generation

Code Generation

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


wjcomeaux posted on Wednesday, June 24, 2009

So, what's everyone using these days? We've been using the codesmith templates back from version 2.0. We've made a ton of changes to them but now the templates are getting kind of irrelevant because there are a LOT of changes made to CSLA as of 3.6. Are there some better templates out there now? I've tried the ones that Codesmith is trying to provide, but as they are beta-ish our experience was not good. In fact, the templates didn't seem to work at all...

Thanks,
Will

BrianC replied on Thursday, June 25, 2009

There several other code generators out there for CSLA (CodeBreeze, CslaFactory, Code Complete ...). I have also used Code Smith, but currently my favorite is Code Complete. They seem to be up to date with the latest versin of CSLA and their support is very good. They are also releasing a Silverlight version soon.

Regards

Brian

lukky replied on Thursday, June 25, 2009

Hi,

Not to start a code generator war, but I thought I'd give my 2 cents on this.

I would advise anyone to stick with CodeSmith. There are templates for the 3.6  branch of CSLA, so even though one has to customize them to his own taste (or not depending on your project), they work very well.

Right now the templates are from the CSLAContrib project on CodePlex, but the CodeSmith team is working on their own set of templates, which is almost ready as I write this. I invite you to follow the different threads on this forum and on the CodeSmith forum.

As for Code Complete, I would have to advise against it. And before anyone says I'm biased, I'll simply say that before buying CodeSmith I bought Code Complete, so I know what I'm talking about. The bottom line is that Code Complete is still far from being a mature product in terms of the tool itself. What I mean by that is that Visual Integration with Visual Studio is flaky, and is very unintuitive. After a few weeks of trying to customize it to our taste, we decided to switch.

As for support, both from the company and from the community, CodeSmith is a clear winner.

Now, about CslaFactory. That project has been at a stanstill for more than 6-8 months, and judging by their forum, they are not about to release anything. I would vote in favor of taking it off the Code Generation list maintained on this forum. Any serious developper would not even mention it as a possibility.

Disclaimer: I am by not involved with CodeSmith in any way other than being a very satisfied customer.

Best regards.

JoeFallon1 replied on Thursday, June 25, 2009

I am a big Codesmith fan from the very early days. It has only improved over time. I doubt I use 20% of its true power though!

Joe

wjcomeaux replied on Thursday, June 25, 2009

I was able to get the new CodeSmith templates to work yesterday. I kept getting an error about an assembly not being trusted. So after some digging I discover that my work actually stored MyDocuments on the network and not the local machine, which causes problems loading at least the CodeSmith templates.

So, after I moved the templates to my hard drive they started to work. I'm looking forward to experimenting with them today.

Will

CyclingFoodmanPA replied on Thursday, June 25, 2009

Ok, I will throw in my .02.  I used CodeSmith in the early days to gen my business objects and coded all my Windows Forms by hand.

Then, I started looking at code generators that could generate an entire solution.  I started learning ASP.NET, Wpf, and all that stuff and I went into overload.  Hey, I am a sole devleoper at my company and I am re-architecting a large enterprise application and my architecture is as follows:
Csla (of course)
SQL Server 200x w/SSRS
Silverlight
Wcf

I looked at IronSpeed and genned an application and the app. looked nice, but the code behind the scenes was really nasty.  I then checked out CodeComplete and really liked it.  I had no problem integerating it with Visual Studio and the project leader at Eurowise always responded to my questions quickly and always solved my problems so we went with CodeComplete. 

My philosophy is as follows: no code generator will generate 100% of your application because there are always complex business rules for each business and those things have to be tweaked.  If a code generator can hammer out 50% of your business classes, 50% of your UI, 50% of your Wcf code and it can do all that in a few hours of generating code, you have bought yourself a lot of time to concentrate on the business rules and have gotten a lot of the "grunt" coding out of the way.

So, I am happy with CodeSmith and now that they are working on the Silverlight front end, it will save me a boatload of work.

CyclingFoodmanPA

 

 

 

CyclingFoodmanPA replied on Friday, June 26, 2009

I noticed a typo.  I meant I am happy with CodeComplete and will stay with it as it generates a complete application.

CyclingFoodmanPA

 

tiago replied on Thursday, June 25, 2009

I use CslaGen. There are new up to date templates. It deserves a try.

Copyright (c) Marimer LLC