Once a development team knows what it wants to build, one of the next and most important decisions it needs to make it is how it is going to be built. More specifically, the team must determine what technologies are available, needed, and preferred to get the job done. It is well understood that any hybrid mobile application will, at a minimum, consist of a native code shell, HTML5, JavaScript and CSS. However, to be able to deliver a high-quality, robust and capable application within an acceptable time frame your mobile architecture needs to be expanded. We’re going to review the technologies we used in the Summa Summit App, explore the reasons we chose these technologies, and reflect on the lessons we learned from our choices.
A Consideration For All Technologies
Our goal was to have the Summit App work on multiple platforms (specifically Android and iOS) and in multiple configurations. When dealing with rapid design (and later maintenance) it is a terrible hinderance to maintain separate-yet-redundant code bases to support multiple platforms. Any technology that we used had to support our intended platforms out of the box.
jQuery Mobile
JQM was chosen as our framework for a variety of reasons. As it is arguably the current industry-standard for mobile development, it was obvious to the development team that our need for a robust and lightweight widget set would be easily met with JQM. Being built off of the extremely popular jQuery library, the technology was quickly and easily understood by the team and required almost no spin up time. As we expected, having easy access to jQuery’s widget set, as well as “automatic” gesture recognition, was a tremendous help in getting our application done in time. We initially thought the jQuery ThemeRoller to also be helpful, but came to realize that the more unique we wanted our application to look, the we’d have to write custom CSS. This was expected, but the inability for the jQuery theme-system to work with our growing needs was not.
AngularJS
After careful consideration, Summa chose AngularJS as its mobile-MVC of choice. With the backing of Google, AngularJS has made incredible leaps and bounds in a short amount of time. The development team anticipated that many of AngularJS’s features, such as dependency injection, would allow our application to be lighter thanks to a reduced need for server-side services. This was new technology for the entire team. We found that there is a TON of good information in the form of documentation and tutorials online. It was fairly easy to learn the basics of AngularJS, but the learning curve steepened the deeper you dove into what it could do. Overall, the power of AngularJS is astounding and, while we barely scratched the surface as to what it is capable of, we found that
AngularJS dramatically reduced the amount of code needed to complete complex tasks.
Praise aside, the largest issue we had in development of the Summit App was the fact that JQuery Mobile and AngularJS simply do not play well together. Under the “lessons learned” category, this issue was at the top of the list. While there is a great deal of discussion online about using these two technologies together, we found it difficult to find answers to our questions as problems popped up. This issue will be discussed in greater detail in a future blog post, but in short, save yourself the trouble and don’t use jQuery Mobile and Angular together.
Salesforce Force.com Platform
Summa is fully vested in using the Salesforce Force.com platform in our business. As such, we wanted to bring many of the features available in the platform to the Summit App. Those features included the following:
- Authorizing and authenticating of users.
- A place to discuss the Summit and make announcements - realized by using a Summit-specific Chatter group.
- A survey to collect responses on a wide variety of topics concerning the Summit - achieved by using custom data objects within Salesforce.
- The ability to create reports based on survey data.
Salesforce Mobile SDK 2.0
Because we were using the Salesforce Force.com platform for a variety of features in our app, we had but one practical choice as to how to interface with it. Installing the Salesforce Mobile SDK for each platform was as simple as unpackaging a folder on your drive. While Summa has a strong group of Force.com developers, the Salesforce Mobile SDK is relatively new and the Summit App development team had never used it before -- but this was ok! Sample projects were bundled within the SDK which allowed us to quickly learn how to use the basic features of the SDK - along with some more advanced ones. Any developer knows that functionality such as authentication and authorization can be cumbersome to implement, but with the Salesforce Mobile SDK they were practically freebies.
RequireJS
RequireJS was another piece of technology that the Summit App development team had never used. While our application wasn’t large enough to require use of a file and module loader, we strive to use best practices and know that module loaders can be extremely useful. We found that RequireJS was useful because it made our code development quicker and cleaner - just like their website promises! Only one developer from the team was responsible for setting up RequireJS within our application, but everyone was able to quickly understand “how it worked” and make changes simply by viewing the code. Had we needed it, the RequireJS website had a well-defined guide to their API as well as how to use RequireJS with frameworks like jQuery.
Apache Cordova
Using the Saleforce Force.com platform is what required us to develop a hybrid application as opposed to a pure-HTML5 one. The Salesforce Mobile SDK is platform specific and came bundled with Apache Cordova. All of the features within the Summit App were accomplished without writing any platform-specific code. Because of this, Cordova was only used behind the scenes within the Salesforce Mobile SDK. However, this isn’t to say there weren’t potential complications. We found that Cordova version 2.3.0 was what came bundled within the SDK (at the time of this writing, version 3.1.0 is the most recent stable build of Cordova). Naturally, newer versions of Cordova contain bug fixes and extended functionality which would have been nice to have had we wanted to make calls to the platform’s API. Since this was not necessary in our application, it wasn’t a problem for us. It should also be noted that the iTunes App Store will not release any apps built using versions of PhoneGap prior to v2.5.
Thanks,
Bradford Bisinger
Senior Technical Consultant
Summa