Tips to speed up Openbravo Development

Openbravo as framework is as powerful as Openbravo as an ERP. Development and Customization has been very much streamlined due to the MVC architecture and the modular approach. That is one reason there are so many modules/verticals available on top of Openbravo.

Here are few tips that helped me increase my productivity in Openbravo development. This is more like a compiled list from various articles that I used. Feel free to add more to it in the comments.

1. SQL Query Editor
A feature that is available for a long time, the SQL Query Editor available in System Administrator role can be used for quick selects across any table in Openbravo. This could save your time from switching back from your query tool to the Application. To open the query Editor, go to SQL Query in the System Adminstrator role.




2. HQL Query Editor
A more useful tool that is provided as a module by Openbravo is the HQL Query Tool. This query can be used to perform hql query across all the Entities present in Openbravo. One advanced feature is that you can select your desired Entity from a drop down and find all the attributes of the Entity. To install the same, login as System Administratior, go to Module Management Window and search for ‘Openbravo HQL Query Tool’.



3. Auto Logon Manager
The most time consuming task for me while developing is to type the default username and password more than few hundred times per day (increases exponentially with my potential code blunders). A simple feature that would remove this hassle is to use the Authentication Manager in Openbravo. Just add the following lines under Authentication section in Openbravo.properties file in config folder (or anywhere in the file, better to put it in the right section) to login into the Application as Openbravo user without having to enter the user credentials.
authentication.class=org.openbravo.authentication.basic.AutologonAuthenticationManager
authentication.autologon.username=Openbravo
Source : http://planet.openbravo.com/?p=7012

4. Smartclient Development Module
The smartclient development module provides you with an uncompressed version of the SmartClient components, thereby assiting in deep debugging of the Client side smartclient code, and also can provides non-obfuscated code so that you can debug even the custom code. More on the this module here.
http://wiki.openbravo.com/wiki/Client_Side_Development_and_API#The_smartclient.dev_module.2C_smartclient_console_and_sources

5. Logging into multiple roles at the same time
More often than not we will be usually juggling between the client admin login and the System Administrator login. To save time from switching over one login to another, there are two ways.
1. Use incognito /private browsing mode. Using the incognito mode, one role opened in a session and another role opened in another session (separate windows).
2. A simpler way is to use Ip/domain name differentiation. For eg., if you are running Openbravo in your local instance then you can have two tabs opened, one with the URL http://locahost:8080/Openbravo and other with 127.0.0.1:8080/Openbravo and have two different roles in each tab.

6. Debugger in chrome developer tools
One technical tip while debugging client side code, if you are not sure what your code actually errors out, you can use the ‘debugger;’ keyword that will stop the execution of the script at that point. But just be careful to remove the keyword after debugging so that the Application does not do that for unintended circumstances.