déc. 23

Yesterday I assisted to the VISUG session given by Kurt Claeys about Entities in WCF.

This session was very interesting as Kurt presented a little bit WCF and Entity Framework, but the session was mainly an architectural reflection about the use of WCF and Entity Framework, related to Service Oriented Architecture. He described indeed WCF as an enabler to SOA.

Some key information givend during the session:

  • DataContractAttribute is not needed anymore (since VS 2008 SP1) when we need to serialize a type in WCF. Just remind however that the private members won't be serialized and that you still need a parameterless constructor.
  • WCF allow the separation of
    • the Address  (done in configuration)
    • the Binding   (done in configuration)
    • the Contract (done in compiled code)
  • Entity Framework can be queried using
    • LINQ
    • ESQL which are SQL-like commands but operating at entities level
  • The ObjectContext is the object responsible for doing Change Tracking on entities
  • LINQ to Entities can also use string filters like "it.orderId = 99" where "it" is a keyword representing the current entity

In a distributed world, the client will use WCF to communicate with the business tier and should be "Entity Framework-agnostic". The use of Entity Framework is the server's business, none of the client. Kurt presented also some existing framework that can be used to ensure / help having that separation:

  • EFContrib uses PostSharp to add some change tracking functionality
    • I'm fond of PostSharp and was very intereseting to that but the project can be considered as dead (last release in April 2008, not supporting the last version of Entity Framework)
  • Entity Bag, aka Perseus which is working with graph of entities. Dead also
    • Understand POCO as Plain Old CLR Objects, meaning very simple classes, without any attributes or dependency to a framework
    • Based on an ".emdx" file and generates POCO classes
    • Creates an adapter from POCO classes to fill entities 

Finally Kurt briefly spoke about Vnext, which will be the next release of ADO.NET / EntityFramework.

  • No planned date : maybe the same as .NET 4.0, or as Visual Studio 2010, or ...
  • Will support out-of-the-box lazy loading and Table Valued Functions
  • Will add a new Interface IEntityWithChanges which is exposing three boolean properties IsNew, IsModified and IsDeleted



Posted on mercredi, 2 avril 2014 02:21

My fellow Small Business Development volunteers critiqued the products and real estate agents marrakech I was ready for another Marrakech adventure. They are then obliged to return your deposit in full.

my weblog; real estate in marrakech,  Franchesca - http://obrazkynaplochu.sk/profile/rebirmingh ,

Ajouter un commentaire

  • Commentaire
  • Aperçu immédiat