After playing around ECO II, I found that it is quite difficult to make ECO's elements serialized with BinaryFormatter. So, I looked back to DTO pattern, and tried to make a utility to generate simple DTO for wrapping ECO objects.
I named this utility ETO - ECO Transfer Object, and I found that it can work correctly to clone my simple ECO object graph. But I hope it to work with more complicated graph.
If anyone'd like to try this utility please contact me.
Moreover, I also try to make generated ETO objects to be compatible with CompactFormatter and hope that it could work on .NET Compact Framework. That's right, I wanna see ECO working on Pocket PC :).
Saturday, September 24, 2005
Considering Briefcase Model for ECO
Posted by
chanwit
at
9:49 PM
1 comments
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:
Posted by
chanwit
at
2:38 PM
0
comments
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.
Posted by
chanwit
at
8:17 PM
0
comments
Sunday, July 31, 2005
EcoAccess: A Declarative DAO for ECO
I'd like to introduce my work for Borland ECO.
It was inspired by many Java projects such as Beehive and Hibernate.
This project "EcoAccess" is based on Dynamic Proxy from Castle to enable a declarative programming model to Borland ECO.
Obviously, it utilise many ECO services and let you easy to have OCL access methods.
I'd like to thank many articles from ECO section of HowToDoThings.com that guide me on ECO.
The most intesting concept I implemented into EcoAccess is that it provides a pure interface programming model like this:
[AccessEcoSpace(typeof (UserEcoSpace))]
public interface ISystemUserDAO {
[Ocl("SystemUser.allInstances->select(s|s.id = id)->first")]
SystemUser FindById(int id);
}
You can read the first tutorial here.
Posted by
chanwit
at
6:30 PM
0
comments