Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am New to MVC, I got the situation to work on MVC with Jquery, JSon, Entity Framework, Any One Could you suggest me the way how should go for Better Result..




Thanks on Advance
.......NR
Posted
Updated 30-Sep-13 2:13am
v3

Since it is not clear in your post whether you know the concepts of MVC, I can give a basic insight on what is MVC.

Though it looks complex to start with MVC model being a webforms developer, it is very easy to get accustomed to it upon understanding the main concepts.

1. Model: There can be two types - Models and ModelViews. Models can be your business entity or equivalent to database tables. ModelViews are to be used inside your views. It could any combinations of models to be used as a single entity within any view. Example, imagine you have two grids in a view each is represented by a model. Model view holds these two entities into one (a seperate class with these two entities as memebers). Main purpose is to port it easier across controller and view. There is nothing much to learn assuming you know how to maintain the data models (classes).

2. View - All aspx pages (in terms of webforms) are views. Views can be based on aspx syntax or Razor syntax. Razor syntax is more advisable to be used as it follows simple structure and easy to undserstand. Each page in your project is related to a view. Basically view uses basic html controls (html5) so it is easy to understand this part.

3. Controller - It takes the models do all sorts of operations on them and produce a result (possibly in ModelView) and throw it to the view, which in turns uses basic HTML controls to display the values. Controller is basically a class (.cs) with special methods called "actions". When a request is sent to asp.net MVC it is passed to the action and the action does some processing on the models and returns the resulting model/modelView to the view with syntax like this "return View(MyModelView);. Views are chosen automatically by the asp.net routing based on the name. If your request is "http;//abc.com/Customer/list. Under Customer controller list action is called and a view with the name List is returned basically.

Apart from separation of concerns and maintainability I prefer MVC over webforms mainly to avoid using complete server controls of webforms and the dealings with their UI issues.

Googling "asp.net MVC" will fetch you plenty of articles and tutorials on how to start with.

Please let me know if you have any specific questions.

Other experts, I am new to Code project, please correct me if I made any mistakes in the above story, Thanks in advance.
 
Share this answer
 
Comments
Member 9877910 1-Oct-13 1:38am    
Thank You ,
Maybe you can try the ASP.NET MVC website: http://www.asp.net/mvc[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900