Justin Fagnani-Bell napisaƂ(a):
Hi,

This is probably my 3rd email on the same subject in the past few years, and I'm sure you get these all the time, but it seem things haven't gotten much easier, so please excuse me...

I used Cocoon quite a bit in the 1.x days, and was quite comfortable with XSP, Actions, Generators, etc... Cocoon's changed a lot since then, and I can't seem to find a clear starting path with the new technologies. I'm starting a completely new site/application from scratch. So I'm looking to start right and with the methods that will carry forward into Cocoon 2.2/3.0.
Hello,
I was playing with Cocoon since 2.0.3 but I have to admit that I was interested in it more as for research than for real application. Though I currently build one using Daisy, CForms, JX, Flowscript and Hibernate. Also I follow discussions on the dev list quite carefully so I can share *my own* perception.
At first I'm trying to do some very basic CRUD operations on my database. Before I would use POJOs for the model, Actions for the controller, and XSP for the view, all using an abstracted database access layer (that used JDBC). It all seemed pretty simple and made a lot of sense to me.
Have you seen BricksCMS? [1] It is basically showcase for CRUD operations done quite easily in Cocoon.
These days XSP is deprecated, Actions might be too, and there's a plethora of data access frameworks. I know Flow replaces Actions, but what replaces XSP? XSP is still all over the user documentation and tutorials. I'm assuming it's some sort of combination of CForms, JX templates, and maybe Velocity?
XSP is being replaced by Template block. It is refactored and extended version of JX templates (syntax is pretty the same) which was back-ported into 2.1.x branch in 2.1.9 AFAIR. Speaking more precisely, Template cannot do everything XSP did. For example there is no ESQLequivalent in Template. Thus this responsibility has been carried to Flowscript/Javaflow. So flowscript have to prepare model for a view.
There's a ton a samples and obviously many ways to do things, but is there one set of "sanctioned" components/methods to use when starting a new Cocoon app?
"Sanctioned" way, best practices, call it in way you want is big desire in Cocoon's community both users and devs, I think. BricksCMS mentioned above is good example of promoting good practices. C2.2 seems to bring more tidiness and being decoupled into blocks will change way she lives. In ideal situation there is no big distribution containing all blocks around but small core and infrastructure (maven-based) to include those you really need. So old, not maintained blocks won't be carried anymore and won't disrupt users' attention. IMO it will lead to situation where best practices will be better promoted and those not popular will die more quickly. As there is the desire of devs to release first milestone of the most fundamental parts[2] of Cocoon 2.2 it seems reasonable to consider 2.2 not 2.1x branch.
I guess my biggest question is about views really. I see only two pages in the docs talking about JX. The flow docs still talk about possibly using XSP with the JXPath logicsheet. Is XSP still fine to use since I'm used to it?
My strong advice: forget about XSP. It was nice idea, it worked fine but everyone moved from it to JX, it's just a fact.
Is JX the way to go? Is Velocity better because it's used in other projects? I tend to do some pretty complicated logic on the view side of things (not messing with the model or controller side) and like the expressiveness of having all of Java at my fingertips, so I'm a little wary of a restricted template for the view.
Template block (so also JX) has a concept of macros. These are reusable parts of template customized by data, the are quite powerful. CForms are pretty complicated and run fine using Templates as view. I don't know about Velocity, but in Cocoon world Template is going to be primer template engine.
Also... I've been looking into Spring and Tuscany to help with data access and exposing web services. Should I try to get started with Cocoon 2.2?
Spring... Spring + Hibernate alternative way of handling data to that showed in BricksCMS. It demands more time for learning but it's more powerful. Also you should know that Spring became default component container in 2.2 so integration is pretty good and tight. So yes, Spring is the way to go for the future.

[1] http://wiki.apache.org/cocoon/BricksCms
http://wiki.apache.org/cocoon/Bricks22
[2] http://thread.gmane.org/gmane.text.xml.cocoon.devel/65212/focus=65220

Hope that helps a little.

--
Grzegorz Kossakowski

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to