You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Maarten Volders <ma...@telenet.be> on 2006/01/29 15:17:04 UTC

Advice on building a CMS

Hi,

I just started out using jcr / jackrabbit and have some questions on 
some best practices for building a cms. Just for the record let me say 
that I'm using the springmodules jcr package.

The questions relating to building a cms based site:

- Is it a good idea to create classes like Page, Paragraph, Content, 
Template, ... which hide direct calls to the node. So for example a call 
like page.getTitle() is actually a node.getProperty("cms:title"); I have 
not yet have a lot of experience using node operations so I do not know 
if I'm just working myself in trouble using such a approach or aren't 
there any issues with such a approach?

-I would like to build a web user interface that shows the tree 
structure of the pages in my cms. But I do not want that all the pages 
would be loaded immediately. But by using dwr / ajax I would like to 
have async calls to my service layer and retrieve the pages / nodes I 
need only when opening a page in the tree structure. Has anyone got 
experience with nodes in combination with dwr or ajax or other async 
calls. Issues I should now or some advice on best practices?

- Also I was born in the age were there was no speak no more of 
hierarchy databases ... relational by all means they thought us. So I'm 
not very familiar on how the pages, paragraphs, content should be 
stored? Can I just have a root node wit under that page nodes, and each 
page node can have another page node under it or paragraph nodes. And 
paragraph nodes can have content and so on .... Workable solution or ... ?

Other people wh have already build a cms or dms using jcr .... I would 
be great to get some input from you guys. Not only the technical stuff 
but also what experiences you have building user interfaces for jcr.

Thx!

Re: Advice on building a CMS

Posted by Robert Ritchy <ri...@jarbo.com>.
Looking at your site - seems like JSR 170 is a perfect fit for OpenEdit 
because it's content based.  In order to help you; however, it'd be nice 
to know how far along you are with jackrabbit/jsr170 - and more 
specifically what areas you're looking for help.  Have you downloaded it 
yet? Are you looking for node design collaboration?

In my mind - one thing missing from this community is collaboration on 
common designs/best practices.  I guess that's up to people like you and 
I.  But, I'd love to see mini-projects pop-up based on commonly used 
designs ... things like a blogging framework.

Speaking of which, I spent last Friday writing a basic blogger based on 
JSR 170 (model/node persistence). It works, but I'm not sure how much it 
sucks. I'd really like to see a similar design from top to bottom (node 
design, actual code, etc.) - to get an idea of how I'm doing.

-Robert


Chandresh Turakhia wrote:
> Somehow Magnolia has been defacto :)
>
> But templating is horrible in Mangnolia.
>
> Also JLibrary now does the same.
>
> I am planning to make OpenEdit ( www.openedit.org )
> JCR compliants. Has anyone attempted the same. Any help in this 
> respect would be helpful.
>
> I want to make OpenEdit talk to JSR 170 repository
>
> Chand
> ----- Original Message ----- From: "Philipp Jurewicz" 
> <Ph...@gmx.net>
> To: <ja...@incubator.apache.org>
> Sent: Sunday, January 29, 2006 9:06 AM
> Subject: Re: Advice on building a CMS
>
>
>> Hi
>>
>> Maarten Volders wrote:
>>
>>>
>>> -I would like to build a web user interface that shows the tree 
>>> structure of the pages in my cms. But I do not want that all the 
>>> pages would be loaded immediately. But by using dwr / ajax I would 
>>> like to have async calls to my service layer and retrieve the pages 
>>> / nodes I need only when opening a page in the tree structure. Has 
>>> anyone got experience with nodes in combination with dwr or ajax or 
>>> other async calls. Issues I should now or some advice on best 
>>> practices?
>>>
>> The Magnolia CMS builds upon Jackrabbit and they have a async tree 
>> browser, but the don't use spring nor dwr.
>>
>>
>
>
>

Re: Advice on building a CMS

Posted by Chandresh Turakhia <ch...@bhartitelesoft.com>.
Somehow Magnolia has been defacto :)

But templating is horrible in Mangnolia.

Also JLibrary now does the same.

