You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by pierobo <pi...@gmail.com> on 2007/09/28 23:20:38 UTC

Is Wicket suitable for my CMS?

I'm doing an evaluation of some java web frameworks for doing the
presentation layer of our CMS.
We already have the backend, made with Spring/Hibernate.

The behaviour of the CMS should be:
1) (Power) user draws the data model he want to store in the CMS (a sort of
entity-relation diagram);
2) This user then writes html pages with tools provided by us or by himself.
He put into page "blocks" of visual elements representing part of his model.
I.e., in the parent HTML page he could put a block representing a browse
able list of childs.

So, I need a heavy component oriented framework, and Wicket seems to be
suitable.
But, for what I understood, Wicked is driven by pages. I would instead drive
the presentation by some action (i.e. www.mycms.com/view/MyEntity/id/123),
look into information system, find the suitable html page and then render
it.

I simply didn't understand if Wicket could be the right tool...

I gave a look to kronos CMS but I'm very newbie about Wicket and this
project lacks of documentation (for what I've seen).

Could you give me some opinion and all references I could look?

Thanks to all
-- 
View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a12948749
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Is Wicket suitable for my CMS?

Posted by Eelco Hillenius <ee...@gmail.com>.
> that's gorgeous!
>
> I think I'll leave html out of EB but this tecnique is still applicable.
> All I need is to investigate next if nested wicket tags are processed, or
> eventually trying further approaches.
> Now I know the way to manage dinamically html pages and this open new,
> undiscovered, worlds to me <smiley image='smiley_super.gif' text=':super:' /

Take a look at Wicket-velocity. Maybe you'll get more ideas.

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Is Wicket suitable for my CMS?

Posted by pierobo <pi...@gmail.com>.


igor.vaynberg wrote:
> 
> at its core all a cms does is display some user generated content. that
> can
> be accomplished by simply doing this:
> 
> class cmspage extends webpage {
>   public cmspage(pageparameters params) {
>     long pageid=params.getpageid();
>     string html=database.loadpage(pageid);
>     add(new label("content", html).setescapemarkupstrings(true));
>   }
> }
> 
> <html><body wicket:id="content"></body></html>
> 
> now that one page can display any html out of database
> 
> -igor
> 
> 

that's gorgeous!

I think I'll leave html out of EB but this tecnique is still applicable.
All I need is to investigate next if nested wicket tags are processed, or
eventually trying further approaches.
Now I know the way to manage dinamically html pages and this open new,
undiscovered, worlds to me <smiley image='smiley_super.gif' text=':super:' /

-- 
View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13197859
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Is Wicket suitable for my CMS?

Posted by Igor Vaynberg <ig...@gmail.com>.
at its core all a cms does is display some user generated content. that can
be accomplished by simply doing this:

class cmspage extends webpage {
  public cmspage(pageparameters params) {
    long pageid=params.getpageid();
    string html=database.loadpage(pageid);
    add(new label("content", html).setescapemarkupstrings(true));
  }
}

<html><body wicket:id="content"></body></html>

now that one page can display any html out of database

-igor


On 10/13/07, pierobo <pi...@gmail.com> wrote:
>
>
>
>
> igor.vaynberg wrote:
> >
> > for what it is worth i will be creating a cms in the near future using
> > wicket. my idea is simple. the cms is a single wicket page. the users
> have
> > a
> > special tag they use to define dynamic components like <cms:component
> > type=foo param1=param2/>. the page itself has a  single repeater, prior
> to
> > rendering it takes the markup and splits it into chunks of static and
> > component definitions. for a static piece the repeater gets a label, for
> a
> > component definition the repeater gets a new component instantiated. no
> > need
> > for getvariation/java classes per page/ and all that funky stuff that is
> > made for regular applications.
> >
> > -igor
> >
> >
> So you can have multiple html pages managed only by one Java class? That's
> could be what I need.
> I all the examples I looked on Wicket site, I never found an example like
> this.
>
> Should I look to components to do this?
> --
> View this message in context:
> http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13191210
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Is Wicket suitable for my CMS?

Posted by pierobo <pi...@gmail.com>.


igor.vaynberg wrote:
> 
> for what it is worth i will be creating a cms in the near future using
> wicket. my idea is simple. the cms is a single wicket page. the users have
> a
> special tag they use to define dynamic components like <cms:component
> type=foo param1=param2/>. the page itself has a  single repeater, prior to
> rendering it takes the markup and splits it into chunks of static and
> component definitions. for a static piece the repeater gets a label, for a
> component definition the repeater gets a new component instantiated. no
> need
> for getvariation/java classes per page/ and all that funky stuff that is
> made for regular applications.
> 
> -igor
> 
> 
So you can have multiple html pages managed only by one Java class? That's
could be what I need.
I all the examples I looked on Wicket site, I never found an example like
this.

Should I look to components to do this?
-- 
View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13191210
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Is Wicket suitable for my CMS?

Posted by Igor Vaynberg <ig...@gmail.com>.
for what it is worth i will be creating a cms in the near future using
wicket. my idea is simple. the cms is a single wicket page. the users have a
special tag they use to define dynamic components like <cms:component
type=foo param1=param2/>. the page itself has a  single repeater, prior to
rendering it takes the markup and splits it into chunks of static and
component definitions. for a static piece the repeater gets a label, for a
component definition the repeater gets a new component instantiated. no need
for getvariation/java classes per page/ and all that funky stuff that is
made for regular applications.

-igor


On 10/13/07, pierobo <pi...@gmail.com> wrote:
>
>
>
>
> Nino.Martinez wrote:
> >
> > Hi pierobo
> >
> > I think you need to take a look at listview.. I know you want to let the
> > user just plainly design the page but what if you gave them a more
> > graphical editor. That way you could have a general page that had a
> > listview and added all the components the user selected on his editor
> > page..
> >
> > Problem really are that theres a one to one mapping between html and
> > wicket components. This also is the case with listview, but in your
> > listview you can have one or more placeholders that will be populated
> > runtime.. If you do this in conjuction with giving the user the
> > posibility for uploading special stylesheets then it should be the same
> > i guess? What do you say?
> >
> > regards Nino
> >
> >
> >
>
> Thanks for your reply, Nino, but the main features of my CMS are:
> 1) A structured content capability, with an editor to define the model
> 2) The freedom of layout
>
> In these times of Ajax and CSS, people love to do their layout. This is
> the
> advantages I would provide, else there is no reason to do the (n+1)-th
> CMS...
>
> Surely there are valid reasons for the actual Wicket structure, but I
> think
> that a runtime-inspectable html page not bound to a Java counterpart would
> be very useful.
>
> Bye
> --
> View this message in context:
> http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13188380
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Is Wicket suitable for my CMS?

