thumbnail

  The question of whether Eclipse MicroProfile should join or be merged with Jakarta EE has come up several times over the past few weeks as the implications of the Jakarta EE javax renaming question have been discussed. Related blog post: Liferay's Position Regarding the Jakarta EE Namespace by Neil Griffin. It should be noted that Eclipse MicroProfile is a completely...

thumbnail

I really love how everyone at Liferay is taking to the OSGi development model. It makes me proud to see how much work has been done in this regard. There's one very cool area I think is worth expanding on. Requirements and Capabilities What is it? Some history. The Requirements and Capabilities model is a surprisingly powerful concept born from the 17 years of experience...

thumbnail

Over the past couple of years Liferay has invested a considerable amount of effort to re-engineer Liferay Portal version 7.0 with modularity as the key focus. As part of this effort we've adopted OSGi as the modularity layer. In September of 2013 we decided that in order to provide ourselves the most direct access to OSGi expertise we should join the OSGi Alliance as a...

thumbnail

We've been doing a lot of work to improve modularity of Liferay the past while. Liferay 6.2 has experimental support for OSGi but there's not much in the way of integration points. You can certainly do some cool things, but it's not integrated to the point of making the developers life much simpler than before. However, in Liferay 7.0, one of the things we're working on is making...

thumbnail

I've been working with JMH (Java Microbenchmark Harness) [1] written by the OpenJDK/Oracle compiler guys. JMH is a microbenchmark test harness which takes care of all the concerns that most developers can't really wrap their head around and often neglect to take into consideration. It's discussed here [2] by it's primary developer. And here [3] is a good write-up about it. JMH is...

thumbnail

When is breaking something not a bad thing? When it's done with purpose. When the result is better than the original. So, if you know you have broken something, and that means it's broken for everyone, why stop with just the currently required change? Why not fix everything that was wrong in the first place? If an API was bad, and you had to make a small...

thumbnail

