If you can't read please download the document
Monorail Introduction
Embed Size (px)
DESCRIPTION
Showing Monorail functionality with a sample application. Uses Castle Active Record and windsor integration.
Citation preview
- 1. An Introduction to Monorail.
-
- An Open Source MVCframework
2. Monorail
- Convention over configuration
3. What am I showing
- 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 areseparate
componentstheywork nicely together.
4. How Monorail works 5. Build it and they will learn it?
- User can follow other users
6. Model
- Convention over Configuration
- Default set of operations
- Works on top of Nhibernate
- You donthaveto use ActiveRecord.
- Lets look at thecodefor themodel
* * * 7. Controller
- Orchestrates the application flow.
- Convention is Controller ( ieHomeController)
8. Actions
- Corresponds to methods in the controller.
- Corresponding view (in Views//) Can be changed
- Example:/Login/Login.rails
9. Layouts & Rescues
-
- Not mandatory, use as template.
- Rescues. To Handle exceptions
10. SmartDispatcherController
- Databinding. Parameters as strongly typed objects
11. Controller
-
- Executed Before or after an action
-
- Normally used for Authentication, logging
-
- Associated with a controller
12. Controller
-
- 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
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.
-
- 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
-
- Others (contributed by Users)
- Layouts. Template views that define the layout
22. Deployment
- 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)
-
- Checkhttp://delicious.com/monorail_talkfor 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
websitehttp://roundcrisis.com
-
- www.delicious.com/Monorail_talk