Posted by pierobo <pi...@gmail.com>.


Nino.Martinez wrote:
> 
> Yes, but I dont see how this is not possible done with the solution I 
> suggest, unless you actually want the user to produce the html file 
> themselves...?
> 
> -Nino
> 
> 
If you mean an editor I could write to manage authoring of user's pages, it
is not what I need. There are plenty of CMS that do that, much better then I
could...

Yes, I would let the users (power users) write the pages themselves. And
then put wicket markup when they want to wire the structured data. This is
reasonable for an html designer, thanks to Wicket's simple syntax.
Yet, I could provide blocks of grouped data. E.g. for a ecommerce page, with
a model Order 1-->N Product, I could provide a Wicket component that shows
the list of Products, wired with actual page's order.

For now, it's only brainstormig. I've the working persistence layer, and now
I'm evaluating a presentation framework. So, further ideas are welcome :-)

This is a possible approach with Wicket that came to my mind, but I'm a
newbie of it: HTML written by user take place in a given subdir. When a page
from this subdir is requested, the Wicket filter pass it to the parser, that
checks and manage the Wicket components found.

Don't know if this task is compatible with actual lifecycle of Wicket pages,
and/or its API.

Just digging... :working:

-- 
View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13189803
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Is Wicket suitable for my CMS?

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Yes, but I dont see how this is not possible done with the solution I 
suggest, unless you actually want the user to produce the html file 
themselves...?

-Nino

pierobo wrote:
>
> Nino.Martinez wrote:
>   
>> Hi pierobo
>>
>> I think you need to take a look at listview.. I know you want to let the 
>> user just plainly design the page but what if you gave them a more 
>> graphical editor. That way you could have a general page that had a 
>> listview and added all the components the user selected on his editor
>> page..
>>
>> Problem really are that theres a one to one mapping between html and 
>> wicket components. This also is the case with listview, but in your 
>> listview you can have one or more placeholders that will be populated 
>> runtime.. If you do this in conjuction with giving the user the 
>> posibility for uploading special stylesheets then it should be the same 
>> i guess? What do you say?
>>
>> regards Nino
>>
>>
>>
>>     
>
> Thanks for your reply, Nino, but the main features of my CMS are:
> 1) A structured content capability, with an editor to define the model
> 2) The freedom of layout
>
> In these times of Ajax and CSS, people love to do their layout. This is the
> advantages I would provide, else there is no reason to do the (n+1)-th
> CMS...
>
> Surely there are valid reasons for the actual Wicket structure, but I think
> that a runtime-inspectable html page not bound to a Java counterpart would
> be very useful.
>
> Bye
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Is Wicket suitable for my CMS?

Posted by pierobo <pi...@gmail.com>.


