Rapid Entity Framework is lightweight ORM frameowrk that gives you a clean and easy to use object relational mapping based on experience and ORM history. People have been asking me why Rapid Entity Framework? Well, to answer all these questions, here are the reasons you will start using Rapid Entity Framework:

1) Gives you the chance to Lazy load complex entity relationship in the most laziest way. Rapid entity gives you a clean edge in lazy loading. Here is a simple example of what happen behind the scenes when you lazy load using Rapid Entity.

Assuming we have a Customer class with many Addresses.


[Entity("tblCustomer")]
public class Customer
{
    [OneToMany(typeof(Address), RelationColumn="CustomerId")]
    public virtual IList<Address> Addresses { get; set; }
}

The code above depicts the relationships between a Customer and Many Addresses Entity.

Now let us attempt to get the count of addresses by a single customer :


using(EntityManager manager = new EntityManager())
{
     Customer customer = manager.LoadEntity(typeof(Customer), 2) as Customer;
     int count = customer.Address.Count;  //This section does not load all address, but issues a select count to the database
}

The code above does not load all addresses before getting the count, all Rapid EF got to do is to issue a select count to the underlying database.

Another Lazy load advantage is the following : Using Customer and Addresses


Customer customer = manager.LoadEntity(typeof(Customer), 2) as Customer;
customer.Addresses; //This will not load anything since we have not accessed any element of the list.

Address address = customer.Addresses[9]; //This will load the 9th element of the list 

foreach(Address address in customer.Addresses)  //The address is loaded element per element when the iterator moves next
{
     string country =  address.Country;  
}


from above we are ensuring an efficient lazy loading strategies.

2) Gives you a very clean mapping strategies using XML and/or attributes. It Favours convention than configuration? Each classes of rapid entity can live in a seperate cs file. The mapping is very simple to use. If you are not using the Rapid Entity Diagram tools you can simply map your entities by hand. REF does not compact the generated code into one file. You can actually see the generated files (If you are using the diagram tools)

3) Very powerful internal query structure. REF itself is based on query. An internal RQL (Rapid query language) is leveraged internally by REF to translate object orientation to sql commands, that means in the near future, REF can still be used on XML, flat file and some other data repositories.

4) Handles property changes inside the framework (self tracking entities) and not embed it into the generated entity. The property change event is detected by the REF framework, and from then any changes is stored on the transactional cache not on the shared cache until you commit then the changes will be merged.

5) Performance is not an issue with the framework because it has proven to be very fast, and there are some JIT algorithm used to generate required proxies when they are actually needed and not when the application starts.

6) Entity Manager is independent of the entities. Its can be used across databases and entities, you do not need to generated or code a new entity manager per project. All you maintain is a consistent coding constructs across projects.

7) Rapid by nature, tools are emerging to support its RAD features, note the RAD tools does not couple with the persistent framework. The RAD tool is just to help build applications quickly.

8) Multiple Database support : Rapid entity framework allows you to use multiple databases on different servers and with different database providers. For example you can use the mixture of mysql and oracle in a single application. The multi database functionalities allows you to configure one database as the Parent and the others as Siblings. So, to cut the story short you can query multiple database at the same time.

9) XML query langugae, you can query rapid entity framework by sending XMl queries and recieve results back via XML. There is an inbuilt xml schema in rapid to allow you conform to the XML query strategies.

10) LINQ integration, integrating REF with LINQ makes the framework query its underlying data providers with the fine grained compile time query.

Last edited Apr 2, 2011 at 5:23 PM by ahmedsalako, version 19

Comments

No comments yet.