The Artima Developer Community
Sponsored Link

.NET Buzz Forum
One important reason why your Code Generation tool does not get used

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jonathan Crossland

Posts: 630
Nickname: jonathanc
Registered: Feb, 2004

Jonathan Crossland is a software architect for Lucid Ocean Ltd
One important reason why your Code Generation tool does not get used Posted: Jan 24, 2009 5:16 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Jonathan Crossland.
Original Post: One important reason why your Code Generation tool does not get used
Feed Title: Jonathan Crossland Weblog
Feed URL: http://www.jonathancrossland.com/syndication.axd
Feed Description: Design, Frameworks, Patterns and Idioms
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Jonathan Crossland
Latest Posts From Jonathan Crossland Weblog

Advertisement
Code Generation has one tremendous problem.
We dont like the way the code looks.

and it does not change the formatting when you don't like the way it was generated or you have to fiddle with codegen settings (which every tool would be different). There are other reasons of course why codegen is not 100% accepted, like you cannot edit the generated code, else it would be overwritten by the next codegen, but this is already being addressed but partial classes in .NET, so there is still no answer for the formatting problem.

Introducing JIT Code Formatting

Just in time code formatting is the process of changing the formatting of any code to the way you want it. Imagine I send you a small project, you open it and find I have prefixed all fields with an underscore. Your development tool, understanding this as a problem, changes the variable prefix for you when you open it. It lays out the code the way you like it. and likewise, when I open it, its changes the way I like it.

Checking the source into Source Control is not a problem, as it would convert it to a consistent format for before checking in.

For example: In Visual Studio, you would have settings for how you want your formatting. The formatting can be set and pushed to all developers and each developer can have the formatting the way they need and like it.
The JIT-CodeGen engine then translates the code for your settings.

Now who wants to write this?


CodeGen in Visual Studio

The T4 templates are an example of a powerful feature in Visual Studio, incorporating code generation, however it will generate the code based on the developers ideas, conventions and standards. This is one of the problems of codegen adoption.
However T4 from Visual Studio is still very cool. Read a little intro by Rob and from Scott

Read: One important reason why your Code Generation tool does not get used

Topic: SharePoint 'PerformancePoint' Services - now BI for the masses Previous Topic   Next Topic Topic: Bist du es leid für andere nach Lösungen zu suchen?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use