There is always a community of IT people fascinated by shiny code generators. IDE support for SOAP is just that. There is no more “architecture” built around these code generators than the CASE tools of the past.
Ahh yes the old hatred of "code generators" its a wonderful thing, Ruby on rails sucks for the same reason apparently.
The poster of the first article goes on to talk about "dynamic" programming styles and then trolls on about how "easy" it should be to do independent evolution of complex data centres... if only everyone would listen to their approach.
Genius.
Lets start with code generators suck. First off lets assume you aren't using binary to programme, because assembler gets compiled into binary so there is code generation there. Maybe you are using a language like Java which not only compiles (generates) the code, but worst of all it then actually hosts it in an environment where it does things you didn't ask it like garbage collection, memory allocation, talking to the operating system. The posters biggest complaint isn't about code generation its about static v dynamic interfaces and really its about the poster wanting to hand roll everything rather than actually just do the valuable work.
Code generation is a good thing, a very good thing. It makes tasks repeatable and enables you to automate parts of the cycle. Code generation for editable code has issues, I personally prefer the "magic" approach where you use facades and proxies to hide the generated pieces. The whole goal of IT should be to automate more and more parts of the process, and right now that goal should be focused on automating the communication between different systems.
The "code generation is bad" crowd are plain wrong, it reminds me of a question I asked at JavaOne in 2005 (IIRC), there was a Web Framework "Smackdown" with a JSF chap and a bunch of different OSS frameworks, all claiming theirs was the quickest to code in, while the JSF chap was claiming his was the quickest to deliver with tools.
My question was that given that GUI development should be WYSIWYG, therefore tools, weren't all the other frameworks pointless and shouldn't we just get behind the one that is designed to be tooled. One of the OSS boys flashed back with "you can't build serious GUI applications with tools"... a killing retort he clearly thought. My response was "I used to build Air Traffic Control GUIs using visual builders, and I'm pretty sure those would class as serious GUIs with anybody"... the OSS framework chappy then resorted to a classic five year old child argument of "sez you".
Tooling is a good idea, tooling is what everyone wants. People want to have pieces that are easy to assemble so they can get onto the value as quickly as possible.
There are four ways to get a new cupboard
- Buy it ready made (package solution)
- Buy it flat packed (assemble with simple tools)
- Build it from raw materials (planks, nails, screws) with power tools (hammers, drills, saws) (smart custom build)
- Build it from a tree (dumb custom build)
It really annoys me when people rail against generators as a principle, and yet talk of dynamic languages or using compiled languages. It just shows that they fundamentally don't understand the environment they are working in, and yet they feel this ignorance gives them the ability to hand out advice.
Technorati Tags: SOA, Service Architecture
10 comments:
I respect your appreciation of WYSIWYG tools but cannot share it.
There isn't a single WYSIWYG tool that I have used which produced "production quality" results.
The result always had to be modified and tweaked manually to perform optimaly.
The WYSIWYG tools were great for rapid development of proof of concepts but not adequate for production software.
(boo for Dreamweaver, Netbeans, Eclipse)
Out of interest, what WYSIWYG code generating tools are you using on a daily basis?
On the other hand I am using several code generation tools which I could not have been without. (yay for xdoclets, hibernate, castor, AspectJ, ANTLR)
Great SA blog, I follow it daily.
From a Java point of view. If you have things like reflection why on earth would you ever want to use code generation?
Way back in 1998 I used a tool called "VisaJ" which appears to be still going which was massively more effective at doing Swing GUIs than just coding, especially as our GUI framework used JavaBean patterns rather effectively so it linked directly in. Way back when in the ATC days it was TeleUse (IIRC) that we used to do the Motif bits. Those were WYSYWIG.
But part of the question here is not whether you can beat a tool, but whether EVERYONE can beat a tool. This is the bit that annoys me. The reason why VB is used everywhere is because of the tools, sure the stuff is low quality but it works for that purpose.
This is the point, I'd prefer most people to use a JDeveloper or Studio Creator over writing it themselves, and for screens I really don't understand why WYSIWYG isn't the norm. Desktop Publishing, Word Documents, Powerpoint are all "WYSIWYG" and surely a Web page should be at the same level.
Tools are for the majority, they work for the majority of cases. Sure a smart person can handcraft something "better" but the odds are that the person would be better off delivering some actual business value somewhere else where their talents will have a greater impact.
Anon- I'm a big fan of reflection, but no-one likes to debug other people's reflection code, and most people don't understand reflection anyway.
Tools are for the majority, just because you don't need them doesn't mean they aren't needed.
OK, well I am glad to see your a fan of reflection. Not sure how you can work with developers that don't understand reflection. As for debugging I don't think it is a problem in modern day debuggers (due to good tooling!).
I have to design systems that will be maintained by the majority and most people don't get reflection, or threading, or async. Hence they want tools.
I have to disagree on modern debuggers and reflection though, if you have a complex framework, e.g. Spring, its a nightmare doing step through debugging as it disappears off into code you don't know when it just looked like A called B. I've yet to see a debugger than could properly do "my code" v "framework" code debugging automatically.
Sorry but I can't understand how you can work on systems with developers that don't get reflection or threading for that matter. This is basic stuff, I rather not have a developer than bring in guys who don't get reflection or threading. Hiding this complexity with tools, seems for me to be putting lipstick on a pig. Eventually your going to have understand this stuff! Using a tool will save at first but when you run in to real issues you will suffer.
Now I currently work on a project that uses Spring and RMI. I use NetBeans as my IDE, the guys sitting next to me use Eclipse. Both these IDEs have very good debuggers that will follow a call through the various aspects, proxies and remote stubs. The debugger I use gives the option to specify filters so I can differentiate between "my code" and "framework code". Also if you select call stack tap on either IDE debugger mode it will show you what code has been invoked, so the problem you mention will not materialise. There is no nightmare.
VB, PHP....
There are 3 million+ Java developers out there and 95%+ will not get reflection, and 98%+ will not get threading (they will think they do, but they will be wrong).
The point is that there are certain things that can be built with tools, VB proves that. Sure you can argue they suck, but they are used which is the test of any system.
Most people won't have to understand the stuff eventually, they'll get in one of the specialists to help if that is required. How many Java developers understand how Hotspot really works? Or how the garbage collector really works? Or how predictive pipelining works in the CPU?
No one understands everything, that is why there are different types of tools. The really great architects can create solutions that enable all groups of developers to work together successfully.
I think the statement you make about quality of Java developers is something that can't be quantified. Your right many developers don't do threading or reflection, but this is more due to the frameworks that have appeared in the last few years, rather than ability.
I am fortunate in where I work, we spend time to educated our developers in these concepts rather than use code generation tools. I think this gives more pay back long term.
I am with for tooling. This proves to be invaluable for debugging, garbage collection analysis. However code generation defeats the objective of having developers write code efficiently and is IMHO very hard to debug.
Developers writing code efficiently is surely about them getting the task at hand done quickly, not about writing the most efficient code (I'm willing to bet they get paid more than a couple of clock cycles a year).
Every day you are doing code generation, the compiler for starters, and I'll bet that there are a few more generators that you use on a daily basis (what do you use for persistence?).
If a code generator writes code that needs to be debugged then its a pretty rubbish generator. The objective of a generator should be to write code that is known to work for a given task.
Its a complete myth to say you don't use code generators, you 100% do, the question is just how many and what for. Unfortunately the belief that hand-crafting everything is better than automating it has been around for ages in IT, I remember being told that C was "inefficient" in comparison with assembler and that I was just leaving it down to the compiler. My reply then was "spot on, because I've got more important things to do than optimise a for loop".
Use code generators to save yourself time, if you don't then you are wasting your own time.
Its a very nice blog for...
architects in bangalore , architects in bangalore , interior designers in Bangalore , interior designers in Bangalore , architects in bangalore , architects in bangalore , interior designers in bangalore
Post a Comment