Featured in
Process & Practices

In-App Subscriptions Made Easy

There are various types of subscriptions: recurring, non-recurring, free-trial periods, various billing cycles and any possible billing variation one can imagine. But with lack of information online, you might discover that mobile subscriptions behave differently from what you expected. This article will make your life somewhat easier when addressing an in-app subscriptions implementation.

Featured in
Enterprise Architecture

EIP Designer: Bridging the Gap Between EA and Development

This article presents the EIP Designer project, an Eclipse-based tool for introducing integration patterns into an EA design, providing fluidity and continuity while filling the gap existing between EA practices and concrete software development.

Small things that make development of applications simpler – Adding things like Pluralization and Singularization in the model, lazy loading, and more stored procedure mapping make building applications that use the Entity Framework much easier.

Customizing Queries – Adding support for existing LINQ operators, recognizing a larger set of patterns with LINQ, writing model defined functions along with the ability to use these in LINQ, and a number of other ways to create and customize queries.

SQL Generation Readability Improvements – Improving the readability, along with TSQL performance optimizations, of the generated queries to make it much easier to understand what is happening

Detailing some of the improvements existing in EF 4.0:

N-tier Development

One important aspect of N-tier development is the ability to exchange entity state between the server and the client. Diego Vega, Program Manager ADO.NET Entity Framework, details this further:

What you actually need is to:

Infer what the state changes are that need to be applied from a disconnected graph.

Self-tracking entities know how to do their own change tracking regardless of which tier those changes are made on. As an architecture, self-tracking entities falls between DTOs and DataSets and includes some of the benefits of each.

The ADO.NET team will make available a T4 template (not included in Beta) to generate classes and extension methods for ObjectContext.

Model First

Visual Studio 2010 has to ability to generate a DDL and create a database to store the entity data model. The developer has complete control over the entire process being able to customize the DDL, or to select the database he desires, or fine tune the mapping process.

Lazy Loading

In EF 4.0 deferred/lazy loading of related entities is supported by default by setting the property ContextOptions.DeferredLoadingEnabled to true. Lazy loading works with code-generated entities as well as POCO ones. Lazy loading is turned off by default but this setting can be customized.

POCO Support

In .NET 3.5, EF objects needed to either inherit EntityObject or implement one of the interfaces: IEntityWithKey, IEntityWithChangeTracker andIEntityWithRelationships. That introduced strong awareness of the persistence layer spoiling the domain model. All these restrictions have been removed in EF 4.0 allowing for completely transparent persistence.