This is the second post of a serie started with this post about a MonoRail and ActiveRecord tutorial.

Let's start developing our sample application. The first thing we need to do is to create a .NET project configured for using the CastleProject stuff. You can go in two ways:

  • Create a Visual Studio project with the MonoRail project wizard.
    The wizard will create for you the MonoRail project structure, generate the configuration elements in the web.config file and add all the necessary references to the project.
    You will be prompted to choose a view engine (NVelocity, Brail or ASP .Net Web Forms), if to enable the Windsor inversion of control, and if you wish to create a test project for TDD (Test Driven Development).
    For the purpose of this tutorial choose NVelocity, not enable Windsor and create the TDD test project. You can look at the procedure here.
  • If you are using another IDE than Visual Studio, or if you want to manually configure the environment, you can look at the manual procedure in the same link of the first point.

The references that will be added are:

  • Castle.MonoRail.Framework.dll: The MonoRail framework, that implements for the project the MVC Pattern
  • Castle.MonoRail.Framework.Views.NVelocity.dll: The view engine we have chosen
  • Castle.Components.Binder.dll: The binder implementation
  • Castle.Components.Common.EmailSender.dll: The email service contracts
  • Castle.Components.Common.EmailSender.SmtpEmailSender.dll: The email service implementation
  • Castle.Core.dll: Core functionalities shared by Castle Projects
  • NVelocity.dll: The template engine

Read more

Cuyahoga: "Hello World" sample module tutorial

Filed on April 30th, 2007 at 11:59 am under , , , , , | 6 Comments 

Cuyahoga is an impressive open source web site framework (and CMS) with many impressive features like:

  • RDMBS indipendency via NHibernate
  • Enterprise architecture
  • Plug-in architecture
  • Deployable, using Mono, to platforms different from Windows, like Linux, Mac OS X, Solaris, unlike other popular .NET CMS
  • Search engine based on DotLucene
  • Full ASP .NET 2.0 engine
  • logging system via log4net (the same logging engine in zigGIS)

People willing to deeply dig in Cuyahoga may download the latest release (1.5.0) source code and this basic tutorial for developing Cuyahoga modules.

The problem with this tutorial is that is a bit out of date (is based on VS 2003 and on a old release of Cuyahoga) so I thought to make this post to update the tutorial to VS 2005 and to the current stable release of Cuyahoga.

Here I am assuming that you are using VS 2005 IDE and Cuyahoga 1.5.0. You can of course use other IDEs without problems, but my post is concerned about using VS 2005.

We will create a very simple module, just showing the classic "Hello World" text. In my next posts I will write a longer tutorial with data management.

Read more

For .NET developers a very usefull and free framework for unit testing is NUnit, that is a .NET implementation of the popular JUnit for Java.

I am using this for unit testing zigGIS, the Open Source ArcGis Desktop connector for PostGIS in which I am currently involved.

I will show you in this post how easy and powerfull is to create, run and debug unit test for a .NET library or application.

After installing NUnit, you can add a reference to it in your VS solution. After doing so you are ready to implement one or more classes (fixtures) for performing unit tests.
Read more