|
|
|
Last
revision of this document: |
Business
Objects are entities that keep together data belonging to one
'business-area'; e.g. an invoice with a 'header' and several
'positions'.
Business Objects can contain data that is physically
stored on different database-tables.
For
the theory about Business Objects please consult Using
Business Objects to handle data-storage and retrieval.
Preface:If
you came to this document to get a guideline for developing a
Business Object, I recommend to start with the document Business
Object, Overview – Advanced Java Fat-Client-Development
or go directly to the ToDo-List in document Business
Object, General Class – Advanced Java Fat-Client-Development.
As
classes for Business Objects have a critical mission within an
application, preference was given to performance if there has to be
made a decision between understandability and performance.
I hope,
that the comments placed in the code will help you to understand what
intention is behind the code.
Credits:Too
numerous to mention; the idea is available in dozens of versions –
I refined a lot of ideas into my system.
This step requieres to have the base-classes imported (see Download the jar-file for the base-classes) or written by yourself as guided by the tutorial to develop a Fat-Client application in Java.
JS_FC01j
– Develop the General Class for the Business Object 'Project'
completed - and its prerequisites too.
JS_FC01m
– Develop the Data-Base-Access (DBA) Object for the table
'Project' completed - and its
prerequisites too.
To
get the ideas and the theory of Business Objects it is recommended
to browse the following documents:
Using
Business Objects to handle data-storage and retrieval
and
Business
Object, Overview – Advanced Java Fat-Client-Development.
Create
the Server-Side Business Object for the 'Project':As
lined out in Using
Business Objects to handle data-storage and retrieval, a Business
Object will be derived into a Server-Side- and a Client-Side-Version.
To
create the class for the Data-Base-Access Object, right click onto
the project 'JS_FC01' and select
>New>Class
Enter
the Package (js_errdb.bos),
the (Class-)Name (JS_ErrDB_Project_BOS
– note
the 'S' at the end, please),
enter or 'Browse' the Superclass (
and check that no checkbox is selected; then click the [Finish]
button.JS_ErrDB_Project_BO)
Eclipse
has already generated a template and the individual code can be
entered.
Please see the code to be entered at
JS_ErrDB_Project_DBA
- or copy it from there ;-) .
Next
Steps:Whats
needed next is a class to access the database-system
JS_FC01e
- Universal structure for parameters and getting the directories.
After
that, the access to the database has to be implemented.
JS_FC01f
- Code a class to read files with XML-structure.