Are code generators bad?

后端 未结 26 1674
耶瑟儿~
耶瑟儿~ 2021-02-07 07:44

I use MyGeneration along with nHibernate to create the basic POCO objects and XML mapping files. I have heard some people say they think code generators are not a good idea. Wha

26条回答
  •  迷失自我
    2021-02-07 08:39

    In a recent project we built our own code generator. We generated all the data base stuff, and all the base code for our view and view controller classes. Although the generator took several months to build (mostly because this was the first time we had done this, and we had a couple of false starts) it paid for itself the first time we ran it and generated the basic framework for the whole app in about ten minutes. This was all in Java, but Ruby makes an excellent code-writing language particularly for small, one-off type projects. The best thing was the consistency of the code and the project organization. In addition you kind of have to think the basic framework out ahead of time, which is always good.

提交回复
热议问题