Dashboard > MonoRail > Home
Log In   View a printable version of the current page.
Home
Added by Administrator, last edited by Maikel Willemse on Feb 13, 2010  (view change)
Labels: 
(None)


Castle MonoRail

 
Recently Updated
by Maikel Willemse (13 Feb)
Home
by Krzysztof Kozmic (03 Jan)
Monorail Visual Studio integration

Recipes and How tos

Controllers

Filters

View engines

Views

Ajax

Basic

Advanced

CRUDs

CRUD stands for Create, Read, Update, Delete.
The rationale behind CRUD is that a website needs to Create records, Read records, Update records or Delete records.
CRUD operations are implemented in your controller.

One way to implement CRUD in your web application specifically is to use RESTful* design. REST stands for Representational State Transfer.

REST is a design that treats your web resources using standard HTTP methods GET, POST, PUT and DELETE.

So for example URL:
http://www.company.com/products/list
is broken down into a resource part: http://www.company.com/products
and an action "list", which is basically a GET method.

Similarly
http://www.company.com/products/edit/1
is broken down into a resource part: http://www.company.com/products
and an action: edit
with an argument id of the product: 1

There are some generators that create a Controller class for you with all the basic CRUD method stubs, but you can also create them on your own.
The minimum set of methods needed to implement RESTful deisng CRUD is:

  • index
    GET request
    URL example: /products/index.rails
    lists all your models (i.e. retrieves all the products in the database)
  • show
    GET request
    URL example: /products/show.rails?id=1
    display a particular model
  • new
    GET request
    URL example: /products/new
    renders a form for creation of the new product (for example renders a New Product form)
  • create
    PUT request
    URL example: /products/create/?title=NewProduct&description=ThisIsDescription
    creates an actual model from the forms submission rendered by new action
  • edit
    GET request
    URL example: /products/new/?id=1
    renders an edit view for a particular product
  • update
    PUT request
    URL example: /products/edit/?id=1&?title=NewProduct&description=ThisIsDescription
    updates a model based on the data provided in the submitted form (rendered by edit action)
  • destroy
    DELETE request
    URL example: /products/destroy/?id=1
    destroys a model with a given id

REST in Ruby On Rails paper http://www.b-simple.de/download/restful_rails_en.pdf

Samples

See Samples & tutorials

Discussions

What do your controllers look like?

Ideas for Castle.NVelocity

Requests for documentation, samples, etc.

New style documentation

Blog posts

Screencasts

Podcasts

Other

MonoRail and WebForms

MonoRail vs Web Client Software Factory (WCSF)

Site running on a free Atlassian Confluence Community License granted to Castle Project. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators