Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do you generate code? If so, what do you use and what do you generate? [closed]

I've used MyGeneration, and I love it for generating code that uses Data Access Applicaiton Blocks from Microsoft for my Data Access Layer, and keeping my database concepts in sync with the domain I am modeling. Although, it took a steeper than expected learning curve one weekend to make it productive.

I'm wondering what others are doing related to code generation.

http://www.mygenerationsoftware.com

http://www.codesmithtools.com/

Others?

Back in 2000, or so, the company I worked for used a product from Veritas Software (I believe it was) to model components and generate code that integrated components (dlls). I didn't get a lot of experience with it, but it seems that code generation has been the "holy grail" for a long time. Is it practical? How are others using it?

Thanks!

like image 281
user16651 Avatar asked Sep 18 '08 15:09

user16651


People also ask

How do you generate a code?

A code-generation algorithm: The algorithm takes a sequence of three-address statements as input. For each three address statement of the form a:= b op c perform the various actions. These are as follows: Invoke a function getreg to find out the location L where the result of computation b op c should be stored.

What does it mean to generate a code?

Code generation is a mechanism where a compiler takes the source code as an input and converts it into machine code. This machine code is actually executed by the system.

Why do we use code generation?

Code generators are tools that write code for you. It's a super cool way to solve repetitive code problems that can't be solved by writing an abstraction. This may sound like writing code with extra steps, but we will explore all the benefits of using code generators.


2 Answers

T4 is the CodeSmith killer for Microsoft!!!!

Go check it out. Microsoft doesn't want to destroy their partners so they don't advertise it, but it is a thing to be reckoned with and ITS FREE and comes installed in Visual Studio 2008.

www.olegsych.com

codeplex.com/t4toolbox

www.t4editor.net

like image 167
SpoiledTechie.com Avatar answered Sep 22 '22 03:09

SpoiledTechie.com


I have used LLBLGen and nHibernate successfully to generate Entity and DAL layers.

like image 45
redsquare Avatar answered Sep 20 '22 03:09

redsquare