Code generators vs. ORMs vs. Stored Procedures

前端 未结 6 1969
猫巷女王i
猫巷女王i 2020-12-25 15:21

In what domains do each of these software architectures shine or fail?

Which key requirements would prompt you to choose one over the other?

Please assume th

6条回答
  •  既然无缘
    2020-12-25 16:16

    I agree that there are pros and cons to everything and a lot depends on your architecture. That being said, I try to use ORM's where it makes sense. A lot of the functionality is already there and usually they help prevent SQL Injection (plus it helps avoid re-inventing the wheel).

    Please see these other two posts on the topic (dynamic SQL vs stored procedures vs ORM) for more information

    Dynamic SQL vs. stored procedures
    Which is better: Ad hoc queries, or stored procedures?

    ORMs vs. stored procedures
    Why is parameterized SQL generated by NHibernate just as fast as a stored procedure?

提交回复
热议问题