Investment proof Backbone to MVC is routing. URL rewriting and routing difference?

Because it is GET enabled, it is REST enabled, SEO supported Static table is provided by MVC called RouteTable. RoutingReistry. ASP.NET adds an entry to this registry Routes is a static property on RouteTable static class. Routing APIs support is given only in IIS7 and upwards. Representational State Trasfer. A mechanism of accessing resources from server a s a URL. You can unit test the controller itself. MVC is unit testable. UI components can also be unit tested. With MVC there is better control over HTML rendered to the browser. Thus can be optimized for browsers. Easy to leverage HTML 5 JQuery, YUI, AmazonUI JQuery will be used for Ajax from client side in MVC There is no concept like controls. There is no events or viewstate in MVC. There is no life cycle. Partial View is the equivalent for re-usable components. A layout page is similar to the master page. The names have changed because you will apply the old things also the same way in the new MVC approach. There is a method called RenderHTML (provide partial view) A layout has to be chosen at runtime. That way we can change the layout based on geographics There are options to create layout and content pages Support for strongly typed views. If the view is aware of the model, then it is called Strongly Typed View support HTMLHelpers are to be used as much as possible. We can extend them also AjaxHelper, URLHelper are supported by MVC Non-functional capabilities can be added to the controllers using filters All UI validations should be done outside of the controller. ASP.NET MVC supports 4 types of filter. Before the action is executed, after -> Action Filters Before the result is processed, after -> Result Filter Exception Filter Authorization Filter

Model Binder. TempData is a new feature with MVC3.Calling a controller from a view is called ChildAction ChildActionOutput Cacheing is supported by MVC3. One's out put is the input to other Logging is supported in Action Filter Security Support .0 uses a new feature called "Dynamic". This is the way to use it. We can come with a provider for preparing the model also Able to extend anything. Need to research. RouteData. Server side/ Client side ValueProvider. In what ever order the filter s are added. thay are executed in the same order. This has to be done explicitly. Ex. ViewBag is the new data dictionary given in MVC 3 ViewBag. (This is JQuery enabled server side validation) There is a new concept called ModelMetaData provider in MVC3. This is required because if a controller has to be passed a certain type (like Interface) then there should be some way to associate the i nterface implementing class which is done by IoC. ChildAction . that means viewdata di ctionary is created. . That means part of the output from a view can be cached. This is the fragment cacheing. SOAP components are used for preparing the model from request object. This is like a pipe line based processing. You can customize this tempdata using customdataprovider. To test if the customer id entered by the user exists in the database or not . the n the view data or viewbag created by the first controller is lost. FormInput Data. We can b uild our own controller factory MVC controller is stateles (no session) C# 4. For every request ViewData or viewbag Context is created. There is a provison to keep the data.Membership and Role provider can be leveraged for authenticat ion and authorization in MVC A controller checks the validity of the model using IsModelValid Model validation support. If a controller's action redirects to another controller and another action.Name = "ABCD". In this a JQuery is s ent to the client which will call the server side controller's action method. This supports addi ng dynamic extra information to models. MVC 3 takes advantage of Dependency Injection and IoC using a component called D ependency Resolver. By default MVC uses reflection to create an instance of the controller. This uses the session itself but the object is marked for deletion when the data is retrieved. In this compiler does not infer the type during compilation. MVC3 has a new type of validation called RemoteValidation. Customization is easy. ViewData is a dictionary that can be used in controller and view. Plugability is easy We can also write our own view engine.Filters implement chain of responsibility pattern.

GlobalFilters are available in global. AntiForgeryToken is a new feature in MVC3 to prevent CSRF (Cross Site Request Fo rgery attacks). This can get updated version of the components.MVC3 provides a new library called Anti XSS Library.Web. (1) ViewResult (2) Non-ViewResult. This helps to add general purpose filter to all c ontroller actions.cshtml file has the layout to follow for all the view pages.cs file inside RegisterGlobalFilters method FilterProvider support to choose filters at runtime. Or it can inherit from controller class All the public non-static methods in the controller are callable from the browse r. Take the form information (where the submit happens) from some other site and create a small JS code and submit it in a loop. NuGet is a new feature in MVC3. Front controller calls the controller activator which uses reflection to create an instance of our controller by passing the context of the request object.cshtml has all the details about how to apply the default layout for all the views By Default razor views are compiled into classes that inherit from System.Mv c. If your class is inheriting from IController. This is visible from web. then that method has to be called as ABCD only and not the exact method name.config: This file is located at the project level.config located inside views folder _Layout.2nd time hearing to video tutorial default() .to be understood . then it is called CustomController .cshtm l is used for displaying any errors that occure during page execution Packages. NuGet deployment support is provided with MVC3.WebViewPage.confi g file. In this you can only encode the javascript/vbscript / HTML Cross Site Request Forgery (CSRF): Example. Error. When ever we aded NuGet reference then that entry is added in the packages. GlobalFilters Filter provider. If you want a public method but cannot be called then it has to be decorated with [NonAction] If we add the attribute ActionName = "ABCD" to a public non static method inside a controller class.asax. Produci ng JSON output is a non view result --------------. _ViewStart. There are two types of action result. This can be prevented in MVC3 ba sed on tokens.

NET MVC ValueProvider. .to be understood Best practices How to have sub folders inside areas.When the data is read from this structure. One way is to remove the constraint inside the web. Before the action is executed 2. ModelBinder -. then the data is deleted. Membership provider and Role provider can be leveraged as is in ASP. MVC supports 4 types of filters. security .net thread and works in the background thread ModelMetaData .These components are used for preparing the model from the collection Asynchronous Controllers are like ajax on the server side.Compiler does not worry about the type ViewBag is a dynamic object TempData . 1.scafolding .config urlhelper htmlhelper ajaxhelper viewhelper Filters are used for adding non-functional features like Authorization. Post the action has occurred Action Filters Result Filters Exception Filters Authorization Filters Filters implement the chain of responsibility pattern To support logging we have to use Action Filter. logging etc. They give back the as p.config transformations How would deploy a MVC application Unique features of MVC 3 ----------------------Razor view Session Stateless controller Dynamic programming .This is like adding additional information like validation to th e model class ViewTemplate for the models ChildAction is for displaying some other controller's action method in another c ontrollers's view Output and fragment cacheing are supported in controllers and actions Cross Site scripting/ simplified html encoding web.

This passes a c ontext called controllercontext as a property.) Global Filters Filter Provider .For performing ChildAction. So we can call this in out controller like this. . only javascript etc.To generate some JQuery that would call some other controll er's action (Ajax enabled server side validation) ModelMetaData Provider Anti XSS Library (Encode only vbscript.This would apply to all the controllers' action s Filter Providers support to choose filtes at runtime nuGet Support (minifier is a package for js minification) ControllerActivator -. we can save the data from controller1. action1 and access it in controller2. It is called ChildAction Output cacheing support Remote Validation -.Context.Uses reflection to create our controller.Current etc. action2 Custom TempData provider Dependency Resolver will be used with IoC and Dependency Injection Fragment cacheing is supported.