Your SlideShare is downloading. ×
0
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Monorail presentation at WebDevelopersCommunity, Feb 1, 2009

1,385

Published on

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

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,385
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
52
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Monorail Complex Lifecycle MVC SoC IoC integration Unneeded Abstraction HTTP
  • 2. 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
  • 3. FindControl(“tblData”).Rows[3].Cells[2].Text = … int age; var succeed = int.TryParse(txtAge.text, out age);
  • 4. 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
  • 5. 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 …
  • 6. 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
  • 7. 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)
  • 8.  
  • 9. 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
  • 10. Core Principles:
    • Simple
    • Maintainable
    • Convention over Configuration
    • Less code (as in: Less code, not as in: *.generated.cs) ‏
    • Testable, TDD friendly
  • 11.  
  • 12. 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 { }
  • 13. 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
  • 14. 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
  • 15. 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
  • 16. MVC
    • Sequence
    View Controller Model GET Load() ‏ Render HTTP POST Update() ‏ Redirect Load() ‏ Render HTTP
  • 17. Conventions
    • URL  Action
    http://www.my-cool-domain.com/post/show.aspx?id=2 Nothing new Controller Action Aspnet_isapi.dll Nothing new
  • 18. Conventions
    • URL  Action
    http://www.my-cool-domain.com/post/show.aspx?id=2
  • 19.  
  • 20. 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
  • 21. 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
  • 22. View Engines
    • Official view engines:
      • Brail
      • AspView
      • NVelocity
    • Contributed view engines:
      • Xslt
      • StringTemplate
      • NHaml
  • 23. 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?
  • 24. 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
  • 25. How To Get Monorail
    • Build Server
      • Pro:
        • Stable enough ‏
        • Cutting edge
      • Cons:
        • No wizards
        • Compilation target: Debug
  • 26. 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
  • 27. 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 …
  • 28. Links
    • Website: http://www.castleproject.org
    • Mailing list: [email_address]
    • Wiki: http://using.castleproject.org/display/CASTLE/Home
  • 29. 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

×