Monday, August 08, 2005

Eco on Rails

I've successfully tested ECO with EcoAccess on MonoRail Web application framework.
It worked great, and I have some codes to show here.

/// EcoController.cs
using Castle.MonoRail.Framework;
using Centillex.EcoAccess;
using User;

namespace EcoRailsSample
{
public class EcoController : SmartDispatcherController {

UserEcoSpace eco = new UserEcoSpace();

public void List() {
}

public void Edit(int id) {
}

public void View(int id) {
if(eco.Active == false) eco.Active = true;
ISystemUserEA si;
si = (ISystemUserEA) AccessFactory.Create(eco, typeof(ISystemUserEA));
PropertyBag["system_user"] = si.FindById(id);
}
}
}


I set a simple HTML in View.vm (NVelocity template) like this:

## View.vm
<h3>System User</h3>

Name : $system_user.FirstName <br/>
Last Name: $system_user.LastName <br/>



Here is the screenshot of the above codes:

Tuesday, August 02, 2005

EcoAccess v.1.0 M1 Released

EcoAccess is now available to download from Centillex.com
This is very early access version. However, you can use many exciting features of it.

Please download it from this page.