Questions about CSLA 2.0 and CodeSmith

Questions about CSLA 2.0 and CodeSmith

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


Scott posted on Saturday, June 03, 2006

Can someone answer a few questions for me regarding CSLA .NET 2.0 and CodeSmith? (Keep in mind I want to get 2.0 code generated.)

  1. I thought one must use CodeSmith 3.2 and not CodeSmith 2.6 to get 2.0 framework code? I think that is what the CodeSmith site says. Is this true or can CodeSmith 2.6 be used?
  2. I only see C# CodeSmith templates for CSLA .NET 2.0. Has anyone created VB.NET CodeSmith templates for CSLA .NET 2.0?

Thank you in advance for any clarification.

Scott         

Brian Criswell replied on Sunday, June 04, 2006

CodeSmith is can generate pretty much any code you want.  So you can generate .NET 2.0 code in CodeSmith 2.6 or any other version of CodeSmith.  However, if you want to use .NET 2 code in your template, you need 3.2.

ChrisD replied on Sunday, June 04, 2006

Morning,

If you take a look at my site http://www.onelittlevictory.com you'll find an article under Tips 'n' Tricks on using the CSLA Gen package that has been developed to get VB CSLA 2.0 output. Andrés has worked exceedingly hard on these templates and they are really coming along. Hopefully my article is good enough to get you startedSmile [:)]

Hope that helps

ChrisD

xal replied on Sunday, June 04, 2006

Hi!

CodeSmith just outputs text, so you can write templates that output cobol if you'd like (yeah, like you'd want that! :P).

The interesting thing about codesmith is that you can write classes that your templates can inherit from, or write classes that your templates can call to get some output and abstract that reusable logic in an assembly. Of course, codesmith 2.6 was compiled against 1.1 and so it can't open or use 2.0 assemblies, and that's probably the issue you read about, which shouldn't be such a big issue anyway....

Andrés

DansDreams replied on Monday, September 11, 2006

ChrisD:

Morning,

If you take a look at my site http://www.onelittlevictory.com you'll find an article under Tips 'n' Tricks on using the CSLA Gen package that has been developed to get VB CSLA 2.0 output. Andrés has worked exceedingly hard on these templates and they are really coming along. Hopefully my article is good enough to get you startedSmile [:)]

Hope that helps

ChrisD

What's the status of the 2.0 templates?  What about C#?

Where does one go to actually get started with CodeSmith to make CSLA 2.0 C# code?

figuerres replied on Monday, September 11, 2006

I am using the VB codesmith templates from the csla contrib -- looks like the c# ones that are part of the same download will work just fine... I may be showing them to my boss who likes C# and test them a bit soon but they look fine from a quick look.

http://www.codeplex.com/Wiki/View.aspx?ProjectName=CSLAcontrib

http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=CSLAcontrib&ReleaseId=445

skagen00 replied on Tuesday, September 12, 2006

I use the C# templates and am pretty content with them - they're very well done.

They can be found here: 

http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=CSLAcontrib

I don't think he's fully supporting the XML sourced generation but that's what I'm using. I think it allows for a more powerful generation than from stored procedures, which is another option. (there's an option or two in addition to these two).

 

 

figuerres replied on Tuesday, September 12, 2006

I am kinda thinking of writing one small app that lets me name a list of tables and which ones are "lookup tables"

have that app create empty tables for me with my "standard columns" pre-loaded.

then all I have to do is open a new diagram, fill in the details of each table and set the relations.

I think that just the "Table Starter" will save me a lot of time and typing errors Smile [:)]

then I just have to finish modifing how my version of the proc-template (from the codesmith samples)

creates the procs.

then a small bit of work on the CSLA to match and I will have a HUGE! amount of stuff automated for the way I like to work....

Lovin the way we can hookup CSLA and Codesmith to take over so much druge work, giving more time to focus on what the user needs and the busines wants. Big Smile [:D]

Copyright (c) Marimer LLC