Monorail Introduction

  • 2,464 views
Uploaded on

Showing Monorail functionality with a sample application. …

Showing Monorail functionality with a sample application.
Uses Castle Active Record and windsor integration.

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,464
On Slideshare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
69
Comments
0
Likes
0

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. An Introduction to Monorail.
      • Andrea Magnorsky
      • An Open Source MVC framework
  • 2. Monorail
    • Open Source
    • MVC on top of Asp.Net
    • Separation of Concerns
    • Mature
    • Convention over configuration
  • 3. What am I showing
    • Monorail: MVC framework
    • With a model implemented using Active Record
    • With Windsor integration. Windsor is an inversion of control container.
    • Using Nvelocity as a view engine.
    • Why am I showing all this? Because although they are separate components they work nicely together.
  • 4. How Monorail works
  • 5. Build it and they will learn it?
    • Twitter App
    • User can send Updates
    • User can follow other users
    • Lets see the Demo
  • 6. Model
    • Uses Active Record
    • Convention over Configuration
    • Default set of operations
    • Works on top of Nhibernate
    • You dont have to use ActiveRecord.
    • Lets look at the code for the model
    * * *
  • 7. Controller
    • Orchestrates the application flow.
    • Convention is <name>Controller ( ie HomeController)
  • 8. Actions
    • Corresponds to methods in the controller.
    • Corresponding view (in Views/<controller name>/<action name>) Can be changed
    • Example: /Login/Login.rails
  • 9. Layouts & Rescues
    • Layouts.
      • Not mandatory, use as template.
      • In Views/Layouts
    • Rescues. To Handle exceptions
  • 10. SmartDispatcherController
    • Databinding. Parameters as strongly typed objects
  • 11. Controller
    • Filters.
      • Executed Before or after an action
      • Normally used for Authentication, logging
      • Associated with a controller
  • 12. Controller
    • Helpers
      • Associated with controller. Available in the view.
      • There are many helpers. (FormHelper, UrlHelper)
      • You can create your custom Helper
  • 13. PropertyBag
    • The standard way to pass information from the controller to the view
    • Not Strongly Typed
  • 14. Flash
    • A way to persist information between requests
    • Normally used to retrieve information about an operation to a user, for example on error.
  • 15. Windsor Integration
    • Windsor is an Inversion of Control (IoC) container.
      • Promotes loose coupling
      • Makes you write small classes that have a well defined responsibility.
    • Without the integration you can use windsor (or other IoC) for services, but its more coupled.
    • Without it, controllers coupled to services and possibly IoC container
  • 16. Windsor Integration
  • 17. Windsor Integration
  • 18. Windsor Integration
  • 19. Windsor Integration
  • 20. Controller Testing
    • Careful you don't test the framework
    • Controllers should be skinny
  • 21. Views
    • View Engines
      • Nvelocity
      • Brail
      • AspView
      • Others (contributed by Users)
    • Layouts. Template views that define the layout
    • Rescues
  • 22. Deployment
    • IIS
    • Cassini (only for early development )
    • Monorail can be run on Mono via Apache
    • Some Tweaking normally required
    • Monorail applications can also be run on the cloud (like EC2 instances)
      • Check http://delicious.com/monorail_talk for more info on how to do this
  • 23. Thanks Links and Q&A
    • Thanks to my friend and colleague Andrew Smith for his help and Advice on this presentation.
    • Questions? You can contact me through my website http://roundcrisis.com
    • Links:
      • http://castleproject.org
      • www.delicious.com/Monorail_talk