Is Code Generator + Stored Procedures worse than O/R Mapping?

Excellent post about O/R Mapping and stored procedures. Paul writes, that there are two good approaches for development:

  1. O/R Mapping
  2. Stored Procedures (SP) + Code Generator (CG)

I agree. Other ways are not so good and bring additional problems (sometimes serious). Just one point is discussable for me. Paul puts O/R mapping on the first place, but I don’t think that CG+SP definitely worse than O/R Mapping. I have very bright example in our company. We’ve used CodeSmith, and this tool really great. Sure, templates took time, and I can’t insist that O/R Mapping will not solve the same problems faster next time. But, anyway, CG is a good alternative.

I personally prefer O/R Mapping. I have experience with NEO.NET and Tangram, and these tools are good and helpful. But there were some nasty problems with them, and (sadly) lack of documentation is very serious problem for many free open-source tools. It takes time to dig into source code and get the problem fixed. It takes time to understand system behavior, when it does not mach expectations. But these are problems of exact (free) tools, not an O/R Mapping in general.

2 thoughts on “Is Code Generator + Stored Procedures worse than O/R Mapping?”

  1. Well, I think that code generation is a mandatory think for each good O/R Mapping tool. For example, NEO do has code generation and NHibernate will have such feature as well.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s