Showing posts from April, 2012

Dissecting Openbravo 3.0 UI Architecture

Having been worked on Openbravo 3.0 UI for more than a year now (right from RC1) , Openbravo has leaped ahead of most contemporary ERP's in terms of UX design and usability. And a part of the credit has to go to the community too as they were actively involved in finalizing the UX and also involved enthusiastically in tested out the RC versions and providing their feedback.

In this post, I have tried to draw limelight on the basic UI components that are being used in Openbravo and their corresponding smartclient components. This is just to provide a very high level idea on how the entire architecture is coupled together. I have tried to use a single screen shot of Openbravo interface and tried to map the base components here.

The hierarchy can be visualized in simple terms as follows:

Exhaustive information on these components are provided in the Openbravo Wiki here.

Most of these components are defined and managed from individual files (or code) thereby making it really easy to …

Difference between List and Set in Java Collection

Git Book - Setup and Initialization

How to remove non-alphabets from a String

This post is all about how to remove all characters that are not alphabets from a String. For the reverse of the same, refer here. For eg, if you want to only "ABC" from "A1@348474B*&C" then the following snippet of code would be fine in Java.

String test = "A1@348474B*&C";
test = test.replaceAll("[a-zA-Z]",""); //This will replace all non alpha characters
System.out.println("The extracted String is "+test);

The output of the above code will be,

The extracted String is ABC

Hope this was helpful to you in someway. Happy Working...

How to extract numbers from a String

This is a simple post on how to extract numbers from a String. I had tried too many methods for the same, and though performance wise this solution cannot be the same, it certainly is the most simple solution that I ever come across. I got this solution  from CodeRanch or StackOverflow (not sure), but thought better to blog so that I can refer it easily later. ..:)

String test = "ABC10DEF20";
test = test.replaceAll("\\D",""); //This will replace all non numeric characters with 
System.out.println("The Number is "+test);

The output of the above snippet of code will be

The Number is 1020

Planning to write more such very small posts that can be used a quick reference.

Happy Working....