cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: Reality Check (was Re: [SHRT] Cocoon on Rails Application Component Kernel (CRACK))
Date Mon, 10 Oct 2005 15:16:28 GMT
Max Pfingsthorn wrote:
<snip type="a bunch of implementation stuff"/>

>The "handleControllerCall" function can be written in flowscript or even use the great
new java flow as shown by Torsten Curdt during the get together. Not sure how that class reloading
works, but if you put the controller classes in the same path, I guess the reloading feature
would work there as well. So, you can do something like...:
>if(action==null) action="index";
>contr ="controllers."+controller+"Controller");
>  contr[action]();
>  contr[action](id); //well, a little more processing here to get the object with this
id first

One of the nice features of the Rails implementation is the fact that a 
class method maps to an action.  It makes the code very easy to test, 
and therefore very appealing.

Think about it, if you were going to write a unit test, would you rather 
invoke a scripting engine or simply execute against a class?

Also, the inherent simplicity of concepts where a developer can leverage 
the Java skills that they already have is very enticing.  The controller 
would essentially inherit a base class that takes care of the reflective 
resolution of the actions, and all is well.  It just works.  My major 
complaint against flowscript isn't the concept--its the feeling that I 
am flying without a net.  I don't have a convenient way of testing the 
javascript.  I can't use an IDE to make things even easier.  There is 
something to be said for using the autocomplete function of your 
favorite IDE as apposed to trying to remember how everything is mapped 
to the FOM.

Again, why should the developer have to type out cocoon.sendPage(...) 
when the sitemap implementation takes care of it for you.

View raw message