none
Is it worth creating a Code Generator? RRS feed

  • Question

  • I have seen many code generators and ORM tools some of which are open source and free, whereas some are commercial such as NHibernate, MyGeneration, CodeSmith, TierDeveloper ...

    I am just thinking is it worth creating a code generator for myself? Or using one of the existing ones e.g. MyGeneration + NHibernatePlus?

    (I know a software development Company which has developed a highly rich application development tool (not known to public), by which without exaggeration, they can build applications 90% faster than other companies so the productivity boooosts and they are moving towards becoming an empire :D)
    Tuesday, April 7, 2009 2:54 PM

All replies

  • Hi Dyanmic

    It is not worth creating  a code generator. You should what u want to do with generating code . What is your objective such as saving time , more easier development or finishing the development of the module in fixed amount of time.

    You know that exact that you want to generate code. There are alot of third party avaliable of generating code in c# or java. Here the main objective you want and what is end result what you want to achieve out if of using code generation.

    You need to thinks why you should go code generation. By doing so you need to positive benefits that will help in your design , development and the expected end result to good quality code that meet functional requirements that meets the industry standards.

    It is your call . You decide what you want do it . Do not compare you  with other companies , that is a really very bad idea.  Other companies may opt for code generation they decide to go for it due to very good technical reasons.

    Regards,
    Phijo Mathew Philip.

    PHIJO MP
    Tuesday, April 7, 2009 5:21 PM
  • Well, my thumb rule is reuse over purchase over develop, so I can recommend only based on my own preferences. The way I see it, codegens out there already had some considerable effort put onto them and have some pretty good support that I don’t think you’ll see any benefit in creating your own. That’s the short version.

    The long version is that you’ve to evaluate those products and decide whether they are good enough for you, or your requirements are so unique that you've to create your own. However, with current products offering so much flexibility and extensibility, you're requirements should really be something special to opt on creating your own.



    and just one small comment, NHibernate is free open source, not commercial and has some excellent community support. Personally, I like it very much :)
    Wednesday, April 8, 2009 4:10 AM
  • Phijo, thanks for sharing your thoughts.

    I agree it's a scenario-based and need-based decision, however imagine a tool that can resolve 95% of scenarios. I have seen such a tool though it was developed over maybe 7 years and it's still developing.

    I think comparing is good and benefitial since we see more scenarios and understand more good reasons to resolve issues or make decisions though I understand what you meant by that. 

    Pooya
    Tuesday, April 14, 2009 9:05 AM
  • Fernando, thanks for your comments.

    "Reuse over Purchace over Develop" nice rule though I prefer sometimes to change this order.

    I have used NHibernate in one of my projects; it's good for some scenarios I agree. I am planning to use Entity Framework for an upcoming project though.

    Pooya
    Tuesday, April 14, 2009 9:09 AM
  • If you can realise a competitive advantage from creating a framework, ORM or other tool then it is worth it (your example of a 90% increase is a compelling statistic!). 

    The danger would be failing to recognise when the market has caught up and finally produced a better, more flexible solution than your tool.  It is at this point that your productivity increasing tool becomes technical debt.

    As others have pointed out, there has been a lot of work in ORM tools and code generators over the last few years so it would be quite a task improving on this from scratch.


    Pl mark as answer or helpful if you found this useful
    Tuesday, April 14, 2009 10:40 AM