473,396 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Code generators: Do you guys use them?

VMI
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?

Thanks.

Sep 18 '06 #1
4 1411
Hi

We built our own code generators with CodeDom for automating data access
layers for Oracle 10g/Lite based applications. This was initially to deal
with the frustration of continous schema evolutions which ended up breaking
our "hand-made" code. Anyway, it works great, we just say here's the
database, go generate us a new date data access layer. Any specialised
stuff we can't auto generate directly from the database either gets hand
coded in partial classes (with the help of autogenerated helper methods),
or, if demand is high enough, added to the code generator.

Our code looks how we want, behaves how we want, and it's as lean or fat as
we want it to be, and best of all, if we don't like how it's working, we
just change the code generator.

The initial downside is that you have to spend sometime upfront, actually it
took about 3 man days for the first version, but it's really paid off. It
took about five minutes for the code generator to build the necessary
(adapters, datatables, datarows and datasets) for our main business systems
200+ tables.

HTH

Glenn
"VMI" <my****@excite.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
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?

Thanks.

Sep 18 '06 #2
Hello VMI,

I use CodeSmith tools time to time to generate code that is used frequently.

BTW pay attention to the Web Service & Web Client Software Factories, in
your context. Not the pure codegen tool, but VSIP that mitigate your work
http://blogs.msdn.com/mpuleio/archiv...15/756796.aspx

Rather interesting tool.

VIn the next few weeks, we'll be discussing what standards will be
Vused
Vfor our web development, and one of the suggestions was to use a code
Vgenerator (in our case, the first version of LLBLGen).
VPersonally, I don't like code generators. I inherited two web
Vapplications that use LLBLGen, and they are just impossible to debug.
VIt generates so many classes and so much code that isn't actually
Vused.
VIn my case, I'm maintaining web app with 235 classes (not counting
Vthe
VLLBLGen folder) that basically just stores data. Also, you lose
Vcontrol
Vof what you write, you can't be creative, you can't discuss other
Valternatives and have programming discussion. And what are you going
Vto
Vsay when you go to a job interview?
VDoes any have any feedback (good or bad) about these code-generating
Vtools?
V>
VThanks.
V>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Sep 18 '06 #3
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#)
------------------------------------------------------------------------
Sep 19 '06 #4
"VMI" <my****@excite.comwrote in news:1158590289.546392.27580
@i42g2000cwa.googlegroups.com:
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?
LLBLGen 1.2005.2 and v2.0 is great - we use them here and it cuts down
development time significantly.

LLBLGen cuts down on the need to build mundane code - the data layer :-)

Give v2.0 a try, you'll be surprised at how well it works.
Sep 19 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Oleg Leschov | last post by:
Here is a simple idea to make generators more useful for some applications, although I won't for now name them.. anyways, advantage of current generators was not too obvious for all the people,...
23
by: Francis Avila | last post by:
Below is an implementation a 'flattening' recursive generator (take a nested iterator and remove all its nesting). Is this possibly general and useful enough to be included in itertools? (I know...
9
by: Francis Avila | last post by:
A little annoyed one day that I couldn't use the statefulness of generators as "resumable functions", I came across Hettinger's PEP 288 (http://www.python.org/peps/pep-0288.html, still listed as...
2
by: anton muhin | last post by:
Hello, everybody! Can someone give an overview of existing Python parser generators? I played with TPG and like it a lot. However, I'd like to know more about alternatives. Google shows...
0
by: Jan Decaluwe | last post by:
Hi: I am using Python to simulate hardware descriptions, using my MyHDL package. Basically, a MyHDL simulation consists of a set of cooperating generators, that communicate through Signal...
8
by: Timothy Fitz | last post by:
It seems to me that in python, generators are not truly coroutines. I do not understand why. What I see is that generators are used almost exclusively for generation of lists just-in-time. Side...
242
by: James Cameron | last post by:
Hi I'm developing a program and the client is worried about future reuse of the code. Say 5, 10, 15 years down the road. This will be a major factor in selecting the development language. Any...
2
by: Plinkerton | last post by:
Does anyone have any favorites for Code Generators for VB? It looks like there are quite a few.... http://www.codegeneration.net/generators-by-language.php?language=31
3
by: rocco.rossi | last post by:
I would really like to know more about python 2.5's new generator characteristics that make them more powerful and analogous to coroutines. Is it possible for instance to employ them in situations...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.