Presentation is loading. Please wait.

Presentation is loading. Please wait.

Model-View-Controller an introduction to MVC design pattern with Castle.MonoRail Presentation: v1.0 Prepared by: Chorn Sokun

Similar presentations


Presentation on theme: "Model-View-Controller an introduction to MVC design pattern with Castle.MonoRail Presentation: v1.0 Prepared by: Chorn Sokun"— Presentation transcript:

1 Model-View-Controller an introduction to MVC design pattern with Castle.MonoRail Presentation: v1.0 Prepared by: Chorn Sokun chornsokun@gmail.comchornsokun@gmail.com Date: 2008/10/04

2 Goal Separation of presentation from model  Easier to modify either UI or underline business rules  Depend on context user can switch between diff. view (html, xml, json etc) Leverage Test-Driven Development  Model testing is easier than UI testing  Model & UI can be test separately

3

4 How It works Model - data & business rules to manipulate the data View – display of model, UI aspect Controller – managing communication between Model and View base on user input UI = View + Controller

5 MonoRail [ http://svn.castleproject.org:8080/svn/castle/trunk ] An open source web application framework built on top of ASP.NET Using MVC architecture Inspired by Ruby on Rails (Helper, Ajax etc) Adapting convention over configuration Enforcing separation of concerns (SoC) Support Multiple view (template engine)  NVelocity – using Velocity template syntax NVelocity  Brail – using boo syntax Brail  AspView – using webform like (.master)

6 Basic MonoRail Setup Required Assemblies  Castle.Core.dll  Castle.MonoRail.Framework.dll  Castle.Components.Common.TemplateEngine.dll  Castle.MonoRail.Views.Brail.dll Standard Application Layout  Views – storing all view template file (.brail,.vm etc) Layouts : master page or site layout Rescues: template for handling errors  Controller – controller classes  static – store images, javascript, css  Models – storing application domain objects

7 References Model View Controller Pattern – best practice software engineering Model View Controller Pattern Model View Controller – wikipedia.org Model View Controller MonoRail (MR) – Castle MonoRail (.Net) MonoRail (MR) http://www.castleproject.org – official castle project website http://www.castleproject.org http://using.castleproject.org – castle project online collaboration wiki. http://using.castleproject.org http://groups.google.com/group/castle-project-devel http://chornsokun.wordpress.com – Tips & Tricks using MonoRail http://chornsokun.wordpress.com


Download ppt "Model-View-Controller an introduction to MVC design pattern with Castle.MonoRail Presentation: v1.0 Prepared by: Chorn Sokun"

Similar presentations


Ads by Google