YOU ARE AT:OpinionReader Forum: The rise of single page applications

Reader Forum: The rise of single page applications

Editor’s Note: Welcome to our weekly Reader Forum section. In an attempt to broaden our interaction with our readers we have created this forum for those with something meaningful to say to the wireless industry. We want to keep this as open as possible, but we maintain some editorial control to keep it free of commercials or attacks. Please send along submissions for this section to our editors at: dmeyer@rcrwireless.com.

A recent study found that the average person shifts his attention between his smartphone, tablet and laptop an overwhelming 21 times in a single hour. As such, the importance of a easily transitioning between desktop, browser, mobile browser and native mobile apps is more important than ever to deliver seamless enterprise applications that simultaneously span multiple endpoints. IT executives faced with staying within budget constraints and increasing customer experience metrics are looking for ways to efficiently develop applications for web, mobile Web and native mobile users. Single page application Web development, in combination with service-oriented architecture has just recently established itself as a significant trend for efficient Web application development even though tech giants such as Google and Twitter have been leveraging SPA for more than five years. It typically yields a website that feels more like an “app” than a traditional Web page, something that users have come to expect.

Benefits from all sides

Well-known applications that utilize SPA include GMail, Google Maps and Twitter. Each aim to provide the user with a seamless experience without the long pauses associated with classic Web application refresh. These pages respond better over low bandwidth connections (after the initial page load) than traditional Web pages, providing the user with the “app” type feel that has become the norm.

Furthermore, SPAs are widely supported by a rapidly growing number of reliable JavaScript libraries and frameworks such as Backbone.JS, AnjularJS, Ember.JS and KnockoutJS and are relatively easy to develop. Because the separation of concerns between the client and server code is an accepted fundamental best practice of service-oriented architecture, most professional software developers find the SPA’s architecture approach both logical and correct.

Ultimately, SPAs offer considerable benefits for organizations to share back-end code across both responsive Web and native mobile applications and simplify the testing of common business logic. Through the separation of UI and application services logic, SPAs allow organizations to share common “back-end” application logic and testing assets between Web and mobile applications. This allows customers to access new features through responsive Web applications while waiting for the native mobile applications to work their way through the app store approval and release processes.

SPA adoption considerations

Transitioning to the SPA architecture requires some changes in process, tooling and skills. One factor that impacts the return on investment for SPAs is related to the number of page templates/routes required by the application. Examples of limited screen templates/routes include wizard type applications and variations of master-detail data sets, particularly where the user only needs a small subset of the data at any time. SPAs are very efficient at using AJAX (asynchronous server calls) to dynamically load and seamlessly refresh the data as it is needed, without causing a full-page refresh.

Other development factors to consider when evaluating the impact of SPAs on your organization:

–Be ready to invest more time and tooling in browser compatibility testing to include all supported browser types as well as variations in browser versions. Keep in mind that JavaScript errors can have a much bigger impact on users than standard HTML style sheet bugs.

–Be prepared to test for, de-bug and possibly design periodic full-page refreshes to reset the browser as to avoid possible memory leaks.

–Educate JavaScript developers on the proper use of scope and careful use of global variables to avoid unintended collisions with other developers’ code.

–Develop client-side debugging skills for event-driven code that requires a different mindset than traditional multi-page applications.

–Understand resource bundling, “minification” and browser caching to reduce initial page load times.

–SPA’s JavaScript code relies on the ability of each user’s Web browser to render the JavaScript consistently, quickly and correctly. Therefore, the maturity of JavaScript libraries are key, allowing developers to isolate their code from cross-browser variations while leveraging tried-and-true code.

With the increasing number of mobile devices per user and the frequent use of multiple screens, companies are at a disadvantage both in terms of cost and customer experience if they rely on dual application logic (back-end service) development. SPAs are becoming popular despite some investment associated with learning and institutionalizing a new technology pattern in your enterprise. You can’t ignore the demand for SPA’s “appy” look-and-feel for new websites.

ABOUT AUTHOR