Signum Framework
Original author(s) | Signum Software |
---|---|
Developer(s) | Signum Software |
Initial release | 9 March 2009 |
Stable release | 2.0.0 / 10 July 2011 |
Development status | In development / with support |
Written in | C# |
Operating system | Multiplatform |
Available in | English, Spanish |
Type | Framework / ORM |
License | LGPL |
Website |
www |
Signum Framework is an open source ORM framework to develop applications on Microsoft .NET platform. It is focused on entities, so that the data model determines the database scheme. As database only MS SQL Server is currently supported.
Signum Framework is distributed under LGPL.
Features
Signum Framework components
Signum Framework comprises the following assemblies:
- Signum.Entities - base classes required to generate the data entities.
- Signum.Engine - ORM engine with a complete LINQ provider.
- Signum.Utilities - set of utilities and tools.
- Signum.Services - base interfaces for WCF service.
- Signum.Windows - basic controls to manipulate entities.
Entities first
Being centered on entities, its philosophy encourages that database schema is automatically generated from the objects, avoiding mapping fields between the database and the entities through configuration files. Thus it is possible that errors are detected at compile time for all classes (both data and logic).
On the other hand, this prevents Signum Framework to be well adapted to projects where there is a previous database that must be preserved, since, unlike other frameworks, the database is generated from code and not the other way.
Given the importance attached to the entities as core applications, Signum Framework provides a small group of base classes and primitives that allows modeling the objects in a modular and reusable manner, avoiding redundancy and ensuring the integrity of objects, both in logic and once persisted in database. This (having to inherit features from one of these base classes) makes Signum Framework not to support POCO (Plain Old C# Object).
Generation Scheme
The relational database is automatically generated from the entities using a 1 to 1 mapping from entities to tables so that each entity has its own separate table and each entity field its own column. The entities that are embedded (EmbeddedEntity) do not have a table itself, but its fields are stored as columns in the entity table to which they belong. Relational tables are used for collections, allowing N to N relations.
To allow data changes without having to rebuild the database each time, you can synchronize between the entities and the existing database in which the engine will generate a SQL script file containing the modifications needed to update the scheme.
Entities inheritance
Although Signum Framework uses a "table for specific class", in which a table is created for each of the specific types, it allows to implement the concept of inheritance using polymorphic relations, which have a foreign key allowing null values for each possible implementation.
User Interface and WCF
Signum.Windows offers basic WPF controls that take advantage of the homogeneity of entities to implement an automatic behavior. These controls simplify the development of the views of the entities of an application.
For communication between clients and server, WCF contracts are used, allowing the sharing of types. This facilitates reuse the validation rules of the entities on the client, eliminating redundancy.
The use of lazy objects makes possible to work with "footprints" of an entity, knowing his ToString and ID, but without retrieving the entire entity until needed, thus minimizing the workload and data transfer, greatly increasing applications performance.
LINQ
Signum Framework has a full LINQ provider so that all operations run in LINQ, and internally the engine translates them into SQL. Some features of this LINQ provider are:
- Supports joins.
- Supports boolean values in any part of the query.
- Supports GroupJoin and DefaultIfEmpty.
- Supports Group By in C# and VB.NET with multiple aggregates.
- Supports
let
in queries. - Manages the construction of objects in memory in queries and in-memory method calls.
- Supports nullable types and implicit conversions.
- Provides emulation of native SQL functions.
- Supports operations like SelectMany.
Because some of the features it supports (in particular the CROSS APPLY / OUTER APPLY functions) databases currently supported by Signum Framework are limited to SQL Server 2005 and SQL Server 2008 (both Express and paid versions).
The main difference between Signum Framework's LINQ provider and the rest of providers is that it is not dependent on an explicit context that depends on the current scheme of the database, which allows you to write reusable business logic.
History
- 2004 - First version of an ORM engine based on the principles of reuse and focused on entities.
- 2007 - Second version of ORM engine, including Operations Manager and Processes.
- 2008 - Signum Framework 1.0 Beta 1, including ORM functionality, WPF and LINQ.
- 2009 - Signum Framework 1.0 Release on CodePlex.
- 2010 - Signum Framework 2.0 Beta 1, with support for .NET Framework 4 and ASP.Net MVC 2.0 (internal version).
- 2011 - Signum Framework 2.0 Beta 2, with support for ASP.NET MVC 3.0 (internal version).
- 2011 - Signum Framework 2.0 Release, with support for .NET Framework 4 and ASP.Net MVC 3.0