I am planning to make OpenEdit ( www.openedit.org )
JCR compliants. Has anyone attempted the same. Any help in this respect 
would be helpful.

I want to make OpenEdit talk to JSR 170 repository

Chand
----- Original Message ----- 
From: "Philipp Jurewicz" <Ph...@gmx.net>
To: <ja...@incubator.apache.org>
Sent: Sunday, January 29, 2006 9:06 AM
Subject: Re: Advice on building a CMS


> Hi
>
> Maarten Volders wrote:
>
>>
>> -I would like to build a web user interface that shows the tree structure 
>> of the pages in my cms. But I do not want that all the pages would be 
>> loaded immediately. But by using dwr / ajax I would like to have async 
>> calls to my service layer and retrieve the pages / nodes I need only when 
>> opening a page in the tree structure. Has anyone got experience with 
>> nodes in combination with dwr or ajax or other async calls. Issues I 
>> should now or some advice on best practices?
>>
> The Magnolia CMS builds upon Jackrabbit and they have a async tree 
> browser, but the don't use spring nor dwr.
>
> 



Re: Advice on building a CMS

Posted by Philipp Bracher <ph...@obinary.com>.
Hi

I'm one of the developer of the here named magnolia and would like to  
give you some hints.

> The Magnolia CMS builds upon Jackrabbit and they have a async tree  
> browser, but the don't use spring nor dwr.

This is true for the current version (the server side code generates  
HTML snippets which are placed on the client side). As you can  
imagine this is not how it should be, because other not HTML clients  
are blocked. Never else if you like this approach (because it is  
simple) have a look at the prototype.js which gives you a lot of  
methods to do that without DWR or other additional stuff. You pass a  
url and name the dive where the result should get placed. Good to  
know that prototype.js is the base code of a lot of other AJAX  
frameworks.

The magnolia dev team decided to use Spring and DWR in the future  
versions, since this makes totally sense.

About your question. An async Tree should not be something depending  
on JCR since this is a common GUI Control. The MyFaces Tomahawk  
project is working in that direction for example. I note here shortly  
what we will do in the future to give you some hints:

- DWR is used to call the model (different implementations possible,  
the most famous will be the JCR one)
- DWR returns only data and the actions attached to the node (no HTML)
- each node can define its Context Menu (actions)
- Rendering on the client side (this makes it ease to use the service  
classes for SOAP too)
- Rendering by trimpaths template.js (like FreeMarker but for JS).  
This avoids to have the HTML code spread around the JS code (you  
place the templates in divs).
- The initial call goes to a JSP (or what ever) providing all the  
needed rendering Templates (each in one named div)

This splitts the rendering (Client, JSP) and the model (DWR, SOAP,  
POJOS) completely.

Hope this helped

Regards,

Philipp Bracher
obinary ltd.

-----------------------------------------------------
philpp.bracher@obinary.com       http://obinary.com
magnolia content management      http://magnolia.info
-----------------------------------------------------





Re: Advice on building a CMS

Posted by Philipp Jurewicz <Ph...@gmx.net>.
Hi

Maarten Volders wrote:

>
> -I would like to build a web user interface that shows the tree 
> structure of the pages in my cms. But I do not want that all the pages 
> would be loaded immediately. But by using dwr / ajax I would like to 
> have async calls to my service layer and retrieve the pages / nodes I 
> need only when opening a page in the tree structure. Has anyone got 
> experience with nodes in combination with dwr or ajax or other async 
> calls. Issues I should now or some advice on best practices?
>
The Magnolia CMS builds upon Jackrabbit and they have a async tree 
browser, but the don't use spring nor dwr.

Re: Advice on building a CMS

Posted by Christophe Lombart <ch...@gmail.com>.
Hi Marteen,

On 1/29/06, Maarten Volders <ma...@telenet.be> wrote:
>
> - Is it a good idea to create classes like Page, Paragraph, Content,
> Template, ... which hide direct calls to the node. So for example a call
> like page.getTitle() is actually a node.getProperty("cms:title"); I have
> not yet have a lot of experience using node operations so I do not know
> if I'm just working myself in trouble using such a approach or aren't
> there any issues with such a approach?
>

