Code Generation in Microsoft .NET

  Author:    Kathleen Dollard
  ISBN:    1590591372
  Sales Rank:    112521
  Published:    2004-01-19
  Publisher:    Apress
  # Pages:    760
  Binding:    Paperback
  Avg. Rating:    4.0 based on 10 reviews
  Used Offers:    15 from $22.70
  Amazon Price:    $50.99
  (Data above last updated:  2008-09-05 04:46:29 EST)
  
  
Sort customer reviews by:
  
Show All Reviews on Page      Hide All Reviews on Page
   
  
Code Generation in Microsoft .NET
  

Code generation has the potential to revolutionize application development. Rather than handcrafting each piece of code, enterprises will increasingly turn to code generation, based on templates and application of business logic, to automatically generate code to perform a variety of tasks. Code Generation in Microsoft .NET presents the fundamentals of code generation. Code generation is already used extensively in Visual Studio .NET every form-based application contains potentially hundreds of lines of "wizard" created code, which is modified as the developer sets various properties. Strongly typed datasets, XML schemas and web service proxies are also generated automatically by Visual Studio. This results in a huge cost savings and improvement in software reliability.

Developers need both the technical details of how to accomplish code generation in .NET as well as a coherent series of steps to follow to incorporate code generation into their development. Code Generation in Microsoft .NET teaches developers how to adopt these techniques in their own development efforts. To accomplish this, this book introduces a series of five steps that leverage code generation both within and between projects in the organization. The mechanics of code generation introduced in the book are organized around these steps, and provide the tools to leverage code generation for significant payback on the very first application where it is used.

                  Reader Reviews 1 - 11 of 11                 
  
  
Review
Date
Review
Rating(5 High)
Review
Helpful
to:
Customer Review Reviewer
Info
Permanent
Link
Reader Reviews Below Sorted by Newest First
06-05-08 2 (NA)
(Hide Review...)  Mediocre
Reviewer Permalink
Overall I'm disappointed with the book, there is nothing new here. The downloadable code is also poorly coded. If you have experience with code generation I'm not sure you'll find anything new in the book otherwise if you're just starting out with code generation then it might be a good starting point. I'll have to agree with the reviewer Mox Blu on this one.
(Review Data Last Updated: 2008-09-05 04:48:13 EST)
11-28-04 5 12\13
(Hide Review...)  Worth it's weight in gold
Reviewer Permalink
I agree with the author that "code generation" will grow as a dominant force in the IT industry over the next 5 years. When you hear stories about programming tasks being shipped overseas, its not the deep, creative thinking of type work that is shipped... no, they ship the redundant, grunt type of coding which could be described by an algorithm. When you find yourself writing code falling into a predictable pattern, then perhaps you should consider code generation.

Before I read the book, I was already convinced that code generation was a valuable thing to do, but the book helped reshape how I thought of code generation in the context of a large project, or even an IT department.

Here are the main points that resonated with me:
1) Code Generation should be thought of as a step in the overall project build process.
2) The biggest payoff will be gained by generated stored procedures and middle tier components.
3) Code generation allows the architect to decouple the system meta data from the technology. (eg. I can change my data access strategy by simply modifying my template)
4) It is possible to generate UI components.

Finally, the book goes beyond code generation. You will learn other interesting tidbits about Visual Studio .NET and the .NET framework. The appendices include good primers on XML/XSLT and her Code Generation harness. The freely downloadable harness is designed to orchestrate the CodeGen process, but you really need to the book to understand how it works and how it can be extended.
(Review Data Last Updated: 2008-06-05 19:05:42 EST)
09-14-04 4 8\16
(Hide Review...)  Specialized book that is not for everyone, but very good
Reviewer Permalink
I always respect authors and publishers who have the courage to publish highly specialized books such as this one. It will not be relevant to most of the developers doing general .NET development, for but those needing help with Code Generation this is absolutely required.

In general, when I see many classes that are nearly identical they can be designed in a much better way using normal OO constructs (base class with children if required for special cases to override). In general, if possible do not mark your classes as SEALED and mark each method as virtual. This gives other the ability to extend your work. There is nothing more frustrated then finding a class that is close to what you need and finding it is sealed to you resort to encapsulation (which many would argue is a better approach anyway and in many cases they are correct).

