Skip to content

Highlights

Michael Vivet edited this page Jun 8, 2018 · 6 revisions

Table of Contents


Summary

Nano contains many features, that is commonly required or needed by applications.
This ranges from data context interface, logging, configuration, documentation, services, routing, versioning, controllers and much more. Below is a non-exhausted list of features covered by Nano.

You Implement Nano Provides
You implement your models. Application, Configuration, Logging, Advanced Data Access, Eventing, Security.
You implement data mappings for your models. Hosting, Routing, Documentation, Exception Handling, Api-Client, Validation.
You implement query criteria for your models. Versioning, Dependency Injection, Audit, Authentication, Authorization.
You implement derived controllers for your models. and I could continue.

Providers

  • Data - Data storage provider and model to data context mapping.
  • Logging - Logging provider and output sink.
  • Eventing - Message queuing, publish / subscribe topology.

Nano Dependencies

  • Application - Startup class, startup.cs. Derive from DefaultApplication.
  • Controllers - Application http endpoints, annotated model state validation. Derive from DefaultController.
  • Services - Generic service interface interacting with the data context. Unit-of-work pattern, scoped transaction, annotated event publication.
  • Data Context - Repository implementation, storage integration (CRUD), model mapping registration. Derive from DefaultDbContext.
  • Models - The entities of the application. Derive from DefaultEntity.
  • Models Mappings - The mappings of models and their properties to the data context. Derive from DefaultEntityMapping.
  • Query Criteria - The contract for querying models of a controller. Includes Pagination, Ordering and custom Criteria implementation. Derive from DefaultQueryCriteria.

Service Dependencies

Many application parts belonging to both Nano and to various third-party service providers, gets injected and configured when the application is being defined and built.

  • Api Client (rpc), .AddApi(). Adds api client (rpc) dependencies.
  • Api Versioning, .AddVersioning(). Adds versioning, using request header.
  • Documentation Generation, .AddDocumentation(). Swagger, Swashbuckle.
  • Response Compression (gzip), .AddGzipCompression() and .UseResponseCompression(). Gzip response compression.
  • Exception Handling, .AddHttpExceptionHandlingMiddleware(). Internal server error when exception is thrown.
  • Http Session, .AddSession(). Adds session state management.
  • Http Static Files, .UseStaticFiles(). Static web content files.
  • Http Forward Headers, .UseForwardedHeaders(). Forward headers on redirect.
  • Http Cross-Origin Resource Sharing (CORS), .AddCors(). Resource Sharing (CORS) - All policies allowed
  • Http Request Identifier, .AddHttpRequestIdentifierMiddleware(). Add "RequestId" to http response header.
  • Http Content Type Negotiation, .AddHttpContentTypeMiddleware(). Supports Xml, Json, Html and text.
  • Http Request / Response Localization, .UseRequestLocalization(), .AddLocalization(). Request and view localization.
  • Mvc Route Mapping (default), .MapRoute(...). Default routing, {root}/{controller=Home}/{action=Index}/{id?}.
  • Mvc Entity Identity Json Serializer, DefaultEntityContractResolver.
  • Mvc Query Criteria Model Binder Provider, QueryModelBinderProvider. Model binding for Query<TCriteria>.
  • Build and Migrate Database - Deploy database and migration changes.
  • Additional application parts, services, components and assembly defined dependencies.

Clone this wiki locally