Archive for December, 2008

Work done with Wicket on JSR-286 (WICKET-1620)

Wednesday, December 24th, 2008
One major aspect of my work here was completing the Portlet 2.0 specification JCR 286implementation in Wicket . Wicket of course being one of today’s Top web development frameworks and a pleasure to work with. All the work sits under the Wicket issue WICKET-1620 .

JavaDoc

When I came on the scene, Portlet 1.0 support was complete, with the help of Apache Portal Bridges and work on Wicket resource serving support was mostly complete. The first daunting task however, was completing the documentation for nearly the entire existing Portlet support in Wicket. This was a big learning experience and a deep look into Wicket internals (which btw, made me a bit nervous about my upcoming event implementation task). This was mostly completed in WICKET-1875 , with the a lot more additional javadoc included in my patches for WICKET-1620.

 

Events

It was pretty much decided that I wasn’t going to try and do anything at this stage with the public render parameters part of the spec, and was going to focus on the Events system. This was a much bigger task than any of the other parts of the Portlet 2.0 spec, and a lot more complicated than I expected.

However, in the end, I think I came up with a pretty nice solution. After some false starts, I ended up implementing with custom

 

  • WebRequestCycleProcessor
  • AbstractBehavior
  • BehaviorRequestTarget

aptly named

  • PorletWebRequestProcessor
  • AbstractPortletEventListenerBehaviour
  • PortletEventRequestTarget

This really fits into Wicket superbly well, a testament to the sophisticated, yet reasonably straight forward (considering the problem domain) extensibility of Wicket. Bravo.The patches are sitting with the issue, and now that I have some extra time, I will massage them some more and I’m confident that they will be in Wicket 1.5. Included with the patches is also a simple example application.

Known issues with the implementation at this stage are:

 

  1. Issues around events in response to events
  2. Resource URL’s being generated for links, in some cases, instead of Action URL’s.

 

On my second to last day at Componence, I gave a presentation to the company on the work I had done. Posted below are two small sections of that presentation (Keynote is lots of fun) which show the gist of it.

Basic flow of code through the events sub-system

Basic flow of code through the events sub-system

Triggering an event is merely a call into the Portlet API and letting the hosting Portal take care of the rest.

The basic steps for receiving a Portlet event are as follows:

  1. Wicket receives an event request - this is like a normal HTTP request (or a Action request in Portlet speak - so to speak ;)
  2. Wicket calls into the custom (registered) PorletWebRequestProcessor.
  3. The PorletWebRequestProcessor checks the context is an Event Request - otherwise the processing is delegated to the parent.
  4. The Request Target is resolved to the custom PortletEventRequestTarget.
  5. During the normal Wicket request processing, at the appropriate stage, calls into our PortletEventRequestTarget the processEvents method from the IEventProcessor.
  6. Inside this method call, we search through the page’s component tree looking for behaviors attached to components which extend the AbstractPortletEventListenerBehaviour. The search performed is a depth first recursive search. I have a niggling feeling that this could perhaps be improved somehow.
  7. When found, the event name is checked to see if it matches the name of event the behavior is registered as wanting to subscribe to.
  8. If they match, we call into the behavior, passing in the Event.
  9. Hey presto!

In hind sight it all seems a little simple now ;) But of course I have come out the other end a much wiser and learned man - gotta love the opportunity to learn from Open Source! So my current view is of course, biased.

wicketevents-code

Code example of using the events API

I’m very proud of the work I’ve done on Wicket and am very excited to see it make it into trunk. As I said before, the next step is to polish up the patch and remove extra unneeded code (it’s pretty big), so that the core guys can review it properly.

A snapshot of the end of my talk at Componence about Wicket et al

A snapshot of the end of my talk at Componence about Wicket et al

Author:    Antony (Tony) Stubbs
Source:    Tony’s Blog on http://stubbisms.wordpress.com/

Optimizing WebLogic Portal for search engines

Monday, December 8th, 2008

External or internal facing?

Something to take into consideration when starting up a customer facing portal is its SEO friendliness. For instance, WebLogic Portal generally has endless URLs with structures and characters that just don’t make sense to search engines. Though this might not be a problem for internal facing portals, it is a big problem for all external facing portals.

Lead generation
Search engines, like Yahoo or Google, are crucial to generating business on the internet. Without optimization your portal can easily miss out on 5 to 10 times the amount of visitors, and potential clients, who currently come through the search engines. Just imagine how much easier it would be to defend your online marketing / investment budgets, if the amount of visitors were to double or triple?

Search Engine Optimization Portlet
At Componence we have years of hands on experience in solving this problem for a lot of publishing and online information business. Our special Search Engine Optimization (SEO) portlet offers a diverse range of features that will allow you to manage your portal’s behavior and visibility in search engines:

 

  • Automating the meta data generation (title, keywords, description) from specific portlet pages;
  • Using taxonomy data to be used as meta data;
  • Allowing you to manage your own search engine friendly URLs that are more relevant;
  • Allowing you to manage and generate the site maps for Google or Yahoo;
  • Allowing you to manage the proper content and redirection for error pages;

You can download our special whitepaper for our SEO portlet solution hereseo_portlet