Fórum

Liferay and mobile devices

thumbnail
Milen Dyankov, modificado 13 Anos atrás.

Liferay and mobile devices

Regular Member Postagens: 171 Data de Entrada: 23/09/09 Postagens Recentes
I've been dealing with web applications for mobile devices for the last several years. Therefore although I like Liferay a lot, I always thought it should do better than the simple "isWap" approach. I even had a short chat with Brian Chan during European Symposium in 2010 about device recognition and content adaptation. We both agreed most modern devices understand (X)HTML and it makes no sense to put effort into supporting few years old WML-only phones. However while markup support is not an issue any more, the amount of screen sizes, pointing devices, input methods, operating systems, ... is rising every day. With iPad (and tablets in general) becoming more popular it gets even more important for the companies to be able to adapt their services to user's device.

Recently I spent some time working on extending Liferay to provide device recognition capabilities. I used WURFL (Wireless Universal Resource File) as device database but in fact Volantis Mobility Server or any other solution can be used. I have also created a simple hook to define device rules to change portal theme or redirect to different URL, depending on user's device capabilities. For more details please see my blog post

The future plans include
  • providing reference to Device object from ThemeDisplay. This way content templates can use it to adapt the content to devices capabilities.
  • rules for changing page layout
  • add CSS per device

By posting this message I'm hoping to get some feedback and constructive criticism. Do you feel such functionality is useful/needed? Do you like the approach or would rather do it completely differently? Of course if there is an interest to include such functionality in future Liferay versions I don't mind contributing the code.
thumbnail
Juan Gonzalez P, modificado 13 Anos atrás.

RE: Liferay and mobile devices

Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
First of all, thanks very much for contributing the code Milen!

Milen Dyankov:
We both agreed most modern devices understand (X)HTML and it makes no sense to put effort into supporting few years old WML-only phones. However while markup support is not an issue any more, the amount of screen sizes, pointing devices, input methods, operating systems, ... is rising every day.

Totally agree with this.
Milen Dyankov:

rules for changing page layout
add CSS per device


Wow I like these ones!

Milen Dyankov:

By posting this message I'm hoping to get some feedback and constructive criticism. Do you feel such functionality is useful/needed?

Yes, it is! In fact custom Liferay themes/layout based in input devices is one of the few important things left to do in Liferay IMHO.

Milen Dyankov:

Do you like the approach or would rather do it completely differently?

I didn't read the source code, but approach using rules and devices database seems very good one.

Milen Dyankov:

Of course if there is an interest to include such functionality in future Liferay versions I don't mind contributing the code.

Wow this would be great!
thumbnail
Jorge Ferrer, modificado 13 Anos atrás.

RE: Liferay and mobile devices

Liferay Legend Postagens: 2871 Data de Entrada: 31/08/06 Postagens Recentes
Hi Milen,

Thanks a lot for sharing this. I fully agree with you on the importance of improving the support for mobile devices in Liferay to make it easier to build mobile websites and applications with it.

Actually we talked about it a lot during our last developer retreat back in December (the dev retreat is an annual event in which all core developers meet for a week) and as a result we identified the following lines of action:
  • Improve the mobile detection support. Short term, this would involve changing the hardcoded check for WAP support to allow for a configurable identification of mobile devices. Later we had plans to allow an even more flexible detection, similar to what you seem to have done using WURFL.
  • Allow creating multi-device sites. We came to the conclusion that to provide a unique mobile or tablet experience a site administrator must have full flexibility to define a separate set of pages and configuration of each page. In order to support that the plan is to allow building for each site sites which can be administered separately but which can reuse the same content.
  • Optimize the UI of specific core portlets for mobile devices.
  • Develop native applications for specific portlets. We are evaluating different strategies to do this. It would probably be a medium term task.


We plan to have some of this in the upcoming 6.1 release and the rest in the one after that. If you guys want to collaborate, that would be very welcome.
thumbnail
Milen Dyankov, modificado 13 Anos atrás.

RE: Liferay and mobile devices

Regular Member Postagens: 171 Data de Entrada: 23/09/09 Postagens Recentes
Hi Jorge,

it seems like every time I try to help improve Liferay, it turns out you guys are one step ahead and already working on it ;). But hey, I'm very glad to hear mobile device support is going to be improved in future versions.

