cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <Ralph.Go...@dslextreme.com>
Subject Re: [Proposal] Creating better portal urls
Date Tue, 06 Sep 2005 19:20:00 GMT
Carsten Ziegeler wrote:

>The current portal creates urls like ...portal?cocoon-portal-event=XXX
>for most links. There are some additional things in there, like the page
>labels and the bookmark action and some events can create more readable
>urls, but I think all of this has some disadvantages.
>
>Now, I'm currently thinking of providing a general mechanism that
>creates/uses "real" urls, like
>
>.../main/weblogs or .../main/applications
>
>without any additional parameter.
>
>So, how could this work. What do you think of using this URL scheme:
>.../OBJECT_ID_A/EVENT_INFO_FOR_OBJECT_A
>
>So, in the example from above, the object with the id "main" gets an
>event with the information "weblogs" or "applications". In this example
>"main" is the main tab and the information tells the tab to switch to
>that tab.
>
>But there is more, you can add as many "events" to the url:
>.../OBJECT_ID_A/EVENT_INFO_FOR_OBJECT_A/OBJECT_ID_B/EVENT_INFO_FOR_OBJECT_B...
>
>So the url consists of key value pairs creating "more readable" urls.
>For example: .../main/docs/page/news
>This url switches to the docs tab and passes the info "news" to the page
>coplet and this coplet then displays the news as its content.
>
>These urls are easily bookmarkable.
>
>Of course, for actions like minimizing etc. we still use url parameters.
>Now, to make this work objects have to be made aware of this mechanism.
>I'm thinking of some marker interfaces (with some functions) for layout
>objects and coplets. I have no concrete idea how to implement it, but I
>first want to discuss the idea before getting into implementation details :)
>
>How does this sound?
>
>PS: There will be one minor problem - all objects need a unique
>identier. Currently you can have a layout object and a coplet instance
>with the same identifier. But I think this is no real problem.
>
>Carsten
>
>  
>
Did you look at the ConvertableEvent and ConvertableEventFactory?  The 
idea there was to allow events to be created using the information 
provided in the request. You can see implementations of this in 
FullScreenCopletEventFactory and PortletURLProviderFactory.  The 
ConvertableEventAspect creates the events. I only create the ones for 
FullScreen and PortletURLProvider because they were required to get 
JSR-168 portlets to work properly. I had intended to create more of them 
but I haven't had the need.

Ralph


Mime
View raw message