You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Alex Parvulescu <al...@gmail.com> on 2009/03/27 20:42:33 UTC

sling - wicket integration?

Hello,
I'm new around here, so excuse my ignorance :)

I'm very interested in integrating sling as a content repository with wicket
- but I think this goes for any web framework out there.

I can't redesign the entire wicket application in sling, I've invested too
much in the framework, but I'm looking for advice on integrating the two.

It the following scenario possible? wicket for UI / admin backend and sling
as a content repository (images / pdf's) - I don't mind having a different
admin console for the sling sever, and OSGI really rocks.

I'd like to have the content like 'content/paper/1.pdf' available as a
static public resource , ALSO have private resources available only to
logged users AND private resources available only to the resource's
creator(the author).

Now for the hard part, what are my options for integration  ?

      1# GET/POST & JSON- maybe through apache commons-httpclient ,that
certinally keeps the systems decoupled.
In this case I'm wondering how can you share user management? and resource
access control?

      2# wicket doesn't do OSGI , so I guess a tighter integration is really
out of the question


I've looked around on the wiki and there's not much info into integrating
with external systems.

What I am trying to find out here is if Sling can bring something new to the
table, or should I go one level deeper, and look into integration with
jackrabbit directly.

By the way, if anyting good comes out of this, I can happily contribute it
back to the project as an example/usecase.

many thanks in advance,
Alex

Re: sling - wicket integration?

Posted by Dominik Süß <do...@gmail.com>.
Hi Alex,

you're not alone with the intention to get a wicket integration and a
colleague of mine will do a proof-of-concept of this scenario.
We'll first try to use the extension part of the url for the wicket
resolution and run wicket as rendering mechanism for a complete resource.
Since the queue of jobs we have to do in the upcoming weeks is quite full it
could take a while till we can share our results, but it would be really
nice if you'd pick up this idea and do some first steps on your own, so we
could pick up what you've done till then.

So all in all the scenario could look like this.
- Script Resolution is done in Sling by default mechanism
- Wicket (wrapped in an OSGi Bundle) picks up a request when adressed by
Sling and handles only the extension-part of the url

The following issues will popup (and more ;) ):
- how to register Wicket (as real servlets or like the "scripted" servlets
(BSF)) - this also includes to get wicket to run wrapped as OSGi bundle.
- how to organise classes and html (completely in an own bundle or is there
something to be placed in jcr)
- how to access jcr content (the sling java api might work in wicket)
- how to include other resources in Wicket (the sling java api might work in
wicket)
- how to share session objects with other resources

So the first task IMHO is to have wicket running in an OSGi bundle and
implement a mechanism to delegate the rendering to the wicket app. After you
get a wicket-page running encapsulated by sling you can think of jcr-access
and try to solve the other points step by step.

Since I've not done much with wicket myself I might not be the biggest help
but that is how I understood this scenario from my point of view.

Best regards,
Dominik

On Fri, Mar 27, 2009 at 9:42 PM, Alex Parvulescu
<al...@gmail.com>wrote:

