Browse DevX
Sign up for e-mail newsletters from DevX


The Smart Choice for Smart Clients: J2EE or .NET? : Page 2

Don't know where to begin with smart-client implementation or whether J2EE or .NET is the better choice for it? Follow a firm as it uses the .NET and J2EE frameworks to construct a smart-client application requiring online/offline access, no-touch deployment, and data synchronization.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Smart-client Scenario: Accounting App
Imagine an application in which accountants obtain electronic copies of tax returns that they must process and then file with the state and federal governments. This is a perfect example in which a smart-client approach would benefit both the accountant and the accounting firm.

Filing tax returns requires a lot of number checking, document referencing, and calculation. Doing these tasks on paper is tedious enough, let alone navigating a slow-responding, hard-to-work-with front end such as a Web site. Accountants require quick access to information such as investments and the previous year's return, so they clearly want a Rich experience. However, other requirements, such as the following, prevent the firm from taking the rich-client approach:

  • The firm's clients uploaded tax-return information via a Web site, and the firm must in turn place it in a central repository. This requires that the application adapt to a client/server model, because many an accountant will be accessing the same information simultaneously.
  • As tax laws vary from year to year, a new version of the software will be released before each tax season. This requires that every client machine undergo some sort of manual installation or update process. Processes such as these often incur headaches and wasted time because of the inevitable unique troubleshooting requirements.
  • Different accountants will be accessing and updating the same information simultaneously. When this happens, the application will have to account for and resolve versioning conflicts in the data.
For these reasons, along with the fact that users will need a Rich experience, this hypothetical firm decides to tackle the daunting task of building a smart-client application. The first question they need to ask themselves is where to begin.

Accounting App Implementation
Should we employ .NET Web services or J2EE Web applications?—that is the question. Both technologies usually lock you into one framework or the other, and although each choice has its pros and cons, both essentially do the same thing. Web services and Web applications provide the SOA required to share business logic responsibilities between client and server.

The first step in implementing a smart-client application is to determine which functionality should reside on the client side and which on the server side. The accounting firm decides it would be beneficial for accountants to be able to work on tax returns even when they are not connected to the network, allowing employees who do not have Internet access to take their work home with them. This means that the server will contain no logic with regards to actually doing taxes. All of this functionality will reside in the client application instead. However, users with no Internet access will not be able to file processed tax returns with the government because that function obviously belongs on the server side.

Now that it has separated the logic in its application, the firm can begin to build its services. The following examples show what the firm's server-side API might look like as either a .NET Web service or a J2EE Enterprise Java Bean (EJB):

Server-side API as a .NET Web Service

Server-side API as a J2EE Enterprise Java Bean
When the user is online, he or she will be able to pull new tax returns from the data store, upload processed returns, and file those returns with the state and federal governments. Meanwhile, the user can perform all work on a downloaded return as if he or she were using a standalone application. Although this client-side logic is convenient for everyday use, it poses major hassles when the time comes to update that logic.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date