User:Trigger

From iDempiere
Revision as of 13:55, 11 August 2014 by Trigger (talk | contribs)

About Me

I am Ralph WAFO, a software engineer and developer. I am more interested by object oriented programming paradigm and mostly use java programming language.

I want to impact the world and I will become the most powerful system analyst of this century... Yes, The Most POWERFULL!!!

Understand source code, debug, test and document my work is a really pleasure for me. I am really glad when I perform a task properly, document and share my work. I really like team work, It is very important for me to be social and helpful. I also like to share my passion with the others.

I'm living my dream through The Steve Jobs Project supported by Redhuan and IT-Kamer company Ltd which is lead by Stanley Mungwe.
Redhuan's trainings are more interesting and he teachs us more about the 21st Century skills and how to get them. At the end of a particular training, i got a source code of an free and open source software from him...

POS source code is quite wonderful. I have gone through briefly and seen how the initialisation and configuration of apps are performed into the code... You surely understand it !!! I cannot resist to produce a good documentation to ease the use of this source code. Do you want to follow me in this amazing adventure? Read the next section!

What I am doing now

I am working on the most exciting project in the world: Steve Jobs Project !!!
Do you know anything about Point Of Sale?
This is an essay about technical documentation of the source code of OpenBravo Point Of Sale.

Data Model and Configuration Properties

Pos project tree.png

Let's start by describing the data model and show, into the code,
how the script define the DataBase and configuration properties...

I suppose you have imported the project source code successfully.

In NetbeansIDE your project should be like that on the picture below.
When you run the project the first time, the application notifies you because it does not find a database and informs you that it will create a default database. Just click on Yes!
Notification.png

Now take a look at the IDE console. We can see that the class responsible to application configurations is com.openbravo.pos.forms.AppConfig.

Output-run-screen.png

The following is an UML Class diagram for com.openbravo.pos.forms.AppConfig

AppConfig-UML-Model.png

Try to open the file into your IDE and focus on the part of code in which database parameters are configured. Into this class, the method in charge to initialise the default value of configuration parameters is loadDefault.

private void loadDefault() {

       m_propsconfig = new Properties();

       String dirname = System.getProperty("dirname.path");
       dirname = dirname == null ? "./" : dirname;

       m_propsconfig.setProperty("db.driverlib", 
             new File(new File(dirname), "lib/derby.jar").getAbsolutePath());
       m_propsconfig.setProperty("db.driver", "org.apache.derby.jdbc.EmbeddedDriver");
       m_propsconfig.setProperty("db.URL", "jdbc:derby:" + 
             new File(new File(System.getProperty("user.home")), 
                 AppLocal.APP_ID + "-database").getAbsolutePath() + ";create=true");
       m_propsconfig.setProperty("db.user", "");
       m_propsconfig.setProperty("db.password", "");
       ...
       ...
}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.