serialization in the context of ASP.NET MVC, jquery, (POCOs) NHibernate

Posted on 2010-01-13
Medium Priority
Last Modified: 2012-05-08
I am currently using these technologies:

- front-end jquey (V)
- ASP.NET MVC (to expose restful APIs secured with forms validation) (C)
- NHibernate to persist POCOs (M)

I have played around a bit with serialisation of complicated HTML forms (using JSON.stringify etc.) and some temp objects that use DataContract, DataMember etc., which in turn are used to initialise the POCOs. This all feels all a bit clumsy and I am wondering whether there are any exhaustive articles, blogs, books on this subject (serialization using the above technologies) to 'glue' things together nicely.

Any pointers would be very much appreciated. Many thanks.

Best wishes,

Question by:csetzkorn
1 Comment

Accepted Solution

jamesbaile earned 2000 total points
ID: 26302256
Hi Christian

I develop using a very similar list - ASP.NET MVC/NHibernate/Castle Windsor/JQuery and Yahoo YUI.

I don't tend to use my POCOs directly in my views instead I generally have a view specific model which is designed just for that view - this avoids view design infuluencing domain design. Depending on the scenario I either render my view model server side or I render some of the view server side and then use JQuery to make ajax calls back to the controller to get JSON objects which can then me manipulated client side. For these JQuery calls I use a JsonResult to return a serialised JSON object.

To get from my domain POCOs to my View Models I use AutoMapper

Have a look at the following which I've found helpful


Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question