> List of tutorials

Index for Advanced Java Fat-Client-Development

Business Object, Client-Side Class - Advanced Java Fat-Client-Development

* For this document and all references (links) please obey the hints and regulations concerning copyright, disclaimer and trademarks.

  • The owner of this web-site (www.javascout.biz) is not responsible for the content of web-sites linked within this document or other documents of www.javascout.biz.

  • If this document or other documents of this web-site (www.javascout.biz) infringes your rights or you think that rights of others (third parties) are infringed, please inform the author.
    An e-mail can be sent by clicking onto the 'hungry mailbox' in the upper right corner.

Last revision of this document:
2006-07-30

This document gives an overview of the different classes belonging to a Business-Object.

Prerequisites:

Mission of the Client-Side-Class:

The Client-Side Class of the Business Object, designed to fulfill the tasks of business entity within the client-side of an application, comprehends
* methods to transfer the values from GUI-elements into the variables of the Business Object,
* methods to transfer the values of the variables of the Business Object to the variables to GUI-elements and
* methods to create the Server-Side derivation of the Business Object and
   call the methods of this class that furthermore perform operations on the database.

top.

To-Do-List to implement the class:

Please obey, that all Client-Side Classes for Business Objects are put into a package (suggestion: application.boc) that is different for those for General Classes (suggestion: application.bo) and Server-Side Classes (suggestion: application.bos).
This is done to simplify the packaging-script when the application is versioned to run as Client/Server.
The Client-Side class is only needed on the Client Application (and packed into the JAR-file for it)
The General Classes are needed on both the Client-Application as on the EJB (Enterprise Java Bean) that is running under a JAS (Java Application Server) and are packed into the JAR-file for the Client-Side as well as into the JAR-file for the EJB.
The Server-Side Classes are only needed within the EJB and are packed only into the JAR-file for it.

A fast way to get the code is to copy from an existing class and modify it.
A class with working code (from the tutorial Develop a Fat-Client in Java) is JS_ErrDB_Project_BOC.

Steps to code the class:

The next implementation steps (for this class) need the Server-Side class to be implemented to a degree that allows to 'store' the values to the relevant database-tables.
If you want to do some 'testing' using the debugger, it is advisable to programm the code that is triggered by the decisive event to transfer the values from the GUI-elements to the variables of the Business Object.
If you want to continue with the task to store and retrieve data, start coding the DBA Object and then the Server-Side class of the Business Object.

All 'getBy....' methods that may deliver more than the data of one database-record are coded in an own class.
To see an example of such a class, please follow this link.

top.

Related Documents: