Gazel provides a layered software architecture. Here is the list of all available layers in different application types;
Gazel requires you to write your business functionality only in module projects. Other layers are there only for non-functional requirements such as authentication, authorization, monitoring, database connection management, transaction management etc.
This is a base layer that exists in all types of applications. Gazel uses Castle.Windsor as its IoC Container.
To create a new configuration in this layer, you need to create a class that implements
IIoCConfiguration in a configuration or host project. Here is an example for a convention;
This convention would register all types in your application with a transient lifestyle. For more information see Castle.Windsor Documentation.
Data Access Layer
Gazel makes use of Generic Repository Pattern with two interfaces
ILookup<T>. With their NHibernate implementations
NHibernateLookup<T>, Gazel enables your module classes to perform CRUD operations. Fluent NHibernate is used to configure data access layer by conventions.
To create a new configuration in this layer, there are two configuration interfaces:
IMappingConfiguration: Helps you to have an access to
AutoPersistenceModelinstance so that you can create new ORM conventions, or override existing conventions.
INHibernateConfiguration: Helps you to have an access to
FluentConfigurationinstance so that you can configure other things than class mappings.
For more information see Fluent NHibernate Documentation.
Business Logic Layer
This layer is where your business functionality goes. Business logic layer scans your module assemblies and registers your classes to IoC container, configures its methods to be business services, and maps them to database tables.
Service layer is the one that converts your public methods to business services. Gazel uses Routine to make this happen.
To create a new configuration in this layer, there are three configuration interfaces:
ICodingStyleConfiguration: Helps you to define new coding styles for your business modules.
IServiceConfiguration: Helps you to configure request and response headers of your busines services.
IInterceptionConfiguration: Helps you to configure service-level interceptors.
Service Client Layer
This layer configures Routine to consume business services internally and is used by web service - service client applications.
Web Service Layer
This renders Web API Controller classes or WCF Service classes and configures them to consume your business services through service client layer. Using this layer, Gazel exposes the business services you want to be publicly available.