Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jacinto Limjap, Jr. Senior Software Design Engineer, Cormant Technologies Inc. LINQ for NHibernate { Easy OR Mapping with C# and Visual Studio 2008 }

Similar presentations


Presentation on theme: "Jacinto Limjap, Jr. Senior Software Design Engineer, Cormant Technologies Inc. LINQ for NHibernate { Easy OR Mapping with C# and Visual Studio 2008 }"— Presentation transcript:

1

2 Jacinto Limjap, Jr. Senior Software Design Engineer, Cormant Technologies Inc. LINQ for NHibernate { Easy OR Mapping with C# and Visual Studio 2008 } C# and Visual Studio 2008 }

3 Agenda  Talk about Object Relational Impedance Mismatch, and why it matters  Go on a brief overview of Object Relational Mapping & NHibernate  Demo NHibernate and LINQ for NHibernate, and how it deals with data in.NET applications

4 Object Relational Impedance Mismatch  RDBMS are optimized for data, OOP was optimized for behavior  RDBMS use tables and joins, OOP uses objects, inheritance and composition  No straightforward way to represent tables and columns as classes and attributes, and vice versa

5 The Vietnam of Computer Science “[Object relational impedance mismatch] represents a quagmire which starts well, gets more complicated as time passes, and before long entraps its users in a commitment that has no clear demarcation point, no clear win conditions, and no clear exit strategy.” - Ted Neward

6 Attempts to solve the Object Relational Impedance Mismatch in.NET  ADO.NET – Typed Datasets  LINQ to SQL  Entity Framework  LLBLGen  Objectmapper.NET  iBATIS.NET  Subsonic  Lightspeed  NHibernate  db4o

7 Object Relational Mapping  Attempts to solve object relational impedance mismatch  Data infrastructure is represented in separate files or as.NET attributes  Main aim is to maintain POCOs (Plain Old CLR Objects)‏

8 Why should I care about POCOs?  Loose coupling from data infrastructure  Testability  Ability to adhere to tenets of object oriented programming (as opposed to data- driven programming)‏

9 NHibernate  Ported from Hibernate, a popular ORM in Java  Open source  Works with Microsoft SQL Server, Oracle, MySQL, etc.  Uses XML to map objects to the database schema  De facto standard for OR Mapping  LINQ provides a new way to simplify NHibernate queries

10 Steps  Download Nhibernate 2.0 Beta -- –More information on setting up Nhibernate for your application can be found on The NHibernate FAQ:  Download NHContrib from Sourceforge using subversion –http://sourceforge.com/nhcontrib  Create your solution, add a reference to the NHibernate.Linq project

11 LINQ for NHibernate Demo

12 LINQ for NHibernate Pros & Cons  Strongly typed queries  Eliminates need for string literals  Intellisense support Still in alpha (not included in NHibernate 2.0 beta!)‏ Still in alpha (not included in NHibernate 2.0 beta!)‏ Hasn't covered more complex join scenarios (yet)‏ Hasn't covered more complex join scenarios (yet)‏

13 References  NHibernate: –http://nhibernate.org  NHContrib: –http://sourceforge.net/projects/nhcontrib  The NHibernate FAQ: –http://blogs.hibernatingrhinos.com/nhibernate  The Vietnam of Computer Science by Ted Neward –http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx

14 Your speaker Blog Blog –http://dotnet.kapenilattex.com Forums (username = LaTtEX)‏ Forums (username = LaTtEX)‏ –http://msforums.ph/forums Twitter Twitter –http://twitter.com/LaTtEX

15 Cormant is hiring: Technical Leads and Senior Software Design Engineers You must be a strong developer ready to roll up your sleeves, but will also be responsible for Team Lead duties such as resource allocations, task estimates, and coordination with Quality Assurance. You must be a strong developer ready to roll up your sleeves, but will also be responsible for Team Lead duties such as resource allocations, task estimates, and coordination with Quality Assurance. You have a proven experience in providing technical and design solutions using Object Oriented Analysis and Design (OOAD). You have a proven experience in providing technical and design solutions using Object Oriented Analysis and Design (OOAD). You have a strong opinion on whether to favor composition over inheritance. You have a strong opinion on whether to favor composition over inheritance. You prefer to think through a problem rather than programming like mad. You prefer to think through a problem rather than programming like mad. “Refactor mercilessly” is not just a tee shirt slogan. “Refactor mercilessly” is not just a tee shirt slogan. You get satisfaction in doing a job right. You get satisfaction in doing a job right. You have proven experience in C#, NHibernate, Agile development methodologies (Test-driven development, Continuous Integration). You have proven experience in C#, NHibernate, Agile development methodologies (Test-driven development, Continuous Integration). your resume to your resume to

16 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "Jacinto Limjap, Jr. Senior Software Design Engineer, Cormant Technologies Inc. LINQ for NHibernate { Easy OR Mapping with C# and Visual Studio 2008 }"

Similar presentations


Ads by Google