The document provides an overview of the MVC pattern and ASP.NET MVC framework. It discusses that MVC separates an application into three components: the model, the view, and the controller. It then describes how ASP.NET MVC uses the MVC pattern and some of its key aspects, including controllers, views, routing, and extensibility points. The document aims to provide a high-level introduction to ASP.NET MVC.
Struts is an open source MVC framework that makes it easier to develop and maintain Java web applications by providing common functionality out of the box and enforcing standardized patterns, reducing the need to write boilerplate code and helping developers focus on business logic. The framework handles common tasks like request processing, validation, and view resolution while providing features like tag libraries, internationalization support, and annotation-based configuration. Struts uses the model-view-controller architectural pattern and is based on technologies like servlets, JSPs, and Java beans.
Mvc interview questions deep dive jinal desaijinaldesailive
油
Can you describe ASP.NET MVC Request Life Cycle? 1. Receive request, look up Route object in RouteTable collection and create RouteData object. 2. Create RequestContext instance. 3. Create MvcHandler and pass RequestContext to handler. 4. Identify IControllerFactory from RequestContext. 5. Create instance of class that implements ControllerBase. 6. Call MyController.Execute method. 7. The ControllerActionInvoker determines which action to invoke on the controller and executes the action on the controller, which results in calling the model and returning a view.
Struts 2 is an MVC framework that is the successor to Struts and WebWork 2, providing a simple architecture based around interceptors, actions, and results with conventions over configuration and support for technologies like Spring, Velocity, and Ajax. It aims to bring the best of Struts 1 and WebWork 2 together while being easier to test and use through defaults and annotations. The framework can integrate with many open source libraries and supports features like localization, type conversion, and configuration through XML files and annotations.
The document provides an overview of ASP.NET MVC, including its core components and how they differ from ASP.NET Web Forms. It discusses Models, Views, Controllers, validation, routing, unit testing, and view engines. Key points covered include MVC separating application logic, control over HTML, testability, and no viewstate or postbacks. Examples are provided for creating controllers and actions, passing data to views, validation, routing, and unit testing.
The document provides an introduction to the Struts 2 framework. It outlines the course objectives, which include learning about Struts 2 features and architecture, the MVC pattern, and building a "Hello World" Struts 2 application. The key topics covered are that Struts 2 is an MVC framework, its features include POJO-based actions and integration support for other frameworks, and it provides classes that simplify building MVC web applications according to the Model-View-Controller pattern.
Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
The document provides an overview of Struts, a Java web framework that follows the model-view-controller (MVC) architecture. It discusses the core Struts components like the ActionServlet, action mappings in struts-config.xml, action classes, and form beans. It also provides steps to build a basic Struts application with a login page, and shows how to convert a regular JSP page to use Struts tags.
This document provides an overview of the Spray toolkit for building REST/HTTP services in Scala. It discusses what Spray is, why we use it, Spray application architecture including the Spray-can HTTP server and Spray routing. It also covers topics like directives, parameters, marshalling, unmarshalling and testing Spray applications using the Spray test kit.
Struts 2 complete ppt including most of the topics such as architecure of Struts2, Action Interface, ActionSupport , Aware Interfaces, Namespace,Multiple mapping files, Dynamic Method Invocation , OGNL, valueStack, Control tags, UI tags, Interceptors, validation framework, Struts2 Type Conversion,Internationalization (i18n) support
This document provides an overview of ASP.net MVC, including what MVC is, how ASP.net MVC request execution works, details on controllers, routing, application development, differences from web forms, and when to use MVC. It describes MVC as separating applications into models, views, and controllers, and how ASP.net MVC implements the MVC pattern with controllers handling user input and selecting views. Request processing and controller lifecycles are also summarized at a high level.
Struts2.x is a MVC framework that implements the MVC pattern using Java technologies. It divides an application into model, view, and controller components. The model are Java classes that represent the application's data and business logic. Views are JSP pages that represent the user interface. The controller is a servlet filter that routes requests to actions and returns the appropriate view. Struts provides tags and libraries that make building MVC web apps with features like validation easier compared to plain JSP/Servlet programming.
The document is a presentation on ASP.NET MVC. It provides an overview of ASP.NET MVC, including that it is a new presentation option for ASP.NET that allows for simpler programming, easier testing, and more control over HTML and URLs. It then demonstrates building a simple ASP.NET MVC application and unit testing controllers. It concludes by discussing factors to consider when choosing between ASP.NET WebForms and MVC.
The document discusses the MVC framework, describing the model, view, and controller components. The model handles business logic and data access, the view handles the user interface, and the controller coordinates communication between the model and view. It also covers how data is passed between these components, the use of ViewData and ViewBag to store data, Razor syntax for combining C# and HTML in views, and how to create and call partial views.
Spring MVC is the web component of the Spring framework. It follows the MVC pattern with controllers handling requests and generating models for views to display. Spring MVC supports annotations for mapping requests to controller methods and binding request parameters to Java objects. It provides validation, internationalization, and AJAX support through integration with other libraries. Common view technologies like JSP are supported through tags that integrate with Spring MVC.
This broadly covers Introduction to MVC , What is MVC1 and MVC2 , Struts 1 (Use of MVC) , Struts 2 Introduction & Difference between Struts 1 and Struts 2.
The document discusses unit testing for Silverlight applications. It provides an overview of model-view-viewmodel (MVVM) patterns, and examples of writing unit tests for a Silverlight application using the StatLight testing framework. Examples include tests for view models, models, and data services using common unit testing assertions and attributes.
The document discusses ASP.NET MVC framework concepts including:
- MVC architecture divides applications into models, views, and controllers. Models manage state, views display UI, and controllers handle user input and choose views.
- Advantages of MVC include clean separation of concerns, testable UI, reuse of views/models, and organized code.
- The Razor view engine renders HTML from dynamic server-side code using a specially designed parser.
- ASP.NET MVC classes are in the System.Web.Mvc namespace which contains controllers, views, and other core classes.
Real-world Model-View-ViewModel for WPFPaul Stovell
油
際際滷s from a talk I gave at the DeveloperDeveloperDeveloper Sydney event. I introduce the MVVM pattern by refactoring some existing code to use MVVM, introduce commands, add some unit tests, then describe the pattern in detail.
The document describes the Spring MVC flow as:
1. A request is received by the DispatcherServlet front controller.
2. The DispatcherServlet uses the HandlerMapping to determine the associated controller and transfers the request.
3. The controller processes the request and returns a ModelAndView containing model data and view name.
The document discusses the Model-View-Controller (MVC) design pattern. MVC separates an application's logic into three main components: the model, the view, and the controller. The model manages the application's data and logic, the view displays the data to the user, and the controller interprets user input and updates the model. MVC improves separation of concerns and makes applications more modular, extensible, and testable. It is commonly used for web applications, where the server handles the model and controller logic while the client handles the view.
The document discusses the Struts framework, including its advantages in solving software development challenges through reusable components. It describes the Model-View-Controller architecture that Struts uses, with the controller directing requests to models for data and views for presentation. Key aspects of Struts like configuration files, actions, forms, tags and internationalization are explained at a high level.
The document provides an introduction to ASP.NET MVC architecture. It discusses the key components of MVC - the model, view and controller. The model handles the data and logic, the view displays the UI, and the controller coordinates between them. It also covers MVC conventions like controller and view directories, and compares ASP.NET MVC to Web Forms.
This presentation is foucsed on Introduction to MVC. Aimed at .NET developers that are total beginners in the Web Applications world and want to get started using familiar Microsoft .NET technologies.
For the existing ASP.NET web form user this slides provides and idea about what are the advatages of using MVC, tradeoffs between MVC and Web Forms.
This document provides an agenda and overview for a two-day Beginning AngularJS workshop taking place on June 13-14, 2015. The instructor is Troy Miles, who has over 35 years of programming experience.
Day one will cover AngularJS introduction and tools, building a To Do app, testing, animation, services, controllers, filters, and more. Day two will focus on deployment, providers, building a contacts app, HTTP requests, testing AJAX calls, using Firebase, custom directives, and a wrap-up.
The document includes code examples and outlines several hands-on labs for attendees to complete, such as setting up their environment, two-way data binding, and building an expanded contacts
The document provides an overview and agenda for a presentation on Struts 2, covering key topics such as configuration, actions, interceptors, results, tag libraries, and validation. Struts 2 is an open source MVC web framework that aims to improve developer productivity through features like convention over configuration, plug-in architecture, and reusable tag libraries. The presentation discusses Struts 2 concepts like the request pipeline, value stack, OGNL expressions, and type conversions that allow dynamic data handling.
This document summarizes the basics of Spring MVC, including the model-view-controller (MVC) pattern it uses. It describes the main components - the model which contains application data, the view which displays data to the user, and the controller which handles requests and coordinates the model and view. It provides examples of how controllers work using annotations like @RequestMapping and how they can return different types of responses. It also briefly mentions other related concepts like interceptors, exceptions, and static resources.
ASP.NET MVC is an open source web framework that provides separation of concerns, testability and extensibility. It uses routing to map URLs to controller actions and dependency injection to create controllers. Controllers execute actions that return view or other results. Filters provide cross-cutting concerns like authorization in a clean, reusable way.
ASP.NET MVC is an open source web framework that provides separation of concerns, testability and extensibility. It uses routing to map URLs to controller actions and dependency injection to create controllers. Controllers execute actions that return view or other results. Filters provide cross-cutting concerns like authorization in a clean, reusable way.
Struts 2 complete ppt including most of the topics such as architecure of Struts2, Action Interface, ActionSupport , Aware Interfaces, Namespace,Multiple mapping files, Dynamic Method Invocation , OGNL, valueStack, Control tags, UI tags, Interceptors, validation framework, Struts2 Type Conversion,Internationalization (i18n) support
This document provides an overview of ASP.net MVC, including what MVC is, how ASP.net MVC request execution works, details on controllers, routing, application development, differences from web forms, and when to use MVC. It describes MVC as separating applications into models, views, and controllers, and how ASP.net MVC implements the MVC pattern with controllers handling user input and selecting views. Request processing and controller lifecycles are also summarized at a high level.
Struts2.x is a MVC framework that implements the MVC pattern using Java technologies. It divides an application into model, view, and controller components. The model are Java classes that represent the application's data and business logic. Views are JSP pages that represent the user interface. The controller is a servlet filter that routes requests to actions and returns the appropriate view. Struts provides tags and libraries that make building MVC web apps with features like validation easier compared to plain JSP/Servlet programming.
The document is a presentation on ASP.NET MVC. It provides an overview of ASP.NET MVC, including that it is a new presentation option for ASP.NET that allows for simpler programming, easier testing, and more control over HTML and URLs. It then demonstrates building a simple ASP.NET MVC application and unit testing controllers. It concludes by discussing factors to consider when choosing between ASP.NET WebForms and MVC.
The document discusses the MVC framework, describing the model, view, and controller components. The model handles business logic and data access, the view handles the user interface, and the controller coordinates communication between the model and view. It also covers how data is passed between these components, the use of ViewData and ViewBag to store data, Razor syntax for combining C# and HTML in views, and how to create and call partial views.
Spring MVC is the web component of the Spring framework. It follows the MVC pattern with controllers handling requests and generating models for views to display. Spring MVC supports annotations for mapping requests to controller methods and binding request parameters to Java objects. It provides validation, internationalization, and AJAX support through integration with other libraries. Common view technologies like JSP are supported through tags that integrate with Spring MVC.
This broadly covers Introduction to MVC , What is MVC1 and MVC2 , Struts 1 (Use of MVC) , Struts 2 Introduction & Difference between Struts 1 and Struts 2.
The document discusses unit testing for Silverlight applications. It provides an overview of model-view-viewmodel (MVVM) patterns, and examples of writing unit tests for a Silverlight application using the StatLight testing framework. Examples include tests for view models, models, and data services using common unit testing assertions and attributes.
The document discusses ASP.NET MVC framework concepts including:
- MVC architecture divides applications into models, views, and controllers. Models manage state, views display UI, and controllers handle user input and choose views.
- Advantages of MVC include clean separation of concerns, testable UI, reuse of views/models, and organized code.
- The Razor view engine renders HTML from dynamic server-side code using a specially designed parser.
- ASP.NET MVC classes are in the System.Web.Mvc namespace which contains controllers, views, and other core classes.
Real-world Model-View-ViewModel for WPFPaul Stovell
油
際際滷s from a talk I gave at the DeveloperDeveloperDeveloper Sydney event. I introduce the MVVM pattern by refactoring some existing code to use MVVM, introduce commands, add some unit tests, then describe the pattern in detail.
The document describes the Spring MVC flow as:
1. A request is received by the DispatcherServlet front controller.
2. The DispatcherServlet uses the HandlerMapping to determine the associated controller and transfers the request.
3. The controller processes the request and returns a ModelAndView containing model data and view name.
The document discusses the Model-View-Controller (MVC) design pattern. MVC separates an application's logic into three main components: the model, the view, and the controller. The model manages the application's data and logic, the view displays the data to the user, and the controller interprets user input and updates the model. MVC improves separation of concerns and makes applications more modular, extensible, and testable. It is commonly used for web applications, where the server handles the model and controller logic while the client handles the view.
The document discusses the Struts framework, including its advantages in solving software development challenges through reusable components. It describes the Model-View-Controller architecture that Struts uses, with the controller directing requests to models for data and views for presentation. Key aspects of Struts like configuration files, actions, forms, tags and internationalization are explained at a high level.
The document provides an introduction to ASP.NET MVC architecture. It discusses the key components of MVC - the model, view and controller. The model handles the data and logic, the view displays the UI, and the controller coordinates between them. It also covers MVC conventions like controller and view directories, and compares ASP.NET MVC to Web Forms.
This presentation is foucsed on Introduction to MVC. Aimed at .NET developers that are total beginners in the Web Applications world and want to get started using familiar Microsoft .NET technologies.
For the existing ASP.NET web form user this slides provides and idea about what are the advatages of using MVC, tradeoffs between MVC and Web Forms.
This document provides an agenda and overview for a two-day Beginning AngularJS workshop taking place on June 13-14, 2015. The instructor is Troy Miles, who has over 35 years of programming experience.
Day one will cover AngularJS introduction and tools, building a To Do app, testing, animation, services, controllers, filters, and more. Day two will focus on deployment, providers, building a contacts app, HTTP requests, testing AJAX calls, using Firebase, custom directives, and a wrap-up.
The document includes code examples and outlines several hands-on labs for attendees to complete, such as setting up their environment, two-way data binding, and building an expanded contacts
The document provides an overview and agenda for a presentation on Struts 2, covering key topics such as configuration, actions, interceptors, results, tag libraries, and validation. Struts 2 is an open source MVC web framework that aims to improve developer productivity through features like convention over configuration, plug-in architecture, and reusable tag libraries. The presentation discusses Struts 2 concepts like the request pipeline, value stack, OGNL expressions, and type conversions that allow dynamic data handling.
This document summarizes the basics of Spring MVC, including the model-view-controller (MVC) pattern it uses. It describes the main components - the model which contains application data, the view which displays data to the user, and the controller which handles requests and coordinates the model and view. It provides examples of how controllers work using annotations like @RequestMapping and how they can return different types of responses. It also briefly mentions other related concepts like interceptors, exceptions, and static resources.
ASP.NET MVC is an open source web framework that provides separation of concerns, testability and extensibility. It uses routing to map URLs to controller actions and dependency injection to create controllers. Controllers execute actions that return view or other results. Filters provide cross-cutting concerns like authorization in a clean, reusable way.
ASP.NET MVC is an open source web framework that provides separation of concerns, testability and extensibility. It uses routing to map URLs to controller actions and dependency injection to create controllers. Controllers execute actions that return view or other results. Filters provide cross-cutting concerns like authorization in a clean, reusable way.
This document provides an overview of ASP.NET MVC, including its history and key concepts. It describes the MVC pattern and how ASP.NET MVC implements this pattern. It also discusses ASP.NET MVC's project structure, controllers, actions, views, routing and other core features. Finally, it compares ASP.NET MVC to traditional ASP.NET Web Forms and outlines some benefits and disadvantages of the MVC framework.
This document provides an overview and introduction to ASP.NET MVC 3 training. It discusses the evolution of ASP.NET, key concepts of MVC like models, views, and controllers, how MVC works, and differences between MVC and web forms. The training will build a simple ASP.NET MVC application and cover controllers, models, views, routing, and action results.
- ASP.NET MVC is a framework that enables building web applications using the Model-View-Controller pattern. It provides clear separation of concerns, testability, and fine-grained control over HTML and JavaScript.
- The key components of MVC are models (the data), views (the presentation), and controllers (which handle requests and respond by rendering a view). Controllers retrieve data from models and pass them to views to generate the response.
- ASP.NET MVC supports features like routing, dependency injection, and unit testing to build robust and maintainable web applications. It also maintains backward compatibility with existing ASP.NET technologies.
This document provides an overview of controllers and actions in the MVC framework. It discusses how controllers are responsible for responding to requests, validating actions, and providing data and error handling. It also covers specific controller concepts like ViewData/ViewBag, action attributes, action results, and asynchronous actions.
A simple presentation to understand what is ASP.net MVC4 and its structure.It covers all important features of MVC4 and razor view engine including screenshots
This document introduces AngularJS and how to create a web app with AngularJS and a Web API. It covers key AngularJS concepts like directives, controllers, modules, filters and services. It also discusses how to build a Web API with ASP.NET. The document includes an agenda and demonstrations of building an AngularJS app that interacts with a Web API to add and save data.
The document provides an introduction and overview of ASP.NET MVC, including a comparison to ASP.NET Web Forms. It discusses the model-view-controller pattern, routing, controllers, views and extensibility in ASP.NET MVC. The document also shares resources for learning more about ASP.NET MVC and provides an agenda for covering topics like testing and a real world walkthrough of an ASP.NET MVC application.
This document provides an overview of Asp.Net MVC and how it compares to traditional Asp.Net web forms. Some key points:
- Asp.Net MVC follows the MVC pattern, separating concerns into models, views, and controllers, allowing for cleaner code and easier testing compared to Asp.Net web forms.
- In Asp.Net MVC, controllers handle requests and return action results, views are responsible for the UI, and models represent application data. This separation of concerns is more aligned with HTTP concepts.
- Asp.Net MVC aims to be more flexible, maintainable, and testable than web forms. It allows for tighter control over HTML and adheres to conventions over configurations
ASP.NET MVC is an architectural pattern that separates an application into three main components: the model, the view, and the controller. The MVC pattern decouples these components to allow for independent development and testing. ASP.NET MVC uses this pattern and introduces features like testability, loose coupling, separation of concerns, and clean URL structures. The core components include models for the data, controllers to handle requests and interface with models, and views for generating output. Requests are routed and then handled by the controller, which works with models and returns an action result to the view for output.
The document introduces ASP.NET MVC, which is a framework from Microsoft that builds on the standard ASP.NET engine. It follows the model-view-controller (MVC) pattern to separate application behavior, user interface, and data access. The goals of ASP.NET MVC include testability, friendly URLs, leveraging existing ASP.NET features, and full control of HTML. It also discusses how ASP.NET MVC works, including routing, controllers, actions, and views. Demos are provided for basic routing and controllers as well as models, HTML helpers, forms, and validation.
The document discusses the Model-View-Controller (MVC) pattern and ASP.NET MVC framework. It describes the key components of MVC - the Model, View and Controller. The Controller handles communication from the user, application flow and logic. The Model represents application data and business rules. The View displays the user interface. ASP.NET MVC is an MVC web application framework for ASP.NET that was open sourced by Microsoft. New versions of ASP.NET MVC added features like Razor view engine, model validation, and Web API for building HTTP services.
Developing ASP.NET Applications Using the Model View Controller Patterngoodfriday
油
MVC provides a new web project type for ASP.NET that allows for more control over HTML and a more testable framework. It maintains a clean separation of concerns between models, views, and controllers and allows developers to easily extend or replace any component. MVC supports RESTful URLs, integrates well with existing ASP.NET features, and enables test-driven development through mockable abstractions.
AngularJS is an open-source JavaScript framework for building dynamic web applications. It uses HTML as the template language and allows extending HTML vocabulary for the application. The key concepts covered in the document include modules and dependency injection, data binding using controllers and scopes, services, filters, form validation, directives, and routing. Various AngularJS features like modules, controllers, services, directives etc. are demonstrated via code examples. The document provides an introduction to core AngularJS concepts through explanations, code samples and a demo.
Spring MVC 3.0 Framework
Objective:
1. Introduce Spring MVC Module
2. Learn about Spring MVC Components (Dispatcher, Handler mapping, Controller, View Resolver, View)
際際滷s:
1. What Is Spring?
2. Why use Spring?
3. By the way, just what is MVC?
4. MVC Architecture
5. Spring MVC Architecture
7. Spring MVC Components
8. DispatcherServlet
9. DispatcherServlet Architecture.........
.........................................................
This document provides an overview of ASP.NET MVC architecture and controllers, views, and models. It discusses the MVC pattern and lifecycle of an ASP.NET MVC application. It also summarizes new features in ASP.NET MVC 3, 4, 5, 5.1, and 5.2 such as attribute routing. The document demonstrates creating an ASP.NET MVC 5 application with a controller and view, passing data between them, and using partial views.
One of the best features of ASP.NET MVC is that it's totally extensible: if you don't like the way the framework works or if you have scenarios not covered by it, you can change the behaviors by extending the defaults or by writing your owns.
In this presentation I'll go through all the main extensibility points and explain how to leverage the main ones
AngularJs Workshop SDP December 28th 2014Ran Wahle
油
This document provides an overview and agenda for a training on AngularJS. It introduces key concepts in AngularJS like modules, dependency injection, data binding with controllers and scopes, services, filters, directives, forms, and routing. Code examples are provided to demonstrate creating modules, controllers, services, binding data between the view and model, and using built-in and custom directives. The training will cover building AngularJS applications with a focus on best practices.
2. MVC Pattern What is it?MVC - Acronym for Model/View/ControllerInvented by TrygveReenskaug[1973 - 1978]Originally used as an architectural pattern for GUIs.The first implementation of MVC was as part of Smalltalk-80 class library.
3. MVC Pattern How does it work?The Controller asks the Model for dataThe request hits the controllerModel213ControllerUserThe Model gives the data back to the ControllerThe controller formats the data and passes them to the ViewView45The view renders the HTML that needs to be sent to the client3
4. MVC Pattern Who uses it?.NET has Spring.NET, MonoRailJava has Swing, Struts, Grails and othersPerl has Catalyst, Gantry, Jifty and othersPHP has Zend, Zoop, Agavi and othersPython has Django, Gluon, Pylon and othersRuby has Ruby on RailsApple has cocoa and cocoa touch for objective-c [Mac, iPhone]
17. ASP.NET MVC RoutingURL PatternsSetting Default Values for URL ParametersAdding Constraints to RoutesScenarios When Routing Is Not AppliedHow URLs Are Matched to RoutesAccessing URL Parameters in a Routed PageASP.NET Routing and SecurityASP.NET Routing versus URL Rewriting
20. ASP.NET MVC ControllerController is a class consisting of a set of action methods. Responsible for Handling user interactionWorking with the modelsSelecting a view to renderSending model and information to a particular viewMaking decisions for security, UI, redirects ... etc.The ASP.Net MVC requires the names of all controllers to end with the suffix "Controller e.g. HomeController, LoginController
21. ASP.NET MVC ControllerA controller action always returns an ActionResultWhat if I return an object ??Action return ActionResult which can beViewResult => HTML and markup.
29. FileStreamResult => a downloadable file [with a file stream]. Note: all public methods of a controller class consideredas action methods, if you dont want a public method to be an action, mark it with [NonAction()] attribute
32. ASP.NET MVC ViewResponsible for presentation, look & feel, formatting, sorting etc. Interacts with model but shouldnt make decisions No logic should go thereCode Behind exists but not recommendedNo View State, No Server ControlsHTML HelpersTakes the view data from the controllerCan be strong typed Can be extended by implementing View EnginesAlways build your views !!!
33. An HTML Helper is just a method that returns a string. Html.ActionLink() Html.BeginForm() Html.CheckBox() Html.DropDownList() Html.EndForm() Html.Hidden() Html.ListBox() Html.Password() Html.RadioButton() Html.TextArea() Html.TextBox()e.g.ASP.NET MVC View
36. The default componentsURL Routing:Parses the URL, andinstantiate the MvcHandlerController FactoryTakes URL parameters, create controller via reflectionbased on ControllernameAction InvokerInvokes the actionbased on thename, with the filtersbefore and afterViewEngineWebFormsviewengineTemplateRenders a TextBoxalmostforeverythingHtmlHelperHas a bunch of standardmethods
41. ViewExtensibilityViewEngineThe service thattransforms in HTML the data for the userHtmlHelpersUtility functionsthathideaway the generation of some HTML markup or JavaScript codeClient-sideValidationRulesClient-sidevalidationrulesModelMetadata ProviderRetrieves the metadataneededfor the templatedhelpersCustom TemplatesRenders the html toedit/display specifictypes
43. Custom T4 TemplatesWHAT: Generates View and Controller files DEFAULT: <vsdir>Common7\IDE\ItemTemplates\CSharp\Web\MVC 2\CodeTemplatesWHY: Add your own to generate Views and Controllers based on your needsCopyCodeTemplates folder in you solutionDemo
44. CustomTemplatesWHAT: Renders the html toedit/display specifictypesDEFAULT: Everythingis a label or a textboxWHY: Add your own to customize specific data-typesAdd PartialViews in:/Views/Shared/DisplayTemplates/Views/Shared/EditorTemplatesDemo
45. Server-sideValidationRulesWHAT: Definehow a propertyisvalidated in the server side validationDEFAULT: Required, Length, wrong typeWHY: Add your own rulesWrite a new ValidationAttributeImplement the IsValid methodApply attribute to your modelDemo
46. Client-sideValidationRulesWHAT: Definehow a propertyisvalidated in the client-side validationDEFAULT: Client-sidecounterparts of the default server-side validatorsWHY: Addyourownvalidators
47. Client-sideValidationRulesFirst make a server-side validatorMakevalidationlogic in JavaScriptWriteadaptertopushvalidationrulesto client-sideRegistervalidationfunction via JSRegisteradapter in Global.asaxDemo
48. Base ControllerWHAT: The base class for every ControllerDEFAULT: Default implementation of helper methodsWHY: Extend if you want to enforce you own conventionsOverride ControllerYourcontrollersoverridefromBaseControllerinsteadof ControllerDemo
49. HtmlHelpersWHAT: Utility functions that hide away the generation of HTML markup or JavaScript codeDEFAULT: Html.TextBox, Html.Encode, Html.Partial, WHY: If there is an if, write an HelperAdd new methods as extension methodsDemo