13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

138Chapter 5The Sun Microsystems Java Software <str<strong>on</strong>g>Development</str<strong>on</strong>g> Kitof software systems. This sec<strong>on</strong>d kind used to be the <strong>on</strong>ly kind, but now it may,in a sense, be the minority of applicati<strong>on</strong>s, but the most critical to an operati<strong>on</strong>.This sec<strong>on</strong>d class of system has come to be called enterprise systems.In enterprise computing, we have the same problem we opened with: Howdo you make the informati<strong>on</strong> and resources available to every<strong>on</strong>e who needsthem at the lowest cost? And the answer is (as it always is) “that depends.”These days, <strong>on</strong>e of the most comm<strong>on</strong> soluti<strong>on</strong>s is to use a Web server topublish an applicati<strong>on</strong>. This works well for a great many applicati<strong>on</strong>s and it ismuch easier to do than many other methods. That explains its popularity. TheWeb interface is quite limited, however, so for more user interface intensiveapplicati<strong>on</strong>s, client-server computing evolved. To us techies, all of this stuff isclient-server. In this c<strong>on</strong>text however, client-server refers to a 2-tier systemwhere the UI and logic exist in a GUI applicati<strong>on</strong> <strong>on</strong> a PC and comm<strong>on</strong>resources are in an SQL database all the clients share.This is also comm<strong>on</strong>ly used, but becomes expensive in a couple of cases.The first is when the database itself becomes a bottleneck because the numberof users grows and grows but <strong>on</strong>ly <strong>on</strong>e database can exist. The sec<strong>on</strong>d is simplythe cost of maintenance. Since the logic exists in the client, any change to thelogic requires updating the software <strong>on</strong> all clients. Even when a scheme for automatingthis exists, it is still time-c<strong>on</strong>suming and costly to get all the changesout to all users simultaneously. There are workarounds for both of these issues,but here we are c<strong>on</strong>cerned with a different soluti<strong>on</strong> altogether.So, how can we have a UI richer than with a Web applicati<strong>on</strong> but avoidthe pitfalls of the traditi<strong>on</strong>al 2-tier client-server computing? The answer is toseparate the UI from the business logic and the business logic from the underlyingdata store. This results in 3 tiers—presentati<strong>on</strong>, business logic, and data.Much of this book will c<strong>on</strong>cern itself with 3-tier computing soluti<strong>on</strong>s.Java has four major architectures for building 3-tier soluti<strong>on</strong>s. One of themis RMI. 175.8.1.2 RMI BasicsRMI works by sharing an interface between the client and the server. The interfacegroups together the methods that a client may call <strong>on</strong> a server. A class is17. The others are Enterprise JavaBeans, servlets, and JavaServer Pages. The latter two are Webbased,and therefore suffer from the UI deficiencies of Web forms, but Sun calls them part ofEnterprise Java, so we will too.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!