By the way, I don't recall any information or community discussion on this subject. May be I somehow missed it and if so please point me to right urls. But in case the concept described by you was not yet publicly discussed, it may be a good idea to do so. I believe many community members face requirements about mobile devices support on day-to-day basis and may help you better understand what different markets demand (I believe there will be significant difference between North America, Europe and Asia - not to mention specific countries).

From developer perspective, what you describe seems logical and very promising. It would be great if you can provide some more implementation details and rough planning. As for the actions:
  • I'm not sure what you mean by "configurable identification of mobile devices" but my experience shows that in most cases one need to know what key capabilities given device has. This means there has to be device database of some sort. I believe WURFL is sufficient for most cases, but apparently Volintis is (used to be) more accurate. There is also UAProf but a I'm not sure how mature it is.
  • As for "multi-device sites" I think this is the way to go. I thought about doing something like this (I was thinking in terms of page/community versions) but I decided it would be rather hard and unsafe to do such change by myself. Thus the "redirect" approach which is a pain to configure (if you go page by page) but was easy do develop and from end-user perspective has the same effect.
  • I haven't considered the last 2 points myself, but it's god hear you are ;)


As I said earlier I can contributing the code (or any part of it) if you find it useful. I'll also be happy to collaborate and help deliver better support for mobile devices in 6.1
thumbnail
Jorge Ferrer, modificado 13 Anos atrás.

RE: Liferay and mobile devices

Liferay Legend Postagens: 2871 Data de Entrada: 31/08/06 Postagens Recentes
Milen Dyankov:

it seems like every time I try to help improve Liferay, it turns out you guys are one step ahead and already working on it ;). But hey, I'm very glad to hear mobile device support is going to be improved in future versions.


Ha, ha. Please don't take it that way. It's actually the other way around. Both, Liferay the product and Liferay the company are the way they are because of the ideas and feedback from all community members. I strongly believe that many of the most interesting ideas about a product will come from outside the company leading its development and there are plenty of examples in Liferay Portal to prove that.

In other words, please keep your ideas coming because they will always be heard.

Milen Dyankov:

By the way, I don't recall any information or community discussion on this subject. May be I somehow missed it and if so please point me to right urls. But in case the concept described by you was not yet publicly discussed, it may be a good idea to do so. I believe many community members face requirements about mobile devices support on day-to-day basis and may help you better understand what different markets demand (I believe there will be significant difference between North America, Europe and Asia - not to mention specific countries).


There hasn't been any specific discussion about the points that I mentioned in my previous post because it's quite new. Of course, there have been many discussions about mobile support during the last years, but there were lots of different proposed approaches and there wasn't any clear direction to take.

Since the mobile panorama seems to be much more clear now I think it's time to find that consensus and go forward with significant improvements to the product. I have been spending the last weeks getting feedback from people inside the company and the points that I mentioned in my other post are the summary of it.

One of my goals with my answer to your post was to let you and other community members interested in mobile development know about it. Don't take it as something written in stone, it can still be changed based on what is decided from our conversations.

