Posts

Showing posts with the label monorail

Memcached for Monorail Update

Memcached for Monorail is a session replacement for the Castle::Monorail framework. It uses memcached on the back end for distributing the session across a web farm. I have added some additional notes about Memcached for Monorail . I have also uploaded a binary release . Although I recommend getting the source . No time to discuss much more but feel free to ask questions and I'll answer them. The Memcached session provider is currently being used in a production environment with great success but it definitely has room for improvement. It's aimed squarely at extending the Castle::Monorail session so if you are looking for something more generic than please look else where...or consider switching to MVC with Castle::Monorail ;-)

Monorail Custom Session Factory for Memcached

Introduction I have written a simple but effective ICustomSessionFactory implementation that uses memcached storage on the back-end. If you don't know why you should be using memcached then you should check it out first. If you want to check out the code now, then go here . So far I think I have a passable Session Factory implementation that uses memcached on the back end. In later posts I will give some code examples and more details about deploying the Factory code. Details Here are a few dependencies you will need to get going: Castle::Monorail A memcached server or servers running on your network. Memcached is a simple and fast distributed object server for balancing object caches across many servers! The latest release of Enyim . These are the guys that did all the real client work! Thanks to them for a great memcached client! If you want to run the tests or plan on making modifications then you will need the Nunit/RhinoMocks stack. Current Features A s...

Microsoft MVC or Is the Monorail off it's track?

For those of you who didn't know, Microsoft has been working on it's own MVC framework . I haven't used it yet since I am in the middle of testing several Web-testing tools for an upcoming article. That said, I have done a little research on the web and here are a few things that Monorail users may want to know: Hammett , the founder of Castle::Monorail, has helped MS by making suggestions about their implementation. See his comment below: I'm not actively collaborating with MS regarding the MS MVC. I've offered help due to my expertise with complex web sites we have built using MonoRail, I was invited to fly to Redmond and analyze their product, and discuss things, make suggestions. It's been suggested (in comments) that Monorail may become a wrapper for the MS Framework, if the MS MVC framework progresses well. The MS Framework does support intellisense in it's views. Views are written in your .Net language of choice. ASP.Net controls are available for u...

Getting the Data out of my Controller Tests

While working on PlanningPokerOnRails I started writing a unit test for my LoginController. The Monorail BaseControllerTest makes this easy. I am also using Rhino Mocks and Nunit . Here is the test: The test is very simple. First, it sets a single recorded expectation that a Redirect will occur: 34 using (mocks.Record()) 35 { 36 // First redirects to the index page 37 Response.Redirect( "/Home/Index.rails" ); 38 } Next, the playback is run and the code emulates a few things that users might do...like login with Request params for a ReturnUrl: 39 using (mocks.Playback()) 40 { 41 Request.Params.Add( "ReturnUrl" , "/Home/Index.rails" ); 42 loginController.Login( "dan" , "danny" ); 43 } Writing the Code to Pass this Test Next I wrote the CardPlayer component (my user) and the LoginController. Seeking to do the simplest thing that could possibly work I merely had the CardPlayer inherit from the ActiveRecord ...
Castle Project and Monorail I just wanted to give a quick nod to the guys at the Castle Project ! We've started converting one of our major applications to their Monorail framework. For those of you unfamiliar with Castle or Monorail, Monorail is an MVC framework for .Net web applications. It completely replaces the webforms framework with a much simpler (and more powerful) rails style implementation. The project includes an OR Mapper (ActiveRecord) that uses NHibernate as it's back-end. Their ActiveRecord implementation greatly reduces the time it takes to map objects to the database. They support several view engines based on Nvelocity, Boo (brail), string template, and some others. They also have a basic generator for scaffolding and a basic migrations framework is being developed. If you are in a .Net shop and looking to take advantage of Rails/MVC or if you are just fed up with the overengineered webforms model then check out Monorail! Here is a link to my Castle bookmarks...