introduction to castle monorail mvc framework

Download Introduction to Castle Monorail MVC Framework

If you can't read please download the document

Upload: james-curran

Post on 14-Jun-2015

179 views

Category:

Software


0 download

DESCRIPTION

Presentation I gave to the NYC Alt.Net Meetup on March 24, 2010. Video of the presentation available at: https://vimeo.com/10511943 (part I) https://vimeo.com/10512079 (part II)

TRANSCRIPT

  • 1. 5/13/14 Castle Monorail James M. Curran NYC ALT.Net March 24, 2010

2. 5/13/14 Who the Heck am I? Simple Country Programmer 20+ Years in Software Development Assembler, C, C++, C# Worked in Medical, Financial, Online Retailing and for one company which I'm contractually prevented from discussing (but Steve Bohlen works there now) Microsoft MVP C++ (1994-2004) Currently Itinerant Programmer at Thomson- Reuters Write blog HonestIllusion.com Designer: NJTheater.Com / NJTheater.Org 3. 5/13/14 What is the Castle Project? MicroKernel -A lightweight Inversion of Control container Windsor Enhanced version of MicroKernel ActiveRecord - Enterprise data mapping pattern implemented using NHibernate. Dynamic Proxy Generates light-weight proxies for .NET objects on the fly at runtime. MonoRail A Model-View-Controller framework for web development. 4. 5/13/14 Milestone January 17th 2010 Release of Castle Monorail version ...um... 2.0 ! 5. 5/13/14 Milestone September 17th 2005 Beta 4 released January 1st 2006 RC 1 released November 1st 2006 RC 2 released September 20th 2007 RC 3 released circa September 2008 RC 4 discussed January 17th 2010 Release of Castle Monorail version ...um... 2.0 ! 6. 5/13/14 Am I About to Feel Deja Vu? Monorail is inspired by the Action Pack of Ruby on Rails. ASP.NET MVC is partly inspired by Monorail. 7. 5/13/14 Configuration and Setup A few lines to Copy'n'Paste into web.config It's dull so I won't go into it now. Note, *.rails files must by directed to be processed by ASP.NET in IIS, so talk to your web host. 8. 5/13/14 MVC Basics The Controller handles all business logic. It gathers / generates the data to be displayed. The View handles displaying the data. It's essentially the ASPX / CodeBehind model, but done right. 9. 5/13/14 Basic MonoRail Request http://mysite.com/Home/display.rails?id=5 10. 5/13/14 Basic MonoRail Request http://mysite.com/Home/display.rails?id=5 Framework will run: class HomeController : Controller { public void Display(int id) {...} 11. 5/13/14 Shut up and show the code !! 12. 5/13/14 Layouts == Master pages Rescues == Error pages ViewComponent == WebControls SmartDispatchController JSONBinder / JSONReturnBinder Portable Areas 13. 5/13/14 BreadcrumbViewComponent.cs CaptchaComponent.cs CheckboxListComponent.cs CollapsiblePanelComponent.cs ColumnsComponent.cs DualListComponent.cs GravatarViewComponent.cs GridComponent .cs JavascriptComponent.cs MenuComponent.cs MoreLessTextComponent.cs SmartGridComponent.cs Sample of ViewComponents in CastleContrib