However when you have tedious classes that are different in fundamental ways (like a database layer) this can eliminate the drudgery of much of the effort.


In addition to a deep understanding of multi-threading this is one area the senior developer should understand and study.

Kind Regards,
Damon Wilder Carr, Chief Technologist and CEO
(Review Data Last Updated: 2007-07-05 15:24:11 EST)
08-28-04 3 37\41
(Hide Review...)  Frustrating Book..
Reviewer Permalink
This is a very frustrating book for a couple of reasons. First contrary to what the book and some of the previous reviewers have said, there is no C# support for this book.

I quote the back of the book, "In addition to the text, the tools in the book (downloadable in both VB.net and C#)..." This is untrue. While there are some code examples in C# in the download, almost everything is in VB.net. This includes the code generation harness, which to me is the whole reason to buy the book. If you don't believe me download the code before you buy the book. There is a note in the read me that says as much.

While this might be of small significance to all you VB types, I came to MS from the Java/C world and don't know VB.

The second frustrating thing about the book is that it is about how to deploy a code generator not how to write one. There is a lot of discussion about metadata extraction, how to write good handcrafted code, etc. But the only discussion about how the code generation works is way out in Appendix C: Details of the Code Generation Harness.

Now if this is supposed to be a beginning book on code generation, shouldn't it talk about the code generator and how it works in the actual book??

I wish that someone would have told me these things before I bought it. I think down the road this may be a useful book once can get my hands around the generator. It has chapters on things metadata extraction and interface generation that look very interesting. For that reason I am giving it a 3.
(Review Data Last Updated: 2007-07-05 15:24:11 EST)
08-27-04 3 34\38
(Hide Review...)  Frustrating Book..
Reviewer Permalink
This is a very frustrating book for a couple of reasons. First contrary to what the book and some of the previous reviewers have said, there is no C# support for this book.

I quote the back of the book, "In addition to the text, the tools in the book (downloadable in both VB.net and C#)..." This is untrue. While there are some code examples in C# in the download, almost everything is in VB.net. This includes the code generation harness, which to me is the whole reason to buy the book. If you don't believe me download the code before you buy the book. There is a note in the read me that says as much.

While this might be of small significance to all you VB types, I came to MS from the Java/C world and don't know VB.

The second frustrating thing about the book is that it is about how to deploy a code generator not how to write one. There is a lot of discussion about metadata extraction, how to write good handcrafted code, etc. But the only discussion about how the code generation works is way out in Appendix C: Details of the Code Generation Harness.

Now if this is supposed to be a beginning book on code generation, shouldn't it talk about the code generator and how it works in the actual book??

I wish that someone would have told me these things before I bought it. I think down the road this may be a useful book once can get my hands around the generator. It has chapters on things metadata extraction and interface generation that look very interesting. For that reason I am giving it a 3.
(Review Data Last Updated: 2006-07-07 08:54:03 EST)
07-09-04 5 4\12
(Hide Review...)  interesting
Reviewer Permalink
Much of this book is obvious - use of XSLT to to generate code files, how to consume sql metadata. But the author does a GREAT job of presenting the information in useful context. I recommend it.
(Review Data Last Updated: 2006-07-07 08:54:03 EST)
06-25-04 5 3\3
(Hide Review...)  A must-read for code generation folks
Reviewer Permalink
This is a great book. Surely not the kind of book that you can read to relax: there are always several threads to follow, and if you skip a page, then you sort of feel that you're going to miss something, maybe a little useful practical tip, or maybe a smart design approach with lots of interesting implications. So it might take a fairly long time to read it, but it's well invested. Not only if you're on .NET: most, if not all, code generation concepts can be applied to other platforms and languages. So if you are interested in code generation this book is a must-read.
(Review Data Last Updated: 2007-07-05 15:24:11 EST)
03-26-04 1 2\86
(Hide Review...)  Basilio
Reviewer Permalink
Not so good. This book definitely deservs 3 stars as max. But those promoters gave 5, then I give 1. Just to be honest.
(Review Data Last Updated: 2007-07-05 15:24:11 EST)
03-13-04 5 7\9
(Hide Review...)  Excellent book! Excellent examples and sample code.
Reviewer Permalink
Even the most complex topics are understandable. The book is targeted at programmers who have some experience in developing applications using .NET. Most of the content is not geared toward .NET beginners, but the introductions to each topic can be a good jump-start if you have previous application development experience. The book also provides a lot of advice to help determine when code generation is useful and when it is not.
Anyone implementing code generation as part of their .NET application architecture should read this book at least once to assist with planning their strategy, and then refer back top specific topics during implementation. Overall it's a good buy because the author has taken a lot of time to ensure that the content is relevant to real-world developers, and there are several real-world application examples with source code included.
(Review Data Last Updated: 2006-07-07 08:54:03 EST)
02-16-04 5 46\49
(Hide Review...)  Bold step forward in the art of code generation
Reviewer Permalink
I thank the author for this fantastic book on code generation.

