Published Nov 17, 2020

Episode 435: Julie Lerman on Object Relational Mappers and Entity Framework

Julie Lerman delves into the evolution and significance of Entity Framework and EF Core, offering insights into ORM usage, SQL performance optimization, and their impact on modern software development. She provides a nuanced exploration of how ORMs enhance productivity while balancing the trade-offs of direct SQL use.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Optimization

    Optimizing performance in applications using ORMs like Entity Framework involves strategic decisions. highlights the use of lighter ORMs such as Dapper, which allows developers to write their own SQL for better control and performance 1. She suggests a CQRS pattern to separate commands and queries, using Entity Framework for writing and Dapper for reading 1. Stored procedures can drastically reduce execution time, as illustrated by a case where a procedure cut down execution from two minutes to nine milliseconds 2.

    Just write a stored procedure. Do not, you know, like, you can't, it's too late to change this model because everything's dependent on it. So just write a stored procedure.

    ---

    This approach allows developers to leverage the simplicity of Entity Framework while optimizing performance-critical queries.

       

    SQL vs ORMs

    The trade-offs between using SQL directly and relying on ORMs are significant for developers. emphasizes the importance of understanding the SQL generated by ORMs and profiling to identify performance bottlenecks 3. She notes that while ORMs simplify mapping between relational databases and application objects, they do not eliminate the need for database expertise 3. The choice between SQL and ORMs often depends on the application's requirements and the team's expertise.

    It enables many developers to write pretty decent SQL. How's that? How's that, my DBA friends?

    ---

    Ultimately, the decision involves balancing ease of use with performance and control.

Related Episodes