Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Code Smith opinions

Code Smith opinions

Scheduled Pinned Locked Moved The Lounge
collaborationquestiondiscussionlearning
27 Posts 20 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R R Giskard Reventlov

    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.

    me, me, me

    M Offline
    M Offline
    MidwestLimey
    wrote on last edited by
    #9

    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

    1 Reply Last reply
    0
    • M Marc Clifton

      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

      Will work for food. Interacx

      I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #10

      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

      1 Reply Last reply
      0
      • P Pete OHanlon

        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.

        My blog | My articles | MoXAML PowerToys | Onyx

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #11

        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

        P 1 Reply Last reply
        0
        • N Not Active

          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

          D Offline
          D Offline
          dandy72
          wrote on last edited by
          #12

          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.

          1 Reply Last reply
          0
          • N Not Active

            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

            S Offline
            S Offline
            Stryder_1
            wrote on last edited by
            #13

            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.

            M 1 Reply Last reply
            0
            • R Roger Alsing 0

              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..

              My Blog

              B Offline
              B Offline
              Brady Kelly
              wrote on last edited by
              #14

              I'm quite pleased to see support for generating a DB from your Entity Model in VS 2010.

              1 Reply Last reply
              0
              • R Roger Alsing 0

                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..

                My Blog

                M Offline
                M Offline
                Member 96
                wrote on last edited by
                #15

                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

                1 Reply Last reply
                0
                • N Not Active

                  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

                  M Offline
                  M Offline
                  Member 96
                  wrote on last edited by
                  #16

                  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

                  1 Reply Last reply
                  0
                  • S Stryder_1

                    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.

                    M Offline
                    M Offline
                    Member 3156407
                    wrote on last edited by
                    #17

                    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

                    B 1 Reply Last reply
                    0
                    • N Not Active

                      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

                      D Offline
                      D Offline
                      dazfuller
                      wrote on last edited by
                      #18

                      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.

                      1 Reply Last reply
                      0
                      • N Not Active

                        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

                        _ Offline
                        _ Offline
                        _ghassen_
                        wrote on last edited by
                        #19

                        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.

                        1 Reply Last reply
                        0
                        • M Member 3156407

                          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

                          B Offline
                          B Offline
                          bob e baker
                          wrote on last edited by
                          #20

                          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.

                          1 Reply Last reply
                          0
                          • D Douglas Troy

                            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

                            M Offline
                            M Offline
                            Member 3000349
                            wrote on last edited by
                            #21

                            Hey, 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?

                            1 Reply Last reply
                            0
                            • N Not Active

                              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

                              F Offline
                              F Offline
                              Fabio Franco
                              wrote on last edited by
                              #22

                              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

                              N 1 Reply Last reply
                              0
                              • F Fabio Franco

                                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

                                N Offline
                                N Offline
                                Not Active
                                wrote on last edited by
                                #23

                                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

                                F 1 Reply Last reply
                                0
                                • N Not Active

                                  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

                                  F Offline
                                  F Offline
                                  Fabio Franco
                                  wrote on last edited by
                                  #24

                                  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.

                                  1 Reply Last reply
                                  0
                                  • N Not Active

                                    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

                                    P Offline
                                    P Offline
                                    Pete OHanlon
                                    wrote on last edited by
                                    #25

                                    Oh dear. Then CodeSmith is virtually useless to them.

                                    "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.

                                    My blog | My articles | MoXAML PowerToys | Onyx

                                    1 Reply Last reply
                                    0
                                    • N Not Active

                                      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

                                      C Offline
                                      C Offline
                                      CoolDadTx
                                      wrote on last edited by
                                      #26

                                      Why bother buying software at all? VS supports text-based templating out of the box via the T4 engine. This is the technology behind how VS generates many of its own designer-specified files. Basically you drop a .tt file into your project and it'll spit out a C# or VB source file that is part of your project. T4 templates are available online and can be really complex. For example I've seen T4 templates to auto-generate metadata classes to use in lieu of string names for INotifyPropertyChange interfaces. I've also seen templates for generating the boiler-plate code for dependency properties in WPF. There are entire websites dedicated to T4 if you're interested. It is by no means the best solution in all cases nor is it necessarily easy to create complex templates but its capabilities are phenomenal especially when you consider that it can execute custom code that works against the IDEs project object model. It really allows you to do things that would otherwise be difficult. Best of all it is free and already integrated into VS.

                                      N 1 Reply Last reply
                                      0
                                      • C CoolDadTx

                                        Why bother buying software at all? VS supports text-based templating out of the box via the T4 engine. This is the technology behind how VS generates many of its own designer-specified files. Basically you drop a .tt file into your project and it'll spit out a C# or VB source file that is part of your project. T4 templates are available online and can be really complex. For example I've seen T4 templates to auto-generate metadata classes to use in lieu of string names for INotifyPropertyChange interfaces. I've also seen templates for generating the boiler-plate code for dependency properties in WPF. There are entire websites dedicated to T4 if you're interested. It is by no means the best solution in all cases nor is it necessarily easy to create complex templates but its capabilities are phenomenal especially when you consider that it can execute custom code that works against the IDEs project object model. It really allows you to do things that would otherwise be difficult. Best of all it is free and already integrated into VS.

                                        N Offline
                                        N Offline
                                        Not Active
                                        wrote on last edited by
                                        #27

                                        Here is a link for anyone interested http://www.hanselman.com/blog/T4TextTemplateTransformationToolkitCodeGenerationBestKeptVisualStudioSecret.aspx[^]


                                        I know the language. I've read a book. - _Madmatt

                                        1 Reply Last reply
                                        0
                                        Reply
                                        • Reply as topic
                                        Log in to reply
                                        • Oldest to Newest
                                        • Newest to Oldest
                                        • Most Votes


                                        • Login

                                        • Don't have an account? Register

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • World
                                        • Users
                                        • Groups