VMI wrote:
In the next few weeks, we'll be discussing what standards will be used
for our web development, and one of the suggestions was to use a code
generator (in our case, the first version of LLBLGen).
Personally, I don't like code generators. I inherited two web
applications that use LLBLGen, and they are just impossible to debug.
It generates so many classes and so much code that isn't actually
used. In my case, I'm maintaining web app with 235 classes (not
counting the LLBLGen folder) that basically just stores data. Also,
you lose control of what you write, you can't be creative, you can't
discuss other alternatives and have programming discussion. And what
are you going to say when you go to a job interview?
Does any have any feedback (good or bad) about these code-generating
tools?
The old llblgen tool I wrote back in 2002 doesn't use templates and
generates per table a class with a couple of routines which call a
variety of stored procs, also generated.
there's a lot of redundant code in there, and because it's not
template based, it's not that customizable. However, I disagree that
it's hard to debug, as all the code you will run into is there in code
format, so you can step into it if you want, and as it's pretty
straightforward code, it's not that hard to understand as well.
The successor of LLBLGen, LLBLGen Pro, which I wrote in 2003 and is
now in its 6th revision, was rewritten from the ground up and fixes the
shortcomings of the old one, so it uses a template based code generator
engine (controlled by tasks) and uses o/r mapping to bring down the
amount of redundant code generated and also to enhance the featureset a
lot.
Code generators are a great timesaver. There are two aspects: 1) it
saves you a lot of time designing and writing code, as that's already
generated for you and 2) as it's generated code, it's already debugged
and (hopefully ;)) error free. If you would write it yourself from
scratch you will run into all the mistakes everyone makes the first
time s/he writes a dal, and also you will introduce a lot of errors (we
all do).
So I don't think it's a disadvantage to use a generator, on the
contrary: refusing to use a code generator is IMHO stubborness and
could cause trouble in the long run if competitors will use code
generators to get ahead of you.
FB
--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website:
http://www.llblgen.com
My .NET blog:
http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------