Friday, 17 October 2014

Why we chose Smart Client over Browser application for Lifetrenz?

At the start of our journey, when we were developing the architecture for Lifetrenz platform, we had two distinct choices in front of us for developing the UI – Smart Client and Browser app. Considering the future scalability & security and to keep the option of technology choices open, we finally took a decision in favour of going with the Smart Client architecture.

Though both the approaches leverage the open web standards for the delivery of the intended functionality, they do it very differently. Below I am trying to capture some of the reasons that influenced our choice, so that anybody finding themselves in our situation may find it useful.

Basically, with Browser based applications, the entire code resides on the server and is received and executed at the client side inside a browser. Once the requirement is completed the client may not retain any code for reuse later. The applications layers in this architecture need not be abstracted fully, as they all reside on the server. In case of a Smart Client application the application and UI layers are abstracted fully, with the client side code residing on the client at all times. The client and server side codes communicate using open protocols and web standards and only data is exchanged between them.

For complex enterprise-class applications, where users are known and advanced capabilities and workflows are needed, Smart Client applications may be far more appropriate than Browser-based applications. On the other hand, Browser apps are better suited for consumer applications like websites, that require less sophisticated functionality and targeted at unknown users.

Some of the key differentiators that influenced our decision are..

Performance - Smart Client applications run on the user’s desktop and are able to take full advantage of it's resources - CPU, memory, hard drive and graphics - for storing, processing and rendering information. In case of browser based applications all the processing is done using the server and most of the desktop resources wasted.

Bandwidth Usage – Smart clients cache frequently-accessed data on the user’s desktop, resulting in much faster application performance and consumption of less bandwidth. Browser-based apps require all data and the entire user interface to be downloaded from the server every time a form is accessed. This becomes especially important for places where the Internet bandwidth is limited.

User Experience (UX) - Smart Clients take full advantage of the desktop’s graphical capabilities. The user interface is greatly improved and can contain advanced functionality such as 3D graphics, drop shadows, overlaps, drag-and-drop, dynamic pop-up indicators etc. It is very difficult to realize this capability even in the most advanced browser technologies.

Scalability and Cost to Operate – As most of the application processing is done on user's desktop, Smart Client web applications consume substantially fewer server memory and processor resources. This allows the application to handle larger number of users with limited and expensive server hardware. In browser applications, the server requirements grow rapidly with the addition of users as all the processing happens on the server.

Security - Smart Client applications can be centrally controlled and secured. Locally installed certificates and license keys can be used to further enhance security by localizing the apps to specific machines and locations. In Browser apps anyone can gain access to it and is very difficult to secure.

Design Speed - The combination of Apache Flex SDK and AdobeAIR runtime provides an excellent architecture for rapid application development, deployment and management, resulting in quicker delivery of rich applications with a 'high fidelity' End User experience. Browser-based design requires tedious CSS work, a skill that is much better suited to website designers, not business application developers.

Development Pace
- Smart Client applications are faster to design and develop due to the rich set of controls and tools that are available for incorporation into the app. As the applications run better integrated with the host OS, they are also capable of leveraging the built in functionalities and tools of the OS. The AdobeAIR Runtime guarantees the same look-and-feel across all platforms and minor refinements such as changing colors and layouts, adding new forms, relocating buttons, etc. can be accomplished easily.

Designing and creating web pages is more time consuming owing to the cross-browser layout issues. Often it may also require 'defensive programming' requiring additional time. Making small layout changes often require complicated CSS programming (once again introducing cross-browser display bugs, such as the well-known issues between IE and FireFox).

- Smart Clients need to be installed on the desktops before it can be used. For business applications, where the end users are known, this is not a problem. However for consumer applications, this becomes a problem and so these are best developed inside a browser.

User Interface Differences – In the case of browser applications, since users may have different machines, different operating systems, and different browsers and versions, the display and layout of web pages (and the overall user experience) can change drastically among users. For example, buttons can shift, text boxes can change in size and location, elements can be hidden off-screen or disappear entirely and images can load incorrectly on overlap other controls. In the case of Smart Client applications it is much more easier to maintain a uniform user experience.

JavaScript Differences – Browser application depend heavily upon client side JavaScript to improve the usability of their applications. Since users may have different browsers, the functionality may be affected due to differences in how client-side JavaScript code is executed. Many browsers do not fully adhere to all web standards and versions, making programming cross-browser JavaScript difficult. Smart client applications run on more predictable environments and do not suffer this problem.

Browser Capability Issues
- Users may have different browser and different preference settings. Some browsers may have JavaScript disabled, does not allow cookies, block Popups and do not have the correct plug ins installed (flash for example). In case of Smart Applications the settings are inside the application and so can be controlled.

Bug Fixing - Since users of applications can have almost any type of computer, operating system and web browser, it is extremely difficult to reproduce and fix many of the problems reported. This will require large number of computers of different types, running different operating systems and with different settings. In case of Smart Client Application, with it's standard run time environment, the reported issues are easily reproduced and fixed.

Though I have tried my level best to be objective in my presentation of facts, please note that the conclusions derived are very specific to our requirements. While you may use our findings as starting point, I encourage readers to do further reading and research before taking a final decision.

No comments:

Post a Comment