The term cloud actually has a number of meanings and discrete forms besides simple data storage.
Software as a Service (SaaS) means applications hosted on a server that you could access and use almost as if they were installed on your local device. SaaS also to some means web application programming interfaces (APIs) that you can access remotely. Some examples of SaaS include Salesforce (www.salesforce.com), a customer relationship management (CRM) service, and GoToMeeting (www.gotomeeting.com), an online virtual meeting service.
Infrastructure as a Service (IaaS) means the hosting of real or virtualized systems. If you need a Linux machine, for example, you can have a virtual server built
and hosted in the cloud with IaaS, removing the responsibility of building and maintaining the hardware yourself (whether that hardware is real or virtual doesn’t really matter in this model; you don’t care as the client of IaaS and in
fact may not even know). The benefit of this is that most of the responsibility for maintaining servers, worrying about updates, ensuring proper virus protection is in place, and so on, are dealt with by the provider, allowing you to focus on what really matters most to you, namely, your business. Some examples of IaaS include Amazon EC2 (http://aws.amazon.com/ec2) and Google App Engine (http://developers.google.com/appengine).
Platform as a Service (PaaS) is effectively an extension of IaaS where instead of just a virtualized server you get a virtualized “full stack” including things such as databases, web/app servers, and programming execution environments. Examples of PaaS include IBM’s SmartCloud Application Services (www.ibm.com/cloud-computing/us/en/paas.html) and VCE’s VBLOCK (www.vce.com/products/vblock/overview).
6 CHAPTER 1: Designing My Mobile Organizer
￼ Network as a Service (NaaS) includes capabilities such as VPNs and “bandwidth on demand.” Once again, this removes the need to administer the hardware and/or software for your networking capabilities yourself. Any VPN, such as GigaNews’ VyprVPN (www.giganews.com/vyprvpn), is an example of NaaS.
Storage as a Service (also abbreviated SaaS) is similar to IaaS but deals specifically with data storage. Sites such as Dropbox, Google Drive, and Microsoft’s SkyDrive are all examples of SaaS.
There’s DHTMLX Touch (www.dhtmlx.com) that provides a full HTML5-based framework and widget set for developing mobile applications.
There are also some old favorites like Dojo (www.dojotoolkit.org) and Yahoo’s YUI (www.yuilibrary.com) that, while not exclusively mobile-oriented, are capable of helping develop mobile web apps nonetheless.
That extensibility comes into play with jQuery Mobile (www.jquerymobile.com), which is built on top of jQuery. This library is an HTML5-based system for developing mobile UIs. It contains widgets and helper functions for putting such apps together, among other things
With the client-side decisions of mobile web app using jQuery Mobile decided, how do we build the server side? Clearly, there’s a ton of choices there too.
Do you already know Java (www.oracle.com)? Then that might be a good choice. What about PHP (http://us.php.net)? Again, there’s nothing wrong with PHP in my mind, even though some would argue that it isn’t appropriate for “professional” development. I’m not here to pass judgment, though! If you know PHP already, then it’s certainly worth considering. Are Microsoft technologies (www.microsoft.com) up your alley? If that’s a skill set you already have, then they are not a bad choice. Ruby on Rails (www.rubyonrails.org) perhaps? Yes, it’s worthy of consideration certainly, as are any of a dozen other possible technologies you might come across.
All of these also require potentially significant server infrastructures. Java requires an entire servlet container. PHP is an extension to an existing web server. Microsoft of course requires IIS, its proprietary web server, plus the appropriate extensions. Ruby on Rails is its own server product essentially. All of these also require administration expertise and are therefore somewhat complex to work with, depending on what you might already know.
I think so! The idea of the same language on both sides of the conversation, meaning client side and server side, and assuming performance isn’t a problem, is attractive to many people.
The other big benefit of node.js is that it is designed for high performance and concurrency from the start. While neither of these concerns is particularly big for My Mobile Organizer frankly, there’s no good reason to use technologies that hamstring us in either regard.
What About the Database?
Of course, just deciding on node.js for the server side isn’t quite the whole story. There’s also data storage to consider. We need a database of some sort too, don’t we?
Of course we do!
26 CHAPTER 1: Designing My Mobile Organizer
￼So then, which do we use? Oracle (www.oracle.com)? It’s a great database supporting tons of massive, high-availability systems out there. Yet, it’s expensive, so it’s probably not the best choice for our relatively minor app. What about the popular MySQL (www.mysql.com)? It’s very good, no question; I use it tons myself. To make a long story short, there are many choices to choose from in this area, too many to name.
Given that we’ve decided on node.js, are there any options that work well with it? Yes, all of the above in fact can be used with it. There’s another choice, though, that is very popular and is part of the “NoSQL” movement: MongoDB.
The NoSQL movement is an approach to data storage that eschews the need for Structured Query Language (SQL) that all relational database management systems (RDBMSs) are based upon. It’s fundamentally different in that you store “documents,” as opposed to relational data in the form
Chapter 6 is where we’ll deep-dive into MongoDB so for now, suffice to say that its NoSQL approach, and the simple API made available to our node.js app for it, makes it easy to work with and provides a good data storage mechanism for our PIM app.
his stack, the combination of PhoneGap, jQuery, jQuery Mobile, node.js, REST, and MongoDB, is rapidly becoming a popular one because it is flexible, is easy to learn, performs well (if you do your job as a developer reasonably well at least), and is based on open, free technologies.