• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
 

Monorail presentation at WebDevelopersCommunity, Feb 1, 2009

on

  • 1,995 views

A presentation describing Castle Monorail, the MVC framework for ASP.NET from Castle project....

A presentation describing Castle Monorail, the MVC framework for ASP.NET from Castle project.

Given at Microsoft offices in Ra'anana, Israel, on Feb 2nd, 2009, for the Web Developers Community (WDC), by Ken Egozi, project lead of Monorail

Statistics

Views

Total Views
1,995
Views on SlideShare
1,995
Embed Views
0

Actions

Likes
1
Downloads
50
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Monorail presentation at WebDevelopersCommunity, Feb 1, 2009 Monorail presentation at WebDevelopersCommunity, Feb 1, 2009 Presentation Transcript

    • Monorail Complex Lifecycle MVC SoC IoC integration Unneeded Abstraction HTTP
    • About Me
      • Ken Egozi
      • BASIC > C > Turbo Pascal > VB > WebForms > RoR > Monorail
      • Blogs at http://www.kenegozi.com/blog/
      • Have created AspView, the C# View Engine for Monorail
      • Participates in Open Source projects, mainly Castle Project
    • FindControl(“tblData”).Rows[3].Cells[2].Text = … int age; var succeed = int.TryParse(txtAge.text, out age);
    • The web is simple
      • URLs have meaning – R for *Resource*
        • /item?id=32 refers to the item with id=32
        • /items?category=boots&page=2 refers to the second page of items, which belongs to ‘boots’ category
        • /boots/items/2, /item/32 same things
    • The web is simple
      • Request parameters:
        • Within the URL ( http://server/path?query )
        • Within the request body
        • The format for request parameters is: name1=value1 & name2=value2
        • Arrays can be passed using
        • name=value1 & name=value2 …
    • The web is simple
      • Common types of requests (http verbs)
        • GET  Retrieve data from a server. The data is identified by URL.
        • POST  Sending data to a server for storage or processing
    • The web is simple
      • Common response codes
        • 2xx  Success 200 (OK), 201 (Created)
        • 3xx  Redirects 301 (Moved), 307 (Temporarily redirected)
        • 4xx  Errors 404 (Not found)
        • 5xx  Server errors 500 (General error), 503 (Unavailable)
    •  
    • Monorail is a …
      • MVC Web Framework
        • Open source, with a thriving community
          • Built by the framework users
        • Built on top of ASP.NET
          • Caching
          • Session Management
          • Authorisation
          • Authentication
          • Http Modules
          • etc.
        • Mature, running many websites all around
    • Core Principles:
      • Simple
      • Maintainable
      • Convention over Configuration
      • Less code (as in: Less code, not as in: *.generated.cs) ‏
      • Testable, TDD friendly
    •  
    • Monorail Lingua
      • Action
        • corresponds to a group of resources (vary by query/form) In code: a plain old .NET method
      • Controller
        • A logical group of actions In code: a .NET class which implements IController
      public void Login(string username, string password) { } public class UsersController : SmartDispatcherController { }
    • Monorail Lingua
      • View
        • A template for rendering markup to be sent to the client.
      • Layout
        • A view that acts as a container for the rendered view
    • Monorail Lingua
      • Sub View
        • A view that will be rendered within another view.
      • View Component
        • A component that can encapsulate presentational logic and view processing. Can have several views associated with it
    • Simple “ Hard work” Business decisions DB access Web Service Controller String manipulations View Common logic Filter Common logic Filter Page’s code-behind Page’s Markup Control’s code-behind Control’s Markup WebForms MonoRail
    • MVC
      • Sequence
      View Controller Model GET Load() ‏ Render HTTP POST Update() ‏ Redirect Load() ‏ Render HTTP
    • Conventions
      • URL  Action
      http://www.my-cool-domain.com/post/show.aspx?id=2 Nothing new Controller Action Aspnet_isapi.dll Nothing new
    • Conventions
      • URL  Action
      http://www.my-cool-domain.com/post/show.aspx?id=2
    •  
    • Monorail vs. Webforms Impossible Easy View testing hacks/SOAP/.ashx Simple, REST like API Single huge form, viewstate, POST All aspect (VERBS, Multiple forms) ‏ HTTP/HTML __VIEWSTATE field in the form Easily (OSS), Conventions Extensible Complex Simple Lifecycle Everything is .Text Values, Classes Databinding Can be added Baked in, Simple conventions MVC WebForms Monorail
    • FUD
      • Cannot Use Third-Party CustomControls?
        • It’s easier to squeeze the designer’s markup into a foreach/if-else than into an OnItemDataBound
        • Can use Third-Party DHTML/JS client libraries
      • How Do I Hire Developers?
        • Decent WebForms developers should grasp the principles quickly
        • You actually gain access to seasoned PHP/RoR/ASP/ developers
        • There’s a learning curve anyway
    • View Engines
      • Official view engines:
        • Brail
        • AspView
        • NVelocity
      • Contributed view engines:
        • Xslt
        • StringTemplate
        • NHaml
    • Project Status
      • Version 1.0 is nearly out of the door
      • What’s missing?
        • Docs,
        • Samples,
        • Better Visual Studio integration
      • Can you help with that?
    • How To Get Monorail
      • Castle Official Releases
        • Pro:
          • Official
          • Documentation
          • Stable
          • Wizards
        • Cons:
          • Not cutting edge
      • A new release will be available in the near future
    • How To Get Monorail
      • Build Server
        • Pro:
          • Stable enough ‏
          • Cutting edge
        • Cons:
          • No wizards
          • Compilation target: Debug
    • How To Get Monorail
      • Build Yourself
        • Pro:
          • Cutting edge
          • Build options (Release? 1.1? Mono? Medium-Trust?) ‏
          • Apache license => can be tailored
          • Patches get applied => worldwide professional recognition
        • Cons:
          • Need tools (Subversion, NAnt) ‏
          • Must find a stable revision
    • Monorail vs. ASP.NET MVC
      • Both are great, and better than Webforms
      • ASP.NET MVC’s major pros:
        • Larger user community
        • Official support ?
      • Monorail’s major pros:
        • Mature
        • Built by the framework users
        • Open source with permissive license
        • WAY cooler …
    • Links
      • Website: http://www.castleproject.org
      • Mailing list: [email_address]
      • Wiki: http://using.castleproject.org/display/CASTLE/Home
    • Links
      • Blogs:
      • http://hammett.castleproject.org
      • http://ayende.com/Blog
      • http://www.kenegozi.com/blog
      • http://benl.wordpress.com
      • http://devlicio.us/blogs/mike_nichols
      • http://andypike.wordpress.com
      • http://jonorossi.com/blog