3. OpenSwing based Applications Architecture
Thanks to OpenSwing components stratification, you are able to develop java applications having different architectures, all based on Swing front-end and that can be represented on these schemas:
As you can see from architectural schemas, OpenSwing framework allows to create java applications with architectures having several number of layers, with or without a database, web or not, distributed applications of stand-alone applications:
- Two tiers client-server applications – i.e. there is only one java program, installed and executed in the user macchine; this application contains both presentation tier and business logic + data access tiers; these layers directly comunicate each other, through direct method calls. It follows that data retrieval classes call directly business logic classes.
This kind of application is called two tiers because there are two tiers: application (client) and information system tier (server), commonly based on a database.
- Stand-alone applications – that is java applications that include presentation, business logic and data access tiers inside a unique program. This kind of application is called stand-alone because it does not require a server tier (an information system tier). Consequently, there is not a data persistence need or data must be stored on a local access media, such as local file system or a shared folder.
- Three tiers client-server web applications – this kind of application is partitioned in three distinct programs: (i) presentation and remote data retrieval program, which retrieve data through HTTP protocol, this program is executed in the user machine, (ii) server-side program that contains business logic and data access tiers, executed inside an Application Server; (iii) database server or another data storage media, such as file system.
Today client-server 3-levels architecture is one of the most used in the web domain, expecially when connected to an HTML front-end. One of the most plain limits of HTML front-end solution for web applications is the poorness of the graphical user interface, expecially in the context of rich-client applications; recently some techniques based on AJAX enhance gui results: this improvement requires greater developmemt costs, when costs are compared with those obtained with Swing gui development.
By means of OpenSwing you can develop web applications (i.e. client applications that use HTTP protocol to comunicate with the server side application) where the HTML front-end is replaced with a Swing front-end, that lead to the development of rich-client applications having lower costs and gui results better than HTML gui results (also with AJAX adoption).
- Rich-client distributed applications – client side application can comunicate with the server side application not only with HTTP protocol: it can be used other connection techniques, like RMI (Remote Method Invocation), if the server-side application is based on EJB (such as a set of Session Bean Stateless) or is based on SOAP (HTTP+XML) when the server-side is based on a collection of Web Services.
According to the selected architecture adopted for your own application, there are several activation modes available for the presentation layer:
- with two levels client-server application or stand-alone application, the presentation layer is realized as java independent application, that is this application is locally installed and run on the user machine. To simplify application installation phase and application update retrievals, Java Web Start can be adopted: this product is able to download the last version of the application and locally run it;
- with three levels client-server web application, the presentation layer is downloaded from the central server and can be activated as an Java Applet through a browser or activated as a java independent application through Java Web Start;
- with rich-client distributed application, the presentation layer can be downloaded from a central server and can be activated as a Java Applet through a browser or as a java independent application through Java Web Start.
<< Previous Chapter | Next Chapter >>