Nino.Martinez wrote:
> 
> Hi pierobo
> 
> I think you need to take a look at listview.. I know you want to let the 
> user just plainly design the page but what if you gave them a more 
> graphical editor. That way you could have a general page that had a 
> listview and added all the components the user selected on his editor
> page..
> 
> Problem really are that theres a one to one mapping between html and 
> wicket components. This also is the case with listview, but in your 
> listview you can have one or more placeholders that will be populated 
> runtime.. If you do this in conjuction with giving the user the 
> posibility for uploading special stylesheets then it should be the same 
> i guess? What do you say?
> 
> regards Nino
> 
> 
> 

Thanks for your reply, Nino, but the main features of my CMS are:
1) A structured content capability, with an editor to define the model
2) The freedom of layout

In these times of Ajax and CSS, people love to do their layout. This is the
advantages I would provide, else there is no reason to do the (n+1)-th
CMS...

Surely there are valid reasons for the actual Wicket structure, but I think
that a runtime-inspectable html page not bound to a Java counterpart would
be very useful.

Bye
-- 
View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13188380
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Is Wicket suitable for my CMS?

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Hi pierobo

I think you need to take a look at listview.. I know you want to let the 
user just plainly design the page but what if you gave them a more 
graphical editor. That way you could have a general page that had a 
listview and added all the components the user selected on his editor page..

Problem really are that theres a one to one mapping between html and 
wicket components. This also is the case with listview, but in your 
listview you can have one or more placeholders that will be populated 
runtime.. If you do this in conjuction with giving the user the 
posibility for uploading special stylesheets then it should be the same 
i guess? What do you say?

regards Nino

pierobo wrote:
> Eelco Hillenius wrote:
>   
>> On 9/28/07, pierobo <pi...@gmail.com> wrote:
>>     
>>> I'm doing an evaluation of some java web frameworks for doing the
>>> presentation layer of our CMS.
>>> We already have the backend, made with Spring/Hibernate.
>>>
>>> The behaviour of the CMS should be:
>>> 1) (Power) user draws the data model he want to store in the CMS (a sort
>>> of
>>> entity-relation diagram);
>>> 2) This user then writes html pages with tools provided by us or by
>>> himself.
>>> He put into page "blocks" of visual elements representing part of his
>>> model.
>>> I.e., in the parent HTML page he could put a block representing a browse
>>> able list of childs.
>>>       
>> Yeah, I think Wicket is very suitable for what you want to do.
>>
>>
>>     
> I made some documenting and I looked at various components available. I
> understood how can I switch from actions to bookmarkable pages, but I cannot
> get how could I work with user generated pages.
> I would like to leave the user all the freedom he needs, that is, ask him to
> follow my CMS conventions, but let him to design freely his pages.
> So there will not be a process of building page with components using some
> pre-made layout. The user will instead draw _his_ MyWorld.html, putting
> wicket components provided by the CMS.
>
> But I cannot get how load ino Wicket the MyWorld.html, because there will
> not be a MyWorld.java...
>
> Probably my need could be a java class which interprets MyWorld.html and
> then render it.
>
> It's possible to do this? Could you suggest me some different approach to do
> this? The only thing I would not change is the way the user creates his
> pages: no constraints about the layout
>
> Thanks
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Is Wicket suitable for my CMS?

Posted by pierobo <pi...@gmail.com>.

Eelco Hillenius wrote:
> 
> On 9/28/07, pierobo <pi...@gmail.com> wrote:
>>
>> I'm doing an evaluation of some java web frameworks for doing the
>> presentation layer of our CMS.
>> We already have the backend, made with Spring/Hibernate.
>>
>> The behaviour of the CMS should be:
>> 1) (Power) user draws the data model he want to store in the CMS (a sort
>> of
>> entity-relation diagram);
>> 2) This user then writes html pages with tools provided by us or by
>> himself.
>> He put into page "blocks" of visual elements representing part of his
>> model.
>> I.e., in the parent HTML page he could put a block representing a browse
>> able list of childs.
> 
> Yeah, I think Wicket is very suitable for what you want to do.
> 
> 
I made some documenting and I looked at various components available. I
understood how can I switch from actions to bookmarkable pages, but I cannot
get how could I work with user generated pages.
I would like to leave the user all the freedom he needs, that is, ask him to
follow my CMS conventions, but let him to design freely his pages.
So there will not be a process of building page with components using some
pre-made layout. The user will instead draw _his_ MyWorld.html, putting
wicket components provided by the CMS.

But I cannot get how load ino Wicket the MyWorld.html, because there will
not be a MyWorld.java...

Probably my need could be a java class which interprets MyWorld.html and
then render it.

It's possible to do this? Could you suggest me some different approach to do
this? The only thing I would not change is the way the user creates his
pages: no constraints about the layout

Thanks
-- 
View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13177007
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Is Wicket suitable for my CMS?

Posted by pierobo <pi...@gmail.com>.

