Skip to main content

Purpose of Application Element in Openbravo

Hi All,
           Application Element is one really cool feature in Openbravo, that I managed to get hold of after a while. But still I feel there is no special interest shown on application element till now. So I just wanted to share the importance and the influence of the application elements as it will cause lots of problems if not handled properly.

            Application Element is mainly used for Re-Usability. It will actually reduce lots of our development time when handled properly. Whenever we create a new column, the synchronize terminology process will create a new application element(if it doesn't have any element for the same column name). Thereafter whenever we create a new column with the same dbname, it will map the same application element for that column. Because of this mapping, we can manage the display name,help/comment, description globally. That is we need not go to each and every column and change the display name,help comment or description. It will be mapped globally to all columns that uses a particular column name. Web Service is one of the most important thing in openbravo. This web service will use the name which we provide as column name in column table.

             A good example could be, think of the column ad_client_id. We should use that field in all tables. Just think what will happen if we need to give the display name, help/comment and description manually for all the tables. Its not just tables, but windows too. As of now, we are not doing that because, we have the application element that is created already for the ad_client_id column that does all these things.All these are possible only when the required application element is in your module or in any module that your module depends on. This can be set in the dependency tab of the module window.

I have attached a screen shot where AD_Client column's name is updated to 'Client' and description and help comment are added by itself. I have also attached the Application Element from which these comments are taken from.

Handling Application Element Properly:

1. Always use the common notation for column names that represents same meaning.
ie., Always remember to check whether we have any column that already have the same name. If exists, use the already existing one.
Eg: If the requirement is to create a field to store begin date, we can give the column name as begin_date, bgn_dt,begin_dt,etc.,  But we already have the column used in many places as begin_date. So use that.
2. Always use the meaningful notation for representing column names.
Eg: Though most people can understand begin_date,begin_dt,bgn_dt,bgn_date represents begin date, begin_date makes more sense.
3. Consider, you added a new column that is not present in the system.
Eg: previous_month
For this column, when you give synchronize terminology, the application element will be created as, Previous_Month. It will displayed in the application element field in the columns as Previous_Month-Previous_Month.
1. Go to Application Dictionary -> Setup -> Element.
2. Search Previous_Month
3. Rename the Name field to Previous Month.
5. Give the description and Help/Comment
4. Rename the Name field to Previous Month in the column window also.
As you can see, you only need to rename the name field in column table. The help comment/Description would have been populated automatically.
Thereafter the same name will be used when ever the same column name is used.

                           In Openbravo, if we have wrong application element,  DAL related process, procedures, callouts, etc(EVERYTHING since openbravo is completely implementing DAL from 3.0), will not work. From a developer's perspective, none of our efforts in writing any code is going to work with improper application element. I just wanted to stress out the need for better care towards it.

                         Thanks to my Colleague Pandi to gather all these points and for stressing to me the need for Application Element that made me to write this blog..:)


Popular posts from this blog

My 10 years in Application Development

It's been around 10 years since I started programming. May be a bit more, if I have to include my first attempts at C programming in school. But it would be a grave insult to call remembering ten lines of code and just replicating it to put a star on the screen. I also did a course on Visual basic, but it was more gimmicks that Application development. But it was truly in the year 2007 when I started my Master in Computer Applications that I found a new flare for developing applications. 
I was very late to computers in general and even when I joined my Masters, computers were not really accessible to me. But when I joined my Masters where one is actually expected to hone the skills which they already have, but in case it was were I was learning the skills, initially it was very difficult. I was not sure what computers had for me nor I had a natural flair for programming. But the thing about computers that attracted me was the visual medium it gave. Initially it was just a door t…

Changing Timezone in Postgresql, Ubuntu

Timezone and locale are integral concepts that one should be aware of when implementing a System. For example. if you create a database in PostgreSql, it will use the default System settings for the database. Lets say you have a server in UK and your client is US. If the client tries to retrieve the current date or time, it is going to show the UK time and not the US one.
Today I encountered a different issue in our client place where the Ubuntu timezone and PostgreSql timezone were showing a incorrect values. Instead of Indian Standard Time (IST) it was showing Pacific Daylight Time(PDT). These are the steps that I followed to change the timezone to IST in PostgreSql and Ubuntu.
Changing timezone in Ubuntu:
sudo dpkg-reconfigure tzdataYou will be prompted to choose the continent and then the area. Provided screen shots where we configure the location.
Use TAB key to navigate to the OK button and then press Enter.

The changes will get reflected immediately. To check it you can open a n…

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 …