Code Smith opinions
-
I looked at CodeSmith once and thought it was able to produce a lot of code quickly, but the code was mediocre quality at best. An off-shore team is proposing to use it for a project. My opinion is they are using it to mask skills and pretend to deliver high quality work. Anyone else have an opinion? Have you used it?
I know the language. I've read a book. - _Madmatt
CodeSmith is only as good as the templates you are using, and the discipline behind the production of the data model. It's useful for churning out a data layer, and some lower levels of business layer (e.g. length checks and the like), but it is no substitute for good coding skills once you start to move up the layers. I like CodeSmith, but I wouldn't trust the future of my business to it alone.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
I looked at CodeSmith once and thought it was able to produce a lot of code quickly, but the code was mediocre quality at best. An off-shore team is proposing to use it for a project. My opinion is they are using it to mask skills and pretend to deliver high quality work. Anyone else have an opinion? Have you used it?
I know the language. I've read a book. - _Madmatt
Mark Nischalke wrote:
code was mediocre quality at best
Codesmith is a tool which generates code from templates. Your code is as good as your template. If the template is of a good quality than your code will be of good quality and vice versa. Here is my take on it for using on an off shored project: it may be a great idea. In general, in an LOB application, most screens/workflows/processes match a common pattern. The advantage is that you translate that pattern into some good templates. The off shore team can just use those templates to generate the routine code.
-
I looked at CodeSmith once and thought it was able to produce a lot of code quickly, but the code was mediocre quality at best. An off-shore team is proposing to use it for a project. My opinion is they are using it to mask skills and pretend to deliver high quality work. Anyone else have an opinion? Have you used it?
I know the language. I've read a book. - _Madmatt
Mark, My company purchased Code Smith version 4 and 5. CS 4 was mostly stable, but CS 5 flat out broke on the upgrade and would do nothing but throw ADO .NET exceptions, making it completely unusable. There were several patches released, and having uninstalled and reinstall several times with no success, I stopped using the product. "Out of the box" the product itself does little for you, as others have stated, you have to vest heavily in your templates. When I did use it, it was handy for generation of NHibernate mappings, DTOs and base CSLA objects, but our business layer has been done for some time now, and so I have little to no use for that product and do not miss it. BTW - there are free opensource code generation tools available, today, that can generate everything I just mentioned. Visit SourceForge.net to find them.
:..::. Douglas H. Troy ::..
Bad Astronomy |VCF|wxWidgets|WTL -
I looked at CodeSmith once and thought it was able to produce a lot of code quickly, but the code was mediocre quality at best. An off-shore team is proposing to use it for a project. My opinion is they are using it to mask skills and pretend to deliver high quality work. Anyone else have an opinion? Have you used it?
I know the language. I've read a book. - _Madmatt
An offshore team suggesting to use a template-based code generator is a recipe for disaster. Millions of lines of (let me guess, VB) code where every 100 lines looks pretty much like the next 100, and nobody knows how to customize it, or frankly, even what it does. Marc
I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner
-
Well said although (when not using Linq2Sql) I use a tool wot I wrote to generate standard classes from a database as it is tedious to do so by hand.
We do to, just select the tables and columns and bob's your uncle. Sure beats editing a bunch of boiler plate code and sprocs. Of course the bases classes and generator had to be hand cranked. Not to mention a boat load of ancillary classes to make it useful, but that stuff is fun.
10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011
-
An offshore team suggesting to use a template-based code generator is a recipe for disaster. Millions of lines of (let me guess, VB) code where every 100 lines looks pretty much like the next 100, and nobody knows how to customize it, or frankly, even what it does. Marc
I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner
C# actually, that has been insisted upon. But yes, I don't hold out hope for the quality and it does very much smack of job security
I know the language. I've read a book. - _Madmatt
-
CodeSmith is only as good as the templates you are using, and the discipline behind the production of the data model. It's useful for churning out a data layer, and some lower levels of business layer (e.g. length checks and the like), but it is no substitute for good coding skills once you start to move up the layers. I like CodeSmith, but I wouldn't trust the future of my business to it alone.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
Pete O'Hanlon wrote:
It's useful for churning out a data layer, and some lower levels of business laye
There is the rub. They have been provided with fully functional DAL and basic BL.
I know the language. I've read a book. - _Madmatt
-
I looked at CodeSmith once and thought it was able to produce a lot of code quickly, but the code was mediocre quality at best. An off-shore team is proposing to use it for a project. My opinion is they are using it to mask skills and pretend to deliver high quality work. Anyone else have an opinion? Have you used it?
I know the language. I've read a book. - _Madmatt
One of these does not translate...if CodeSmith generates "mediocre quality at best", as you put it, then how would that off-shore team use it to "deliver high quality work"? Or is that team under the impression that what CodeSmith generates is the equivalent of high quality work? That is the real red flag, IMO.
-
I looked at CodeSmith once and thought it was able to produce a lot of code quickly, but the code was mediocre quality at best. An off-shore team is proposing to use it for a project. My opinion is they are using it to mask skills and pretend to deliver high quality work. Anyone else have an opinion? Have you used it?
I know the language. I've read a book. - _Madmatt
-
I havent tried CS for quite a while now so this might not hold true anymore, But last time I checked it did a 1-1 mapping between tables and classes. You will get a class model reflecting the database schema instead of a model reflecting the actual domain problem you are trying to solve. I wouldn't use it if its still the same..
I'm quite pleased to see support for generating a DB from your Entity Model in VS 2010.
-
I havent tried CS for quite a while now so this might not hold true anymore, But last time I checked it did a 1-1 mapping between tables and classes. You will get a class model reflecting the database schema instead of a model reflecting the actual domain problem you are trying to solve. I wouldn't use it if its still the same..
You sir have hit the nail precisely on the head. The end result is not an application that is task oriented and works the way the user thinks but rather an application that works the way a database designer thinks.
"Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg
-
I looked at CodeSmith once and thought it was able to produce a lot of code quickly, but the code was mediocre quality at best. An off-shore team is proposing to use it for a project. My opinion is they are using it to mask skills and pretend to deliver high quality work. Anyone else have an opinion? Have you used it?
I know the language. I've read a book. - _Madmatt
The truth lies somewhere in the middle. Having specialized in just the sort of apps that CodeSmith was designed for and having examined it and other code generators quite closely I've decided to never use one, but for a great chunk of the application it can make sense since a large chunk generally speaking does have a 1:1 correlation between the underlying db schema and business objects. This can save a great deal of time and money and very importantly ensure consistency in the code making it much easier to maintain over time. That being said, the remaining stuff definitely suffers greatly if done entirely via code generation. The most important and complex business objects in any well designed app need careful hand crafting to ensure that you end up with a task oriented design that is successful to the end users, who don't tend to think like a database administrator but rather think in terms of the real world tasks they need to accomplish. Relying solely on code generation results in a substandard application that only the db designer can love and understand. To propose that the majority be cranked out via CodeSmith and the critical parts be hand tweaked and coded is logical and commendable, to propose that an entire business object layer be cranked out via CodeSmith is madness at best. That they are suggestion using CodeSmith therefore has no correlation with the quality of their skills or the quality of the work; for that you will need to look deeper.
"Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg
-
The bigger question is why are you using an off-shore team? Send me the specs and your requirements and I'll give you a quote.
Its been said above but I'll say it again Codsmith is only as good as the Templates you use , there are enough template samples to show you the way . Its a no pain no gain situation , if you spend time learning how to code (YES code) your own templates then it pays dividends . While Codesmith excels at reading DB Schema's and translating to Entity Classes and DAL etc , if its text you can generate with with Codesmith , I use it extensively to generate small "slugs" of code in Win Form apps , things like repetitive building of tree views etc. Coding by hand is essential to start with but once working debugged and perfect Codesmith simply automates "Copy & Paste". At least it gives you the bulk to edit and customise if all else fails. You only have to look at the PLINQO project (thats added a a new lease of life into a doomed Linq 2 SQL) to see an example of the innovation that Codesmith have put into the "Open Source" projects , yes you need Codesmith to take advantage but thats a small prices for the functionality it buys. My suspicion is thet the nasysayers of Codesmith have never really put in the effort to learn how to use it properly , stuff like VS Integration with Codesmith Projects is just magic , auto sync with your DB each time you compile your VS project(if you so wish) , Active Snippets just slots in pre tested lumps of code and a mouse click. Admittedly the 2 week evaluation limited to their db (Petshop) is a bit restrictive on a decent evaluation but it does show enough for a $200 gamble. I have tried a lot of the other DAL generators , the output in general I find confusing and overly complex in many cases and in most cases only doing One job whereas Codesmth can do many . My Generation comes close as an open source alternative , but in terms of ease of use I found it very scrappy compared to CodeSmith. I have yet to really use T4 in VS2008 . ApexCode is a good alternative but despite their efforts to drum up support for templates , there seems limted following. I use Codesmth avidly (as you may gather) and as for stability in V5 I have never had a single issue, there are active user forums and their support for any queries or potential bugs is excellent. To me its an indespensible tool , it will never replace a thinking developer but it sure can do a load of mundane work to allow the developer to think !! To Eric Smith and his team , keep up teh good work.... Cheers Mike
Mike
-
I looked at CodeSmith once and thought it was able to produce a lot of code quickly, but the code was mediocre quality at best. An off-shore team is proposing to use it for a project. My opinion is they are using it to mask skills and pretend to deliver high quality work. Anyone else have an opinion? Have you used it?
I know the language. I've read a book. - _Madmatt
Ask them to submit a sample for review, if its not good enough then just reject it. Alternatively if you have some guidelines and rules in place for code formatting and structure you could just check the generated code against those, if its not producing code in line with your guidelines then its just no good.
-
I looked at CodeSmith once and thought it was able to produce a lot of code quickly, but the code was mediocre quality at best. An off-shore team is proposing to use it for a project. My opinion is they are using it to mask skills and pretend to deliver high quality work. Anyone else have an opinion? Have you used it?
I know the language. I've read a book. - _Madmatt
IMHO Code generation has its uses and can accelerate coding once a patterns is identified. Microsoft Software factories (SCSF, WCSF, MVC) contain recipes for code generation. CodeSmith like other code generation tools uses templates. If the templates are based on well designed code, the resulting output will be OK. Also, code generation should be applied only to specific parts of the project, and using partial classes to isolate generated code.
-
Its been said above but I'll say it again Codsmith is only as good as the Templates you use , there are enough template samples to show you the way . Its a no pain no gain situation , if you spend time learning how to code (YES code) your own templates then it pays dividends . While Codesmith excels at reading DB Schema's and translating to Entity Classes and DAL etc , if its text you can generate with with Codesmith , I use it extensively to generate small "slugs" of code in Win Form apps , things like repetitive building of tree views etc. Coding by hand is essential to start with but once working debugged and perfect Codesmith simply automates "Copy & Paste". At least it gives you the bulk to edit and customise if all else fails. You only have to look at the PLINQO project (thats added a a new lease of life into a doomed Linq 2 SQL) to see an example of the innovation that Codesmith have put into the "Open Source" projects , yes you need Codesmith to take advantage but thats a small prices for the functionality it buys. My suspicion is thet the nasysayers of Codesmith have never really put in the effort to learn how to use it properly , stuff like VS Integration with Codesmith Projects is just magic , auto sync with your DB each time you compile your VS project(if you so wish) , Active Snippets just slots in pre tested lumps of code and a mouse click. Admittedly the 2 week evaluation limited to their db (Petshop) is a bit restrictive on a decent evaluation but it does show enough for a $200 gamble. I have tried a lot of the other DAL generators , the output in general I find confusing and overly complex in many cases and in most cases only doing One job whereas Codesmth can do many . My Generation comes close as an open source alternative , but in terms of ease of use I found it very scrappy compared to CodeSmith. I have yet to really use T4 in VS2008 . ApexCode is a good alternative but despite their efforts to drum up support for templates , there seems limted following. I use Codesmth avidly (as you may gather) and as for stability in V5 I have never had a single issue, there are active user forums and their support for any queries or potential bugs is excellent. To me its an indespensible tool , it will never replace a thinking developer but it sure can do a load of mundane work to allow the developer to think !! To Eric Smith and his team , keep up teh good work.... Cheers Mike
Mike
I agree completely with Mike's post. It is a great example of the old cliché of "you get out of it what you put in it". The only thing I would add is the team aspect. A common problem and advatage when working with a team is the varied experience and backgrounds each team member brings to the team. While it allows for different perspectives on the same problem to generate the best solution, each developer has his or her own style or strength. If the situation is not managed you can end up with quality and compatability issues accross your products and services. Extreame example of course. Code generators like Code Smith allow you to pull your resources together and create templates that provide consistant quality code across your projects while still retaining the ability to manage your resources seperatly.
-
Mark, My company purchased Code Smith version 4 and 5. CS 4 was mostly stable, but CS 5 flat out broke on the upgrade and would do nothing but throw ADO .NET exceptions, making it completely unusable. There were several patches released, and having uninstalled and reinstall several times with no success, I stopped using the product. "Out of the box" the product itself does little for you, as others have stated, you have to vest heavily in your templates. When I did use it, it was handy for generation of NHibernate mappings, DTOs and base CSLA objects, but our business layer has been done for some time now, and so I have little to no use for that product and do not miss it. BTW - there are free opensource code generation tools available, today, that can generate everything I just mentioned. Visit SourceForge.net to find them.
:..::. Douglas H. Troy ::..
Bad Astronomy |VCF|wxWidgets|WTLHey, I use CS, v5 and have had none of the problems any of the other posters stated... but will always look to get a free product to do what a pay-for-it product does... Do you have a suggestion for any of the CS free open source sourceforge.net tools?
-
I looked at CodeSmith once and thought it was able to produce a lot of code quickly, but the code was mediocre quality at best. An off-shore team is proposing to use it for a project. My opinion is they are using it to mask skills and pretend to deliver high quality work. Anyone else have an opinion? Have you used it?
I know the language. I've read a book. - _Madmatt
I often see terrible quality applications that are developed using Wizards and Code Generation Tools. It might not be true for everyone but IMHO, most people who use them either don't enjoy coding or have low coding skills, except when it's a project requirement. Wizards and Tools usually takes the control out of the developer and might produce undesirable results, poor performance and/or code hard to maintain. That's why I never use this stuff and code everything by hand. In the end it saves me time from having to do workarounds on code produced by these tools. Of course sometimes I need to use the stuff and I always argue against management on using these tools. If I were you, I would try to talk this out of them. Regards, Fábio
-
I often see terrible quality applications that are developed using Wizards and Code Generation Tools. It might not be true for everyone but IMHO, most people who use them either don't enjoy coding or have low coding skills, except when it's a project requirement. Wizards and Tools usually takes the control out of the developer and might produce undesirable results, poor performance and/or code hard to maintain. That's why I never use this stuff and code everything by hand. In the end it saves me time from having to do workarounds on code produced by these tools. Of course sometimes I need to use the stuff and I always argue against management on using these tools. If I were you, I would try to talk this out of them. Regards, Fábio
Unfortunately the decision was made, no real choice was given. The sad part is three weeks of effort including fully constructed DAL and partial BL was thrown out because the offshore team wanted to start over with code smith.
I know the language. I've read a book. - _Madmatt
-
Unfortunately the decision was made, no real choice was given. The sad part is three weeks of effort including fully constructed DAL and partial BL was thrown out because the offshore team wanted to start over with code smith.
I know the language. I've read a book. - _Madmatt
That's sad. This kind of stuff frustrates me when it happens. But then, now that you have to do it this way, expose them the problems you "WILL" be getting along the way so next time this can be avoided.