The other day I posted about setting up to baseline Liferay for detecting violations to semantic versioning. Today we made another advance to make it even simpler. We created an OBR (OSGi Bundle Repository) which houses the last release of Liferay (the first which is built with semantic versioning tooling in place in the...

thumbnail

Currently in master when the report is printed I see this (among many others): * com.liferay.portal.kernel.dao.search MINOR 6.2.0 6.2.0 6.3.0 VERSION INCREASE REQUIRED < class com.liferay.portal.kernel.dao.search.DisplayTerms + method isSearch() + return boolean Notice the leading * in the first...

thumbnail

As mentioned in a previous post, you may have noticed the reports that are spit out when doing portal builds in the last couple of weeks. These reports show API changes based on a baseline API version which would have been established automatically the first time you built the portal after semver went in. This is fine for getting a basic grasp of ongoing changes as I explained in...

thumbnail

Liferay is in the initial phase of semantically versioning all it's java source code. Yay! What? If you don't know what semantic versioning is, here are two essential references on the subject: http://semver.org/ Summary Given a version number MAJOR.MINOR.PATCH, increment the: MAJOR version when you make incompatible API changes, MINOR version when...

thumbnail

It has finally happened. Liferay is a proud member of the OSGI Alliance   So what does this mean? Well, immediately it means very little, technically. However, what it means philosophically is that we really care about everyone who uses our products. It means we will continue to strive with every ounce of our being to make Liferay better. What's correlation...

thumbnail

Ever since the Faceted Search API came out there have been a ton of great questions about how to go about creating very specific filters. A recent one is: "find both journal-articles and only PDF-files from Documents and Media Library" This kind of requirement is not suited to being implemented as Facets. Facets are "metrics" calculated across an entire result set. As...

thumbnail

Every year a project grows more complex the difficulties of managing backward compatibility become more complex.   The strain imposed on APIs as time passes is tremendous. Developers want APIs to be extended to exract every ounce of functionality. Bugs require fixing, often requiring APIs to be modified or sometimes requiring complete removal or...

thumbnail

Ok, so don't. This doesn't mean you can't gain advantage of Liferay. Also, what follows is not just a story about Sharepoint. If you have any HTML site of any kind you can gain advantages from using Liferay. Liferay has this crazy simple mechanism called "widgets". Yup widgets! The term has been used, we know, but Liferay has seriously had this feature since at least...

thumbnail

Liferay has been slowly integrating an OSGi framework into it's core; not in the sense that Liferay will nessecarily run "within" an OSGi runtime itself (there are arguments for doing that, and it's possible to a certain extent but the gain just isn't in doing that just yet), more that Liferay will "host" and OSGi runtime within itself that Liferay will utterly control. Why do...

thumbnail

  I had planned to speak at this years North American Symposium about our ongoing work with OSGi. However, sadly due to several different factors that didn't happen. It's too bad because as it turns out at least two dozen people asked me: What happened to the OSGi plans? Was it dead? When would it come? Was there a talk on it disguised as...

thumbnail

At this year's Liferay North American Symposium I did a talk on Big Data. The goal of the talk was to illustrate some cases where Liferay and the broad notion of "Big Data" intersect. Most importantly I showed an example which stored Documents & Media portlet files in Hadoop's extremely scallable and fault tolerant Dynamic File System (a.k.a. HDFS). The same example...

thumbnail

I'm almost back home from San Francisco after yesterday's completion of Liferay's 2012 North American Symposium. I'm quite exhausted but what a great event to be a part of. For this small town Canadian boy, travelling to historic big cities to meet with old friends I rarely get to see face to face is an experience I will never take for granted. Every turn through the crowd there seemed...

thumbnail

In order to maintain its extensive deployment matrix, Liferay up to 6.1 has been locked to Java 5 APIs. However, Java 5 started its EOL cycle on April 8th, 2007 and completely it on October 8th of 2009. Furthermore the last app server that still required Java 5 has finally been EOL'd itself at the end of 2011. This means that Liferay 6.2 is now free to adopt Java 6. ...

thumbnail

It's been so long since I've written anything, I've been fealing rather guilty. Luckly recently we've been undertaking a huge effort to document features of Liferay, old and new. One interesting but highly understated feature of Liferay 6.1 is the new Faceted Search support that I was lucky enough to get to work on. As I finished the first round of documentation (for my...

thumbnail

Liferay has long had the ability to embed portlets in themes. This is convenient for implementors to get highly functional design into the look and feel of a site. In my years at Liferay I've seen and heard many different attempts at doing this with various levels of success. There are a number of things to consider when embedding portlets in the theme and the same method does...

thumbnail

  Spring's dependency injection framework is the picture of ubiquity in the java world. As such it aims to drive developers toward declarative, component driven design and lose coupling. But, it is largely a static container. The class space is flat and once started there is little means for dynamic change.   OSGi is "the"...

thumbnail

I've taken to using github.com's gist service quite alot recently and so I wanted to just spread the word that there are some handy nuggets appearing there. Here's the url https://gist.github.com/rotty3000. Examples: list open and accessible sites (that a user could join, or may already be part of) a simple localization hook embed navigation tag...

thumbnail

Over the past several months I've been working on integrating an OSGi framework into Liferay Portal. The reasons for doing so are varied but include solutions to app server/servlet container dependency, library version conflicts, runtime module lifecycle, advanced extensibility, and so on. If you are not familliar with OSGi, I recommend visiting the OSGi web site, and in...

thumbnail

To continue a recent string of theme related posts, I'm going to add another on the recently added feature allowing addition of advanced input controls and behaviors to theme settings. Themes are the whip cream that bring flavour and sweetness to our portal fruit salads. Without beautiful and clever theme designs our fruit salad may taste healthy but can be bland and leave us...

thumbnail

Ok, so in the last post I talked about JSP Include Buffer. That post talked about how you'd override JSPs from Liferay's core in a maintainable way. Now I'd like to introduce you to a Liferay Theme feature, new in 6.1, that will grant you much more power when it comes to manipulating portal views from your theme using that plus this additional feature. From your theme you can...

thumbnail

There are plenty of times when you might want to alter the default views of the portal. I'm not going to go into the why since that is hugely subjective. What I do want to show is the how you can do this in the most maintainable way possible. The largest concern with core JSP modification in projects is of course maintainability. JSPs have no "extensability" feature of their own...

thumbnail

Recently I was asked how to do this! Well, it's rather simple (providing you understand the limitations of accessing portlets without permission, and portlets that are not allowed to be loaded dynamically; a.k.a. add-default-resource, and so on). Here goes! First I created a simple web content structure/type with the following definition: <root>    ...

thumbnail

All secure RSS feeds now transparently support BASIC  Authentication. The behavior is such that when you're logged in, the feeds will simply work as expected if you open them directly in the browser. If you log out, you'll suddenly be promted for BASIC  Authentication. If you use the url with an external RSS client and that client supports BASIC Authentication...

thumbnail

This example demonstrates several advanced features of Liferay's Web Content Management provided when taking full advantage of Liferay's Web Content Template processing engine. It'll demonstrate implementing PHASES of the portlet lifecycle, performing AJAX calls, using Alloy Javascript Library, using Liferay's SearchEngine, converting java objects to JSON for passing back as AJAX...

thumbnail

Last week I wrote about a hook we wrote for Expandos using MongoDB. I just wanted to let you know that it just finished review and is ready for consumption. It's been renamed to mongodb-hook in case we ever want to persist more services to it. Have a look and enjoy!

thumbnail

Update: The expando-mongodb-hook plugin is now committed to SVN and available from trunk. Over the past few months the hype around NoSQL type databases had really been heating up the tech news and blog feeds. There seems to be an overwhelming desire to find scallability solutions that don't seem to be addressed with an RDBMS. What is Liferay to do? Could Liferay support...

thumbnail

The JCP Election is just around the corner and Liferay is on the ballot for the first time ever. Being that it is the first time, you may want to know what motivates Liferay's desire for a seat on the JCP?Frankly it's not a political one. It's purely pragmatic! Liferay would like to see things get done, to see the JCP process in the most effective state it can be. Liferay is not new to...

thumbnail

A while back I wrote a post about adding custom tools to the Liferay Velocity context. In 6.0 a change was made such that the behaviour has changed slightly. Now all such tools are plain old beans which must implement an interface. The changes also means that I have a lot less code to write and less wiring to do. Let's see how we'd do it now using exactly the same tool as...

thumbnail

When should you use a debugger during development? At ALL times! At least that's my view. Isn't that a hassle? Well debugging sure can be, but if you setup your environment in a specific way, it can actually become very fast and almost transaprent. I like transparent! Here are steps I take to configure my tomcat (I've followed the same steps with JBoss): Note the...

thumbnail

 So my last blog post involved a classloader trick for velocity but it also involved a problem of dynamically listing article fragments on a page. Now, there are a few ways to do this, but the two that come to mind are: 1) Render each article using a specified template which only shows the content of the desired fields (fine, but seems overkill) 2) Parse the article...

thumbnail

Recently I was asked to solve a WCM dynamic Template problem which involved listing articles using the business logic of the template. One of the first problems I encountered was of course doing a search for the Articles via the JournalArticleLocalService which, in the case of the searchs which return List<JournalArticle>, require an OrderByComparator. Since there is no...

thumbnail

We've been saying for a long time that you could write plugins in a variety of languages, but we never really had any examples to prove that. Of course some languages will be far simpler to achieve this that others. It'll be far simpler to do this using languages that have native java bindings. Groovy is writen natively in java and even extends the JDK with awesome new features, so...

thumbnail

Some of the latest details about Liferay Staging in 6.0 are now on the Wiki: Staging - 6.0 Local Live Remote Live Better Differential Publishing Stored connections settings for remote staging (as you'd expect) Un-Staged Portlets (pick and choose which portlets are staged) Lots and Lots of fixes and usability improvements Let us know what you...

thumbnail

I haven't been blogging as much as I'd like... My return to core after a long year+ on a project hasn't turned out quite the way I had envisioned.  (Don't get me wrong, I'm SOOOO happy to be back; although, to be fair I was with an awesome client.) I had two particular things in mind when coming back: 1) lots of new code to play with2) lots of blogging about all things...

thumbnail

When working with Liferay, sometimes you might encounter classpath issues during ant builds. I have a little trick which may help. It's a small bit of xml that you can add to a target which dumps a classpath by refid:    <property name="debug.classpath" refid="service.classpath"/> <for list="${debug.classpath}"...

thumbnail

I use Git and VI(m) quite a bit, and in the Liferay project the source format rules define that leading whitespace character is tab (with potentially trainling spaces before the rest of the line in some cases, but that's another story). Furthermore, tab width is 4. Since I'm commonly in the command line I hate that the source doesn't represent the same way that I see it in...

thumbnail

I was looking for a way to add as much relevant info about my Liferay git repository to my prompt as would not slow it down to much, cause I hated having to constantly do git branch/status to find branch/state all the time. So after reading a couple nice posts about it, http://henrik.nyh.se/2008/12/git-dirty-prompt http://plasti.cx/2009/10/23/vebose-git-dirty-prompt I took...

thumbnail

Quite a while ago I wrote an article on Liferay's Expandos (on top of which our Custom Attributes (Custom Fields) are built), using the WCM as the runtime for a small app called First Expando Bank. Since that time the API has undergone slight alterations and so since there was so much interest in it, here is new implementation which does a better job of showing how to use the...

thumbnail

Do you maintain/use a Mobile delivered App? Do you maintain/use a Point of Sale delivered App? Do you maintain/use a Kiosk delivered App? Do you maintain/use a Terminal Server delivered App? Do you maintain/use a Thin Client delivered App? Do you maintain/use a standalone or embeddable Web App or Widget?   If you can answer yes to anyone of these questions,...

thumbnail

I know that some people are suggesting using the setenv.sh script to control JVM settings for tomcat.Notably I see adding JMX configurations this way, among other things.Be careful what you add to this script as some things, like JMX settings, will break the ability to use the shutdown scripts.The setenv.sh script is called regardless of startup or shutdown of tomcat. If you add JMX...

thumbnail

I've recently been reading Pragmatic Thinking & Learning: Refactor Your Wetware by Any Hunt, Pragmatic Bookshelf, and it has really got me thinking... (Yes, that was pretty lame. HaHaHa!) Actually it got me thinking on "context", "perspective", "metaphors", and in particular the definition of "Pair programming", which struck me as interesting. Pair programming is a highly...

thumbnail

Have you ever had a super freakish problem with the Liferay CSS Not doing what you expected? I mean I love Liferay's new Minifier, it's fast and efficient. But, it's no fun when you have problems. Suppose you have some css: .something-a .something-b,.something-c .something-d,.ie6 .something-e {  ... do this ...}.something-g {  ... do that ...} Looks innocent...

thumbnail

I've seen a tone of requests lately for how to add Expando Tables and Columns programatically during some startup proceedure. The biggest problem seems to be with PermissionChecker. The problem stems from the fact that alot of people are trying to use the ExpandoBridge API to create columns (attributes) during the startup process. The issue with that is that the default...

thumbnail

Well, I decided this week, while I was "in the field" that I would give GMail a try. I've had an account for a long time now, but I'm used to having everything local on a machine where I store gigs and gigs of mail from at least the past 8-9 years. I'm a email pack-rat I guess.. but it has saved my butt more than once. But, it's hard to carry around a desktop just...

thumbnail

Well, over the last couple years I've been largely working from a laptop. I thought I liked it... until recently I simply needed more power. I went ahead and did some research and found that there was an amazing deal out there that was simply too good to pass up. The Dell Studio XPS, featuring the new Intel i7 series processor. This thing is simply amazing. It...

thumbnail

[PS: this is my personal opinion and should not reflect in anyway the great company I work for.] Quite often we hear the saying that a person is the product of their environment. We all know that everyone is unique and that this uniqueness boiled together with the events and experiences of a lifetime which make for truely unique individuals. That being said,...

thumbnail

Alot of people seem to have problems deploying custom plugins to liferay. I admit that deployment can be a little tricky. First off, Liferay has a naming convention which is more than just a naming convention and is actually designed to impose behavior. I think that in the future this should be changed to be based strictly on metadata contained in descriptors. Anyway, that...

thumbnail

Perhaps as a secondary title I should put: "Why is every Liferay plugin writtin in plain old JSP?". There is a very big trend toward wanting to build portlets using some form of fancy framework. It is a seductive notion. One filled with all manner of "potential" benefits. There is also a very dangerous side effect. One that we don't initially consider, at least not until too much...

thumbnail

Wouldn't that be a hoot? But how do we do that? Simple, we use AOP (Apsect Oriented Programming). Ok, you tried that but couldn't make it work with Liferay. Well, that's what this particular post is all about. I'll show you how in three simple steps. Ok, so first off your custom entity MUST extend the entity of the service in question. Here is an example of an entity which...

thumbnail

Last post I talked about creating a wrapper to expose core functionality out to plugins. This time I'm going to leverage the same technique to allow you to make a custom tool available to Velocity templates without the need to edit any core classes. The first step is to write your Tool or a wrapper for your tool following the Dependency Injection pattern. Let's start with the...

thumbnail

We all want to optimize the processing time of our applications. To do so we use all kinds of different tools: HTTP load producers to measure response times from a client perspective, profilers for memory and thread loading, are two of the most important. Sometimes those can be a chore to use and setup. Sometimes they don't give fine grained enough information or perhaps just not...

thumbnail

So I finally got around to making the Velocity improvements I'd had planned on doing for the last several months. We completely removed the Velocity singleton usage and replaced it with the VelocityEngine instance design. With this, Liferay is able to play nicely with other velocity apps in the same JVM. Also, because we centralized the usage, we were able to optimize tool loading so...

thumbnail

Lately, Liferay has been following a trend toward externalizing extensibility features as much as possible. The traditional EXT model, while powerful, often proves too complex for many situations, or too intrusive to the product to retrain a high level of maintainability and a comfortable upgrade path because by it's very nature it inadvertently promotes bad programming practices...

thumbnail

Update (Feb 1, 2011): The default permission algorithm from version 6.0+ is now 6. It uses a fast bitmask persistence implementation of RBAC and is functionally equivalent to 5. However, there is only a single table for permissions, and a single table row per resource, per role, and so the data size is significantly smaller (probably at least 1/5 of previous). There is an...

thumbnail

Recently I was again asked how to call a more complex Liferay service using XSL. Here is an example of getting CalEvents from XSL and printing the list. The first thing you might find is that the iteration is rather strange. That's because XSL has no notion of arrays or lists, other than nodelists that is. So we have to get around that by creating a template construct to...

thumbnail

Recently my friend Journal VM Template was feeling a little down in the dumps because of his lack of ability when it comes to handling XML content. He was feeling inferior to Journal XSL Template because of this one's superlative ability in dealing with any type of XML content, local and remote. Not liking to see my friend down in the dumps, because he really has many other...

thumbnail

Recently a coleague asked if it was possible to call java from XSL. It is possible, and here is the example I provided. <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:getterUtil="xalan://com.liferay.portal.kernel.util.GetterUtil" xmlns:java="http://xml.apache.org/xalan/java" ...

thumbnail

In Liferay we have this cool new feature to run portlets as embedded widgets from any webpage anywhere. Tired of loosing you chat sessions on every page refresh??? No more!!! Well feast your eyes on Liferay Portls running as APPS on your desktop. Completely standalone, no shared memory, if one process crashes the others will not. Take a look at these babies.   ...

thumbnail

thumbnail

Here is a sample script for the Ruby Console portlet to test various aspects of the Dynamic Query API. import com.liferay.portal.kernel.util.Time import java.lang.System import java.util.Date module Orm include_package "com.liferay.portal.kernel.dao.orm" end module Model include_package "com.liferay.portal.model" end module Service include_package...

thumbnail

Portals are all about personalization, and Liferay is no different. I mean, there are many, many other things involved in portals other than personalization. But none of them really make sense without it. Personalization is the dressing that makes your portal salad bearable. So, it has to be pretty good dressing. Beyond the portal and personalization, we have the...

thumbnail

Many people ask how to achieve file downloads from a portlet project. I'm going to try putting this mystery to rest by first explaining the limitations and then showing some old and new ways of overcoming them in Liferay. To be clear on terminology we'll call anything, other than the usual presentation content, that we want to deliver to the user a resource. Examples of...

thumbnail

If you are or you have tried installing a Liferay on a cluster of Ubuntu machines and are/were having problems with the ehCache, do this check:]$ ping `hostname`If it responds using an address on the loopback device, there's your problem.By default, Ubuntu defines the machine's hostname on the loopback address (127.0.1.1), and since ehCache...

thumbnail

Updated: Wed May 28 10:53:09 EDT 2008. See the follow-up article here. In Javascript, "expando" means "to attach additional properties to an object". That's a little bit of hint as to what Expandos are in Liferay. In Liferay the Expando service is a "generic" service which allows you to dynamically define a collection of data. This data can be typed...

thumbnail

Social networks and portals are a natural fit. To that end we're currently doing work to integrate the brand new (still in incubation) Shindig project. Shindig is the Gadget and Opensocial reference implementation currently in incubation under the Apache Software Foundation and being worked on by Google, MySpace, Orkut, Salesforce.com, and many other large social networking sites....

thumbnail

In Liferay 5.0.0+ we have added a new feature: Announcements/Alerts. Announcements/Alerts are two portlets which can be used to broadcast some message to a list of users within a known scope. Essentially they provide a mass messaging engine you'd tend to think of as a "news letter" or one-way messaging. They provide the following features: Configurable, unlimited number...

thumbnail

(Out of Date, but still mostly relevant, has many improvements though) Well finally it's in trunk...   The sponsored staging enhancements (workflow) (which I've dubbed v1.2) features are now in. Let me know what you think.

thumbnail

Liferay offers a wide variety of different remote API's. A very useful one is JSON. It's useful because most languages have JSON processing functions. So the only dependencies are those and HTTP request handling functions. Here is a complete example of adding a Country from a PHP script: <?php## This example uses HTTP_Request package located found...

thumbnail

Sometimes you want some ability to tweak your Liferay theme at runtime... Note: Don't do this when you are packaging a theme for public consumption. It's very easy to add some "on-line" editability/tweakability to your themes, because we all know that we never get it just right the first time... and finding a bug inevitably happens the moment it goes live and/or you are...

thumbnail

Many people ask how to build portlets which display Flash (SWF) content in the portal with options for changing and controlling that content. Well, you don't have to build a portlet to handle this. I mean, you can... but you don't have too. Liferay provides all the tools you need to do this right out of the CMS and you can give yourself as much control as you like while still making...

thumbnail

I know the title should probably read "What's new in 4.4.0", or even "4.4.1" (which was just released). But, we've made so many fixes after those two releases that it's worth it to skip right ahead to 4.4.2 (which will likely be out next month). This will likely be the case moving right up to 5.0, but if I wait till then I'll have so much to write about it'll be to much of a chore...

thumbnail

Ever needed to do file content searches? NO! Then you probably aren't a programmer... j/k I frequently have to search lots of code for some pattern. You'd think this would be a trivial task, but not even large IDE's like Eclipse make this easy for you... usually they do... but not always. So, in the cases where my IDE doesn't do the trick I use Sagasu. Sagasu is a front end for...

thumbnail

Good news all you Linux Liferay users/developers! With the most recent release of Adobe Flash Player (Version: 9,0,115,0), the new multi-file uploader available in the portal now works in Linux. I'm using Ubuntu 7.10, and though there isn't a .deb yet, I just couldn't wait anymore. I downloaded the .tar.gz package, followed the instructions and voilà, it worked! Note: I just...

thumbnail

This weekend is the annual Liferay retreat. That means that many of us are preparing to head to LA to meet and greet co-workers we don't often see in person. For my familly and I, it is especially nice to get away and see new places... we don't get away much. Well, mother nature was kind enough to realize that we would be away for a week and thoughtfully took it upon herself to...

thumbnail

Need a good diff tool outside of something monolithic like your IDE? Ever wanted to compare one project folder to another beyond their respective repositories? Well, look no further than "Meld". Ubuntu install command: $ sudo apt-get install meld Meld is a great diff tool with all the toys and features you could ask for. The main window: Configuring...

thumbnail

Hey All,   Gonna start my first post with a big thanks to everyone who worked on getting Liferay Blogging to a very usable point. Then, I have a question for everyone out there... Snippet or Full Content? By this I mean in the RSS feed of our blogs. Does the world prefer a simple snippet of the content as part of the RSS item? OR does it prefer the Full Content of...