Yes, this kind of idea is quite new :-) but certainly this is an
interesting one.
In the Graffito project, we are working on this kind of mapping.
We are currently working on the documentation (and the site)  & the
advance mapping features. So, you will find more information on
http://incubator.apache.org/graffito/ in a couple of days.
Basic mappings work fine without important issues and now we are
analysing mapping with inheritance, interfaces,  complex compositions,
...

Of course, it is based on spring. You can see also in the Spring
module project, a nice JCR support.


> -I would like to build a web user interface that shows the tree
> structure of the pages in my cms. But I do not want that all the pages
> would be loaded immediately. But by using dwr / ajax I would like to
> have async calls to my service layer and retrieve the pages / nodes I
> need only when opening a page in the tree structure. Has anyone got
> experience with nodes in combination with dwr or ajax or other async
> calls. Issues I should now or some advice on best practices?
>

Building a treeview which can expand on demand is a nice approach but
there are plenty of ajax frameworks on the market and it is quite
difficult the best one. On  my current project, we are using Tacotine
without any problem. Thanks to Taconite, we are calling from the
browser some application services which are using our persitence
manager. This one returns a object graph matching to the JCR structure
to retrieve. There is a complete abstraction between the interface and
the JCR repository.


> - Also I was born in the age were there was no speak no more of
> hierarchy databases ... relational by all means they thought us. So I'm
> not very familiar on how the pages, paragraphs, content should be
> stored? Can I just have a root node wit under that page nodes, and each
> page node can have another page node under it or paragraph nodes. And
> paragraph nodes can have content and so on .... Workable solution or ... ?
>

Of course, The JCR model is very flexible. You can store any kind of
content. As usual, take the time to define correctly your model
(custome node types).

Jackrabbit gives the possiblity to store in a DB, file system or
another kind of persistence store.


> Other people wh have already build a cms or dms using jcr .... I would
> be great to get some input from you guys. Not only the technical stuff
> but also what experiences you have building user interfaces for jcr.

For simple cases (eg. readonly in a browser), you can use directly the
JCR API but when more business rules are imply, business objects
(pojo) are more appreciate. This is just my point of view and
certainly a lot of people on this list are not agree :-)



--
Best regards,

Christophe

Re: Advice on building a CMS

Posted by so...@apache.org.
On 1/29/06, Roy T. Fielding <fi...@gbiv.com> wrote:
> On Jan 29, 2006, at 9:45 AM, solprovider@apache.org wrote:
> > The Apache CMS is the Lenya project:
>
> Er, no, the correct thing to say is that Apache Lenya is a CMS project.
> Apache has many CMS projects.
> ...Roy

The question was about using Jackrabbit in a CMS.  Lenya is moving to
Jackrabbit because this is a good fit, and because both are Apache
projects.  Looking at Lenya would provide insight into his first and
third bullets.  Writing an AJAX menu system (his second bullet) is
easy with Lenya; I did it in a couple of hours, but my customer did
not want it, so it was never tested enough to be shared.

http://www.apache.org/foundation/projects.html
Forrest is for documentation, and could be integrated/available as a
Lenya module (plug-in) next year.  Besides Lenya, what project is
primarily defined as a CMS?  Is there another Apache CMS that Maarten
should investigate?  (I would also be interested.)

solprovider

Re: Advice on building a CMS

Posted by "Roy T. Fielding" <fi...@gbiv.com>.
On Jan 29, 2006, at 9:45 AM, solprovider@apache.org wrote:

> The Apache CMS is the Lenya project:

Er, no, the correct thing to say is that Apache Lenya is a CMS project.
Apache has many CMS projects.

....Roy


Re: Advice on building a CMS

Posted by so...@apache.org.
On 1/29/06, Maarten Volders <ma...@telenet.be> wrote:
> Other people wh have already build a cms or dms using jcr .... I would
> be great to get some input from you guys. Not only the technical stuff
> but also what experiences you have building user interfaces for jcr.

The Apache CMS is the Lenya project:
http://lenya.apache.org/

It is being converted to use Jackrabbit for Lenya 1.4.  (Lenya 1.2
uses the file system.)

solprovider