> Hello,
> I'm new around here, so excuse my ignorance :)
>
> I'm very interested in integrating sling as a content repository with
> wicket
> - but I think this goes for any web framework out there.
>
> I can't redesign the entire wicket application in sling, I've invested too
> much in the framework, but I'm looking for advice on integrating the two.
>
> It the following scenario possible? wicket for UI / admin backend and sling
> as a content repository (images / pdf's) - I don't mind having a different
> admin console for the sling sever, and OSGI really rocks.
>
> I'd like to have the content like 'content/paper/1.pdf' available as a
> static public resource , ALSO have private resources available only to
> logged users AND private resources available only to the resource's
> creator(the author).
>
> Now for the hard part, what are my options for integration  ?
>
>      1# GET/POST & JSON- maybe through apache commons-httpclient ,that
> certinally keeps the systems decoupled.
> In this case I'm wondering how can you share user management? and resource
> access control?
>
>      2# wicket doesn't do OSGI , so I guess a tighter integration is really
> out of the question
>
>
> I've looked around on the wiki and there's not much info into integrating
> with external systems.
>
> What I am trying to find out here is if Sling can bring something new to
> the
> table, or should I go one level deeper, and look into integration with
> jackrabbit directly.
>
> By the way, if anyting good comes out of this, I can happily contribute it
> back to the project as an example/usecase.
>
> many thanks in advance,
> Alex
>

RE: sling - wicket integration?

Posted by paksegu <pa...@yahoo.com>.
Does this means that sling will tightly integrated or remain modular for use of other frameworks that may find sling useful?

Ransford Segu-Baffoe



paksegu@yahoo.com



http://www.noqmx.com/

https://serenade.dev.java.net/

--- On Tue, 3/31/09, Stefan Seifert <ss...@pro-vision.de> wrote:
From: Stefan Seifert <ss...@pro-vision.de>
Subject: RE: sling - wicket integration?
To: "sling-dev@incubator.apache.org" <sl...@incubator.apache.org>
Cc: "Martin Wehner" <mw...@pro-vision.de>
Date: Tuesday, March 31, 2009, 3:53 PM

>And maybe asking the Wicket people what the best option would be would
>be worth it?
>
>Asking how to run Wicket in an OSGi environment might raise their
>interest, and the "Wicket takes over the request processing cycle
>after Sling has selected content" integration that Dominik suggests
>might be of general interest to them.

btw - wicket 1.4rc2 ships already with OSGI bundle metadata included in the
distribution jar.
http://repo2.maven.org/maven2/org/apache/wicket/wicket/1.4-rc2/wicket-1.4-rc2.jar

and there exists a OPS4J - Pax Wicket project with advanced osgi support inside
wicket itself, with support to dynamically load and unload model parts at
runtime without reloading the wicket application itself.
http://www.ops4j.org/projects/pax/wicket/

but i think for the first steps we do not need this features, but will
integrate wicket applications with the sling request processing and are happy to
deploy the whole wicket application itself as osgi bundle into sling.

as soon as we've a first proof of concept integration running, we will post
it here and in the wicket mailing list as well, to see what the others are
thinking.

stefan



      

RE: sling - wicket integration?

Posted by Stefan Seifert <ss...@pro-vision.de>.
>And maybe asking the Wicket people what the best option would be would
>be worth it?
>
>Asking how to run Wicket in an OSGi environment might raise their
>interest, and the "Wicket takes over the request processing cycle
>after Sling has selected content" integration that Dominik suggests
>might be of general interest to them.

btw - wicket 1.4rc2 ships already with OSGI bundle metadata included in the distribution jar.
http://repo2.maven.org/maven2/org/apache/wicket/wicket/1.4-rc2/wicket-1.4-rc2.jar

and there exists a OPS4J - Pax Wicket project with advanced osgi support inside wicket itself, with support to dynamically load and unload model parts at runtime without reloading the wicket application itself.
http://www.ops4j.org/projects/pax/wicket/

but i think for the first steps we do not need this features, but will integrate wicket applications with the sling request processing and are happy to deploy the whole wicket application itself as osgi bundle into sling.

as soon as we've a first proof of concept integration running, we will post it here and in the wicket mailing list as well, to see what the others are thinking.

stefan

Re: sling - wicket integration?

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Alex,

On Fri, Mar 27, 2009 at 9:42 PM, Alex Parvulescu
<al...@gmail.com> wrote:
> ...I'm new around here, so excuse my ignorance :)..

Welcome ;-)

> ...I'm very interested in integrating sling as a content repository with wicket...

So am I, but my Copious Free Time doesn't allow me to actually work on it ATM.

I'd be very happy to see this happen, and the way Dominik suggests
tackling it looks promising. Maybe you guys can join forces on this?

And maybe asking the Wicket people what the best option would be would
be worth it?

Asking how to run Wicket in an OSGi environment might raise their
interest, and the "Wicket takes over the request processing cycle
after Sling has selected content" integration that Dominik suggests
might be of general interest to them.

> ...By the way, if anyting good comes out of this, I can happily contribute it
> back to the project as an example/usecase....

That would be great, and Wicket integration could be much more than a
use case - the nice thing with Wicket is that everything is done in
Java, so you can fully take advantage of debuggers and IDEs. Having
that option in Sling, for people who want to work in this way, would
be great!

-Bertrand