Contrary to what I have read on the web this is not a hard book. It is the first truly creative book on .NET I have read.

The code, that is downloadable, includes both C# and VB code.

While this is not a book for developers learning .NET it will prove invaluable to developers who have already started getting tired of writing or adapting the same repetitive code project after project.

This book while introducing a truly unique way of using the tools in .NET is also a good read. The author's writing style is engaging and not the usual mindless .NET prose found in many books.

I have used my own `brute force' code generation since 1998 in VB6 to generate classes and forms. When I started porting my code generation to .NET I soon realised that I would have to redesign and rewrite to fully utilise ADO.NET and started looking for a new application.

After trying all the generation tools out there in the hope of finding a replacement for my own application I was disappointed to see that they all had a `philosophy' that one had to embrace to use their tools and that all the tools were inflexible from a developer's viewpoint. Even the templates only give the developer the functions in the `Black Box' without the option of extending the functionality.

This book takes a bold step forward in the art of code generation giving developers the tools to extract information from a database structure and to then generate custom stored procedures and classes from this metadata using XSLT. The book's main focus is on using XSLT templates but also discusses the use of brute force and CodeDOM for code generation. As the developer controls every aspect of the code generation and the system is extendable it is guaranteed to enhance the creativity and productiveness of developers.

The book includes an excellent appendix on XML, XPath and XSD that will get you up to speed on these technologies quickly.

In this book I have found what I could not in any of the code generation products, total control of the process and extendibility.

An ideal companion book to get is Expert One-on-One Visual basic .NET Business Objects by Rockford Lhotka. As the templates in the book are based on Mr Lhotka's CSLA framework his book will make extending and understanding the templates easier.

Amazon makes it extremely easy for buyers to compare books and to have access to all the information needed to make an informed purchase. I am always amazed by reviews from people who did not understand what the book they bought was about.

This book's title is self explanatory and easy to understand. If you do not want to learn how code generation can make your life as a developer easier and more enjoyable then do not buy this book.

(Review Data Last Updated: 2006-07-07 08:54:03 EST)
02-15-04 5 49\53
(Hide Review...)  Fine book on model driven generation for .NET
Reviewer Permalink
I don't understand the viewpoint of the first reviewer. A book isn't one star simply because the content of the book wasn't what you intended. If you expected a book on reflection I'm not sure why you thought a book on code generation was going to do it for you. Perhaps you are thinking about runtime code generation, but I'm sure that would be in the title.

Back to the book. I think it's great. The only flaw I can find is that it's almost too detailed in spots. She presents an entire framework for building SQL DDL, stored procedures, an ORM layer, and user interface with both WinForms and HTML from XML descriptions. She also provides a larger perspective on code generation in the context of the development cycle as well as avoiding the common pitfalls. The jovial tone also keeps it light.

Anyone skilled enough to understand how code generation can revolutionize their development process should be able to handle the VB, XML, and XSLT used in the book, and either apply the principles in derivative work, or use her code directly.

(Review Data Last Updated: 2006-07-07 08:54:03 EST)
  
                  Reader Reviews 1 - 11 of 11                 
  
  
  
  
  
  

Because the data used to generate this site come from outside sources, VeryWellSaid.com cannot guarantee the completeness or accuracy of the data.
Search VeryWellSaid™
Google
Web VeryWellSaid™
New subjects are added every week.
View Subjects Below by:
* Top Selling
 (click category name, left)
* Top-Rated Top Sellers
 (click 'Top Rated', right)
In the news...  
Dubai\UAE Top Rated
Influenza\Bird Flu Top Rated
Iraq Top Rated
Supreme Court Top Rated
All Books Top Rated
Arts Top Rated
Photography Top Rated
Digital Photography Top Rated
Digital Cameras Top Rated
Biography Top Rated
Business Top Rated
Management Top Rated
Marketing Top Rated
Sales Top Rated
Stocks Top Rated
Bonds Top Rated
Real Estate Top Rated
Trading Top Rated
Commodities Trading Top Rated
Time Management Top Rated
Starting A Business Top Rated
Children's Top Rated
Comics Top Rated
Computers Top Rated
PC Top Rated
Mac Top Rated
Programming Top Rated
Design Patterns Top Rated
.Net Top Rated
C# Top Rated
Vb.Net Top Rated
Asp.Net Top Rated
Java Top Rated
Python Top Rated
PHP Top Rated
Perl Top Rated
Javascript Top Rated
Ajax Top Rated
CSS Top Rated
Open Source Top Rated
SQL Top Rated
Databases Top Rated
Oracle Top Rated
MySql Top Rated
Sql Server Top Rated
IIS Top Rated
Apache Top Rated
Linux Top Rated
Windows Server Top Rated
Project Management Top Rated
HTML Top Rated
UML Top Rated
IT Certifications Top Rated
Cisco Certifications Top Rated
MCSE Top Rated
MCSD Top Rated
Cooking Top Rated
Italian Cooking Top Rated
Vegetarian Cooking Top Rated
Wine Top Rated
Engineering Top Rated
Entertainment Top Rated
Health Top Rated
Nutrition Top Rated
Dieting Top Rated
Sex Top Rated
History Top Rated
Military History Top Rated
British History Top Rated
Middle East History Top Rated
Land Battles Top Rated
Naval Warfare Top Rated
Air Warfare Top Rated
9/11 Top Rated
Terrorism Top Rated
Home Top Rated
Mortgage\Home Equity Loan Top Rated
Cars Top Rated
Car Buying Top Rated
Sports Cars Top Rated
Cat Top Rated
Humor Top Rated
Horror Top Rated
Law Top Rated
IP Law Top Rated
Legal History Top Rated
Fiction Top Rated
Oprah's Book Club Top Rated
Medicine Top Rated
Cancer Top Rated
Stroke Top Rated
Heart Disease Top Rated
Fertility Top Rated
Diabetes Top Rated
Pharmacology Top Rated
Back Problems Top Rated
Menopause Top Rated
Thyroid Top Rated
Pain Top Rated
Organic Chemistry Top Rated
Immune System Top Rated
Mystery Top Rated
Nonfiction Top Rated
Outdoors Top Rated
Running Top Rated
Radio Control Models Top Rated
Guns Top Rated
Parenting Top Rated
Divorce Top Rated
Professional Top Rated
Reference Top Rated
Religion Top Rated
Romance Top Rated
Science Top Rated
Physics Top Rated
Chemistry Top Rated
Astronomy Top Rated
Psychology Top Rated
Science Fiction Top Rated
Sports Top Rated
Teens Top Rated
Travel Top Rated
USA Top Rated
Europe Top Rated
France Top Rated
Italy Top Rated
England Top Rated
China Top Rated
All Books Arts Biography Click Here For An A-Z Index Of All 213 Best-Seller Subjects Business Children's Comics
Computers Cooking Engineering Entertainment Health History Home Horror Humor Law Fiction Medicine Mystery
Nonfiction Outdoors Parenting Professional Reference Religion Romance Science Sci-Fi Sports Teens Travel
In Association with Amazon.com

Cache miss
(not cached)