Milen Dyankov:
  • I'm not sure what you mean by "configurable identification of mobile devices" but my experience shows that in most cases one need to know what key capabilities given device has. This means there has to be device database of some sort. I believe WURFL is sufficient for most cases, but apparently Volintis is (used to be) more accurate. There is also UAProf but a I'm not sure how mature it is.


  • Agreed. The WURLF XML is not copyrighted but the libraries are GPL. That means that we cannot use the libraries as part of the core product (since it would make the whole product GPL).

    We can either build our own code around the XML, implement a simple detection in the core and leave the WURLF based detection in a plugin or look for a different library.

    Milen Dyankov:
  • As for "multi-device sites" I think this is the way to go. I thought about doing something like this (I was thinking in terms of page/community versions) but I decided it would be rather hard and unsafe to do such change by myself. Thus the "redirect" approach which is a pain to configure (if you go page by page) but was easy do develop and from end-user perspective has the same effect.


  • I'm glad you like the idea. I think the goal should be to provide a good-enough mobile experience out of the box on any site with the default theme and layout templates, but then if a site admin wants to build a fully optimized mobile experience then provide him/her with the tools to do it.

    Of course, when I'm saying mobile experience I'm really referring to the new generation of devices, including tablets.

    Milen Dyankov:

    As I said earlier I can contributing the code (or any part of it) if you find it useful. I'll also be happy to collaborate and help deliver better support for mobile devices in 6.1


    Awesome, your help will certainly be appreciated. I need to check with Mike Han about the plans that he had about mobile detection so that we can define a plan together and you can let us know how you think you can help.

    If you would also like to help in any of the other points, please let me know too.
    Mohit Chhajed, modificado 12 Anos atrás.

    RE: Liferay and mobile devices

    New Member Mensagem: 1 Data de Entrada: 15/11/11 Postagens Recentes
    Hello,

    I am new to liferay so trying hard to learn. I love this product as I used to work with WebSphere Portal server. The plug-ins provided with it is osam.
    Currently I am trying to integrate Volantis MCS with liferay. I am able to configure MCS filter to convert XDIME in device specific mark-up, Theme is start working and XDIME is start converted into device specific markup. The small issue I am facing here is the when liferay portal aggregator aggregates the portlet content by using $portletDisplay($writer) in theme it is adding some additonal html code. I want to stop adding that generated html code before giving it to XDIME parser. How can I do it or Can someone help me to write a XDIME page aggregator? or guide me the current aggregator, I will take reference and write my own xdime aggregator.

    I use the WURFL, Device hook and multi-device plug-in, but issue is we have to write device specific themes, and in volantis we don't have to do this.

    Once I will able to do this, I am planing to integrate WURFL with Volantis device repository

    thanks.
    Mohit
    thumbnail
    Milen Dyankov, modificado 12 Anos atrás.

    RE: Liferay and mobile devices

    Regular Member Postagens: 171 Data de Entrada: 23/09/09 Postagens Recentes
    I'm not sure I understand your approach and thus the problem you have.
    Are you trying to make Liferay produce the whole page as XDIME and then pass that to Volantis to parse? If so, then you probably have custom Liferay theme which produces XDIME output. If that is the case, then you'll be facing a number of issues but the most important is that all Liferay plug-ins (themes, layouts, portlets) will need to be aware of that and produce XDIME compatible output as well.

    Is your code available so I can have a look at it? It's been already a few years since the last time I worked with Volantis MCS but I might be able to help if I could try it out myself.

    As for the XDIME page aggregation, I'm not sure it's something worth doing. We head a PoC few years ago, about DIAL (the official W3C specs based on XDIME) based mush-up framework. The idea was to allow different content providers to publish their content in DIAL markup to be displayed on portal pages (ATG at the time) dedicated to mobile deceives. Although the PoC was successful, the project was abandoned since it become clear that more and more mobile devices are adopting XHTML MP 1.1. Today, long after W3C discontinued their work on DIAL and having HTML5 widely adopted on modern mobile devices, it makes no sense in my opinion to further stick with XDIME.

    However I think Voilantis' device database can still be used (as a replacement for WURFL) for device detection.
    thumbnail
    Namrata Hangal, modificado 12 Anos atrás.

    RE: Liferay and mobile devices

    Regular Member Postagens: 161 Data de Entrada: 27/07/10 Postagens Recentes
    Hi Mohit,

    I too am looking into integrating tools like Volantis, MobileAware with Liferay, but have no clue as to how to begin.
    Could you please share a summary of steps? Some of the terms in your post are beyond my understanding emoticon

    Thanks and Regards,
    Namrata
    thumbnail
    Milen Dyankov, modificado 12 Anos atrás.

    RE: Liferay and mobile devices

    Regular Member Postagens: 171 Data de Entrada: 23/09/09 Postagens Recentes
    Can you explain what exactly you mean by "integrating tools like Volantis, MobileAware with Liferay"? Is it only device recognition you are after? Or may be are you also trying to have the portal produce valid XDIME which in turn can be converted to device specific markup?
    thumbnail
    Namrata Hangal, modificado 12 Anos atrás.

    RE: Liferay and mobile devices

    Regular Member Postagens: 161 Data de Entrada: 27/07/10 Postagens Recentes
    Hi Milen,

    I've never had the opportunity to get an insight into the concept of "mobile device recognition", or integrating applications that do so with the portal. emoticon

    But, based on the explanation you have provided (thanks, I understand a lil' better now! emoticon), I guess the client is looking for both -
    a) recognize the mobile device, and
    b) render the appropriate markup for the recognized device

    So, my queries are basically -
    a) How would a tool like MobileAware along with Liferay help me wrt the two points above?
    b) How difficult is it to achieve this?
    c) And, how to achieve it?
    thumbnail
    Milen Dyankov, modificado 12 Anos atrás.

    RE: Liferay and mobile devices

    Regular Member Postagens: 171 Data de Entrada: 23/09/09 Postagens Recentes
    Namrata Hangal:

    a) recognize the mobile device

    This is the easy part.
    • In Liferay 6.0.x you can achieve this with Liferay multi-device extension.
    • In Liferay 6.1.x the main functionality is available out-of-the-box and WURFL based device recognition is available in liferay plugins repo.

    Both use internal Liferay bus to talk to wurfl-web plugin which in turn uses WURFL for device detection. However you can write your own plugin in place of wurfl-web to provide detection based on different provider (Volantis, MobileAware, ...)

    Namrata Hangal:

    b) render the appropriate markup for the recognized device


    This is the tricky part as it means you will need to change the way Liferay produces HTTP response. Basically you have 2 options:
    • Extend Liferay's redering logic to produce appropriate markup for the recognized device. This may involve embedding or remote calling 3rd party tool to figure out what the markup should be. Then generate the output somehow: hardcoded logic, some transformation rules, another tool, ....
    • Extend Liferay's redering logic to produce some pseudo code (XDIME in case of Volantis) and then filter it through appropriate tool before sending back to the client.

    Both are, IMHO, rather complex tasks which require good understanding of Liferay's internals. You will need to make sure that all of the peaces the portal is made of, support the approach. I mean things like themes, layouts, portlets, contents, ...
    Personally I don't think it's worth the effort if it has to be implement portal wide. If you only have to deal with limited number of functionalities then may be ...
    thumbnail
    Namrata Hangal, modificado 12 Anos atrás.

    RE: Liferay and mobile devices

    Regular Member Postagens: 161 Data de Entrada: 27/07/10 Postagens Recentes
    Thanks Milen for providing a pretty good head start emoticon
    I'll get down to exploring these options now...

    Regards,
    Namrata
    thumbnail
    Gib Veconi, modificado 12 Anos atrás.

    RE: Liferay and mobile devices

    Junior Member Postagens: 34 Data de Entrada: 10/07/07 Postagens Recentes
    Hi:

    Where can I find the wurfl-web plugin for 6.1?

    Thanks,

    Gib
    thumbnail
    Milen Dyankov, modificado 12 Anos atrás.

    RE: Liferay and mobile devices

    Regular Member Postagens: 171 Data de Entrada: 23/09/09 Postagens Recentes
    Gib Veconi:

    Where can I find the wurfl-web plugin for 6.1?


    Hmm, it seams non of the 6.1 plugins is available on the official plugins download page. Not sure if this by mistake or on purpose (perhaps something to do with marketplace). Anyway you can get the plug-in from SourceForce.
    thumbnail
    Gib Veconi, modificado 12 Anos atrás.

    RE: Liferay and mobile devices

    Junior Member Postagens: 34 Data de Entrada: 10/07/07 Postagens Recentes
    Thanks! Was wondering where the 6.1 plugins were.
    Guenter Baumgart, modificado 12 Anos atrás.

    RE: Liferay and mobile devices

    Regular Member Postagens: 119 Data de Entrada: 27/01/12 Postagens Recentes
    TDo you feel such functionality is useful/needed? Do you like the approach or would rather do it completely differently?


    The device recognition is just the very beginning. I tested Liferay with a custom mobile theme and I figured out it isn't fast enough. I made this test with a simple tree of categories and some articles attached.

    The custom theme however should be completly ajax driven instead of reloading every page. Its still unclear to me that we can recieve all Liferay's content that way. However we started to migrate Liferay's built-in objects into our solution and hopefully we can contribute something soon. Here is a little preview : http://bit.ly/Afgbvr.

    We still have some problems to identfy Liferay's most wanted features on mobile. It would be great if someone could tell us whats important for Liferay users on mobile. Multi-Site, Asset-sharing and "App-Inheritance" and plenty of other such things we have as built-in. We also support full access to all key aspects of an Enterprise driven mobile application. CSS3/JS/Assets online editors, etc..

    Would you say that the forum and the shopping are important to have on mobile ? Plays native iOS(phone+tablets) / Android a role to you ?
    thanks,g