Upida Library for Asp.Net Mvc and nHibernate
(You can use Entity Framework instead of nHibernate with no issues)
Documentation is available here: http://sites.google.com/site/upida4netJava
version is available here: https://upida.codeplex.com2.0 Version of Upida is available now.
Upida.Net is a lightweight library for ASP.Net MVC and NHibernate.
Upida.Net gracefully does the following routines for you:
- Assigns back-references to domain objects.
- Copies data from MVC model to persistent objects (with no custom code and no mappers).
- Allows you to serialize persistent objects without danger of unneeded extra-data, lazy-loading, or stack-overflow exceptions.
- Allows you to define validation rules in C# without duplicating them in java script.
- Allows you to validate fields more accurately: validate if a field is present in JSON, validate if a field is failed to be parsed.
- Allows you to extend validation with custom rules using custom code or existing rules.
The main idea of Upida is deserializing incoming JSON into detached domain objects with tracking of assigned and failed-to-parse fields.
The information of which field is assigned is used later when Upida copies fields from detached to persistent domain objects.
Only the assigned fields are copied and eventually persisted.
Using this technique I don't have to create custom mappers for every create/update UI form.
The information of which field is failed to parse is used later in validation. I can provide relevant error message if field failed to parse.Upida 2.0 introduces UpidaJsonFormatter, which parses incoming JSON using JsonParser implicitlyThe download package contains 3 examples:
- - MVVM example with Knockout.js
- - MVVM example with Angular.js
- - MVVM example with Angular.js (MyClients)
Thanks everyone for paying attention to this project.
We are supporting both, .Net
versions of it.
Stay in touch.How to use Upida ?
- Download and find example.
- If you plan to use Upida, your persistent classes must derive from Upida.Dtobase.
- Set up UpidaJsonFormatter in WebApiConfig.cs file (see examples).
- You may use the existing upida.utils.angular.js/upida.utils.knockout.js libraries (from examples), but you are free to have your own utils.
- First Example is implemented with Angular.js library
- Second Example is implemented with Knockout.js library
- Third example (MyClients) uses Angular.js too
- Upida works only with JSON
Thanks everyone for your interest.
If you have problems, or need some quick-start using Upida, please don't hesitate, contact me directly in Skype: vhusnullin.