ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Monorail (.Net) - Wikipedia, the free encyclopedia

Monorail (.Net)

From Wikipedia, the free encyclopedia

Castle Project:MonoRail
Developed by Castle Stronghold
Latest release 1.0 Release Candidate 3 / September 20th, 2007
OS Cross-platform
Genre Application framework
License Apache 2.0
Website castleproject.org

MonoRail, a component of the Castle Project, is an open source web application framework built on top of the ASP.NET platform. Inspired by Ruby on Rails Action Pack[1], MonoRail differs from standard ASP.NET WebForms development by enforcing separation of concerns using a model-view-controller (MVC) architecture.[1] The framework is commonly used in conjunction with Castle ActiveRecord, an ORM layer built on NHibernate.

Although the project's name is MonoRail, it does not have any affiliation with the Mono project.

Contents

[edit] How it works

The framework maps web requests to an "action", which is a regular .NET method on the controller. The controller is responsible for invoking business services and controlling the application's flow. When it is time to send the web response to the client, the controller sets a view template to be rendered, putting data in a special dictionary object known as the "Property Bag", and delegates the template rendering to a view engine.

The view engine renders the template into the response stream utilizing the data in the property bag given by the controller. At this stage the view cannot access any other layer of the application, isolating the view from the application logic.

[edit] View engines

The mainstream view engine used in MonoRail is NVelocity, based on the Apache Velocity library. NVelocity is supplied with simple control blocks such as if statements and foreach loops. The NVelocity view templates are text files with the extension '.vm'.

Other View Engines in use:

  • Brail, based on the Boo language. Being a .NET language, the Brail view engine has stronger capabilities, as the view programmer can use the Base Class Library methods. However, power comes with its price, as it opens the possibility to do too much in the view, leaving some responsibility for Separation of concerns in the hands of the programmer. The view templates are text files with the extension '.brail'.
  • AspView, a view engine that uses C# as its scripting language, and uses a pre-compiled approach, where all the views are pre-compiled to a .NET Assembly prior to deployment. The view templates are text files with the extension '.aspx'.
  • WebForms ViewEngine lets you use some of the power of WebForms in your MonoRail applications. The use of the WebForms view engine is quite sparse, and is only recommended for a migration phase from an existing WebForms application to a MonoRail application. The view templates are text files with the extension '.aspx'.
  • StringTemplate is the most strict view engine in terms of MVC. It supplies the developer very little power, however enforcing the MVC separation very strictly.

[edit] Other View Engines

Building other view engines is quite simple and straightforward. Brail, StringTemplate and AspView were all created by independent developers to suit their own needs.



[edit] Resources

[edit] Blogs on MonoRail

[edit] References

  1. ^ InfoQ: Catching up with the Castle Project. Retrieved on 13 Sept 2007.


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -