?
Solved

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

Posted on 2010-01-13
1
Medium Priority
?
455 Views
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,

Christian
0
Comment
Question by:csetzkorn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
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
http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/09/14/automapper-1-0-rc1-released.aspx

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

http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/04/24/how-we-do-mvc.aspx
http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/05/11/automapper-and-ioc.aspx
http://codeclimber.net.nz/archive/2009/10/27/12-asp.net-mvc-best-practices.aspx
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

777 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