Milen Dyankov

on a mission to help developers build clean, modular, and future-proof software

Recent Posts

  • January 29, 2011

    Liferay GWT portlet - how to make it "instanceable" and use GWT RPC

    Every once in a while somebody asks about writing Liferay portlets in GWT. It seems a lot of people are successfully using GWT with Liferay but surprisingly I couldn't find any complete tutorial on the subject. There are a of course tutorials explaining the basics but what they concentrate on, is how to build single-instance and client-side-only portlets. This is good enough to get you started but chances are sooner or later you'll need to place two instances of the same GWT portlet on the same page and/or implement GWT RPC to make use of the Liferay services.

    I've reached that point myself sometime ago and unfortunately had to solve the problem myself. Then I wrote sample portlet called gwt-chatrooms-portlet to demonstrate the solution and hopefully save you some time. So here is a step by step tutorial how to create GWT portlet for Liferay 6.0.5 which:

    • allows many instances to be placed on the same page
    • uses GWT RPC for client-server communication

  • December 11, 2010

    Liferay User Interface Development

    The last 6 months were extremely busy for me.  A lot had happened in both private and professional aspects. Having that in mind I'm quite happy I manged to deal with completely new experience - being a technical reviewer of "Liferay User Interface Development" - a new book published recently by Packt Publishing. Despite the lack of spare time I was somehow able to read and comment on drafts of 10 chapters covering things like theme development, layout templates, velocity templates, tag libraries, AlloyUI, and much more. Hopefully my comments and opinions ware useful for the authors and help them improve the book. 

  • November 08, 2010

    Liferay plug-ins adapted to work with Liferay 6.0.5

    As soon as Liferay 6.0.5 was released I decided to adapt my plug-ins to the newest framework version. But as we all know, being determined to do something is not the same as having the time to do it. The good news is, a few days ago I finally quit saying myself "never mind, you'll do it tomorrow" and started getting things done. And now I'm happy to announce that Custom Global Markup, Tailgate and Liferay-UI Taglib Demo are already upgraded to work with Liferay 6.0.5.

    Please read my previous posts "Custom global markup portlet" and "Writing Liferay portlet to display a file in a way "tail -f" does" for more information about Custom Global Markup and Tailgate respectively.

  • July 22, 2010

    Just added 'J' in front of WebThumb

    Yep, good guess, a Java API to bluga.net webthumb in now available. Making your Java application display website thumbnails is now something really easy to implement. Get your API KEY form bluga.net webthumb, download JWebThumb and start requesting and fetching thumbnails with just a few lines of code.   

     
    Why bluga.net webthumb? Nope, I'm not gonna tell you it's the best tool out there, having unique features, ... or any of this marketing bla bla. The truth is, it was the first tool I found, that met my requirements
    • custom size thumbnails
    • support for both JPG an PNG
    • web services or REST based API
    • either creates thumbnail instantly or sends notification when done
    • free version 

  • July 19, 2010

    More "Simple" than "XStream"

    I guess every Java developer dealing with JAVA/XML serialization/deserialization knows about XStream. I was using it for years until yesterday. What happened yesterday? I found out XStream dos not work out of the box with GAE. Well is's not exactly XStream's fault. A lot of stuff does not work properly with GAE due to its limitations and odd security restrictions. But my hope to quickly find patch/workaround, went away as soon as I realized the problem was reported to XStream over an year ago (http://jira.codehaus.org/browse/XSTR-566) and there is still no good solution. 

     

    This way I was forced to look for alternatives. And I found Simple! Conceptually it's a very similar to XStream. Serialization is really simple to use and revolves around several annotations and a single persister object. I got the impression it's noticeably faster than XStream. It's feature list is quite long (it even claims to be bean version tolerant) but so far I've used the standard stuff like converters, transformers, persister, etc.

    However since "Simple"

    • does not depend on 3rd party libraries
    • is available in central Maven repository
    • works out of the box with GAE
    • is capable of doing everything XStream is doing  

     

    it's about to become my number one XML serialization/deserialization tool. At least until I discover it's dark sides.