Your SlideShare is downloading. ×
0
ASP.NET MVC 4 WorkShop
ASP.NET MVC 4 WorkShop
ASP.NET MVC 4 WorkShop
ASP.NET MVC 4 WorkShop
ASP.NET MVC 4 WorkShop
ASP.NET MVC 4 WorkShop
ASP.NET MVC 4 WorkShop
ASP.NET MVC 4 WorkShop
ASP.NET MVC 4 WorkShop
ASP.NET MVC 4 WorkShop
ASP.NET MVC 4 WorkShop
ASP.NET MVC 4 WorkShop
ASP.NET MVC 4 WorkShop
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

ASP.NET MVC 4 WorkShop

4,798

Published on

ASP.NET MVC 4 WorkShop

ASP.NET MVC 4 WorkShop

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,798
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. ASP.NET MVC 4WORKSHOP-1Alok Kumar PandeyDirector, Strategic Product DevelopmentWelcometo
  • 2. ASP.NET MVC 4 It is an open source web application framework Implements the model view controller (MVC) pattern. It is a framework for building scalable Secureweb applications using well-established design patterns.
  • 3. License Apache License 2.0 In March 2012, Microsoft had released part of their web stack (including ASP.NETMVC, Razor and Web API) under an open source license (Apache License 2.0) Download from Codeplex.comhttp://aspnetwebstack.codeplex.com/
  • 4. Why MVC? It helps to reduce the complexity by dividing an application into Model, View and Controller. This separation (loose coupling) helps in Isolation of components while development The separation provides better support for Test-driven development (TDD). ASP.NET MVC web site are Good in performance and also easy to maintain.
  • 5. MVC Architecture The Model-View-Controller (MVC) pattern is an architectural design principle The Model Model represents core business logic and data The View View is responsible for transforming a model or models into a visual representation The Controller Controller acts as the coordinator between the view and the model
  • 6. Comparing MVC with Web Forms Both MVC and Web form are built on ASP.NET Framework MVC is full of scripting technologies Requires a good command over scripting technologies In MVC there are no server controls supported Its fully depend on HTML controls Web forms web development is very easy Compared to MVC apps Web forms doesnt require a developer To be an expert in JavaScript and HTML Web form is very rich with server controls
  • 7. View Engine View Engine is responsible for rendering the HTML from views to the browser Currently there are few number of view engines available for MVC Top four view engines are Razor, traditional ASPX, Spark and NHaml Razor is the preferred View Engine for MVC ASPX View Engine is the legacy View Engine This option is there for backward compatibility We can use multiple view engines in ASP.NET MVCTo read more about different view engineshttp://www.codeproject.com/Articles/467850/ASP-NET-MVC-view-engines
  • 8. The MVC 4 improved features Refreshed and modernized default project templates New mobile project template Many new features to support mobile apps Recipes to customize code generation Enhanced support for asynchronous methods Add Controller to any project folder Bundling and Minification OAuth and OpenIDAnd many morehttp://www.asp.net/whitepapers/mvc4-release-notes
  • 9. Global.asax FileGlobal.asaz is divided into 6 section App_Start AreaRegistration WebApiConfig FilterConfig RouteConfig BundleConfig AuthConfig
  • 10. NoteLayout.cshtml => Master PagePartial.cshtml => User Control@RenderSection(“Section Name”, required:true/false)@RenderBody()@Styles.Render(“~/Content/css”)@Scripts.Render("~/bundles/jquery")BundleConfig FileBundleTable.EnableOptimizations = true;
  • 11. Note Calling a MVC Controller and Action Method using HTML Button or Image<input type="button" title="Delete" value="D"onclick="location.href=@Url.Action("Delete", "movies", new { id = item.ID })" /><a href="@Url.Action("Delete", "movies", new { id = item.ID })" title="Edit"><img src="../../Content/Images/Delete.png" /></a>
  • 12. Demo API API Documentation CRUD
  • 13. Thank You?

×