Eelco Hillenius wrote:
> 
> On 9/28/07, pierobo <pi...@gmail.com> wrote:
>>
>> I.e., in the parent HTML page he could put a block representing a browse
>> able list of childs.
> 
> Yeah, I think Wicket is very suitable for what you want to do.
> 
>> So, I need a heavy component oriented framework, and Wicket seems to be
>> suitable.
>> But, for what I understood, Wicked is driven by pages. I would instead
>> drive
>> the presentation by some action (i.e.
>> www.mycms.com/view/MyEntity/id/123),
>> look into information system, find the suitable html page and then render
>> it.
> 
> You can implement that just the same. Replace your idea of actions by
> pages, and use a custom URL mapping to achieve that. There's multiple
> ways to do it.
> 
> Learn how bookmarkable pages (would be your actions) work, and how to
> dynamically construct Wicket pages (investigate panels).
> 
> Eelco
> 
> 

Thanks for your reply, that's what I think after reading better this forum.

And thanks to you all for remembering me that ever exists a better way to do
things. Your posts about Wicket and Model 2 approaches helped me to match my
OOP passion and my Web programming needs.
Hope I can follow this way like I would.

Bye
-- 
View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13048614
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Is Wicket suitable for my CMS?

Posted by Eelco Hillenius <ee...@gmail.com>.
On 9/28/07, pierobo <pi...@gmail.com> wrote:
>
> I'm doing an evaluation of some java web frameworks for doing the
> presentation layer of our CMS.
> We already have the backend, made with Spring/Hibernate.
>
> The behaviour of the CMS should be:
> 1) (Power) user draws the data model he want to store in the CMS (a sort of
> entity-relation diagram);
> 2) This user then writes html pages with tools provided by us or by himself.
> He put into page "blocks" of visual elements representing part of his model.
> I.e., in the parent HTML page he could put a block representing a browse
> able list of childs.

Yeah, I think Wicket is very suitable for what you want to do.

> So, I need a heavy component oriented framework, and Wicket seems to be
> suitable.
> But, for what I understood, Wicked is driven by pages. I would instead drive
> the presentation by some action (i.e. www.mycms.com/view/MyEntity/id/123),
> look into information system, find the suitable html page and then render
> it.

You can implement that just the same. Replace your idea of actions by
pages, and use a custom URL mapping to achieve that. There's multiple
ways to do it.

> I simply didn't understand if Wicket could be the right tool...
>
> I gave a look to kronos CMS but I'm very newbie about Wicket and this
> project lacks of documentation (for what I've seen).

I haven't looked at Kronos myself. It is a user contributed/
wicket-stuff project.

> Could you give me some opinion and all references I could look?

Learn how bookmarkable pages (would be your actions) work, and how to
dynamically construct Wicket pages (investigate panels).

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Is Wicket suitable for my CMS?

Posted by pierobo <pi...@gmail.com>.


Shams Imam wrote:
> 
> Then you could maintain a java class corresponding each html file the user
> can create.
> When the user saves his html you could store meta information for that
> html
> file like what all wicket-panels it uses. Then inisde the java class you
> can
> process this meta information and add corresponding panels to your page in
> java :).
> 
> Shams
> -- 
> Shams Mahmood
> 
> 
Do you mean that I could inspect the pages at runtime and store all custom
tag as a metadata? This is interesting, but since that pages have not a
bound Java class, how could I manage these?
Sorry if these questions seem silly to you Wicket users :blush:
-- 
View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13191270
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Is Wicket suitable for my CMS?

Posted by Shams Imam <sh...@gmail.com>.
Then you could maintain a java class corresponding each html file the user
can create.
When the user saves his html you could store meta information for that html
file like what all wicket-panels it uses. Then inisde the java class you can
process this meta information and add corresponding panels to your page in
java :).

Shams

On 10/13/07, pierobo <pi...@gmail.com> wrote:
>
>
>
>
> Shams Ali-2 wrote:
> >
> > Hi,
> >
> > I think u might consider using getVariation()of WebPage class and
> > dynamically generated htmls along with some tricks in the java code :).
> >
> > Hope it helps.
> >
> > Shams
> >
> I need the opposite :-), static HTML pages and dynamic management...
> If you want, give a look to my last reply to Nino.
>
> Thanks for your help
> --
> View this message in context:
> http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13189884
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Shams Mahmood

Re: Is Wicket suitable for my CMS?

Posted by pierobo <pi...@gmail.com>.


Shams Ali-2 wrote:
> 
> Hi,
> 
> I think u might consider using getVariation()of WebPage class and
> dynamically generated htmls along with some tricks in the java code :).
> 
> Hope it helps.
> 
> Shams
> 
I need the opposite :-), static HTML pages and dynamic management...
If you want, give a look to my last reply to Nino.

Thanks for your help
-- 
View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13189884
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org