Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Choose the Right Database and Framework for your Real-Time Mobile App, Part V

DZone's Guide to

How to Choose the Right Database and Framework for your Real-Time Mobile App, Part V

Here's the secret to choosing the best framework and database for your real-time mobile app, as we concentrate on the "think" client.

· Mobile Zone
Free Resource

Launching an app doesn’t need to be daunting. Whether you’re just getting started or need a refresher on mobile app testing best practices, this guide is your resource! Brought to you in partnership with Perfecto

In Part IV of this blog series, we dove deeper into the database as the puppeteer, as well as Puppet itself. In this final post, we’ll take a quick look at the “think” client and wrap things by helping you assess which approach makes the most sense for you when choosing the right database and framework for your real-time app.

The “Think” Client

How can a client be reduced to display server-controlled data yet maintain the richness of the UI?

With Web technologies, a new approach is to use React library to render HTML5 views, populated with data using Facebook’s Flux pattern. It’s possible to dispatch the data directly from the server via WebSockets, as presented in this blog post.

React’s heavy reliance on JavaScript may be a showstopper for many applications since it’s not consumable by robots and legacy web browsers. The modern HTML5 solution – which doesn’t require a single line of JavaScript – is to use Web Components.

Submitted to W3C by Google, this new emerging standard allows developers to use custom HTML tags, composed using standard browser technologies such as DOM and CSS.

With the Polymer framework and hundreds of Web Components already available online, HTML code can be reduced to a declarative template for the two-way data binding connection, with the server using a minimalist protocol such as Puppet.

So Which Approach is Right for You?

The software stacks discussed in this blog series bridge the server and client. The construction might be more reminiscent of:

  • A movable bridge with application logic on both ends – thick client
  • An elevated highway from the application logic to the presentation layer – thin client

The thick client approach works best wherever offline capabilities or instant responsiveness are required. Using Web technologies, the repetitiveness of application logic can be omitted by using the isomorphic approach enabled by JavaScript such as Meteor and Derby. They can be a good choice for B2C or social apps, but aren’t a viable choice for transactional systems.

The thin client approach on a stack such as Puppet/Starcounter works well wherever an ACID database or exceptional time to market is needed. This approach is appropriate for transactional systems such as mobile banking, ERP and other B2B use cases where performance and security are important.

Door number three? A hybrid approach. A thick client can provide a rich and responsive experience that enables offline work, while the Puppet approach enables the transactional part of the operations.

Looking ahead, further advancements will allow developers to run replicated copies of RAM databases directly on the mobile device, creating the transactional power of in-memory computing regardless of network availability.

Keep up with the latest DevTest Jargon with the latest Mobile DevTest Dictionary. Brought to you in partnership with Perfecto.

Topics:
web 2.0 development ,mobile

Published at DZone with permission of Marcin Warpechowski, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}