One perk of working at West Monroe is our managers and architects are fortunate enough to attend a week long leadership training program, put on annually by the Yale School of Management and our European colleagues from BearingPoint. A mainstay throughout the week, leading a number of the courses, is Professor Victor Vroom. Professor Vroom is an authority on the psychological analysis of behavior in organizations, particularly on leadership and decision making. His 1964 book, Work and Motivation, is regarded as landmark in that field, and his books, Leadership and Decision Making and The New Leadership, are widely cited as breakthroughs in the study of organizational behavior. A concept developed by Prof. Vroom, known as Decision Making for Leaders (or DMFL), is a theoretical model for selecting a leadership style for group decision making, contingent upon the specific decision at hand. Part of Prof. Vroom’s concept also includes an “Expert System”, a software program and algorithm that enables a manager to use the Vroom decision-making model to select the decision process/leadership style that would be most effective in solving problems or making decisions which impact others.
West Monroe’s mobile application development team worked with Prof. Vroom to turn his Expert System concept from a website into a handy mobile app that could be used on-the-go by students and managers who have learned the DMFL system.
If interested, you can purchase the mobile app from the respective app store for your mobile device from these locations:
We wanted to build this as a native app, so that it would work offline and we could take advantage of native charts and graphs, and also enable Prof. Vroom to have a presence in the various app stores – an easy way for his students to simply “download the app” in order to use the concept in everyday scenarios. Though we wanted to build native apps, we didn’t want to completely re-build the app three times and spend time porting the code between Objective-C (iOS), Java (Android), and C# (Windows Phone), so we decided to build a cross-platform native app.
From the beginning, we knew that we wanted to develop this application for all of the major mobile platforms — iOS, Android, and Windows Phone. Each platform-specific app would share common enumerations, constants, models, business logic and algorithms. The algorithms used by this application are fairly large and complicated (about 1000+ lines of code), so one of our goals was to come up with a solution that maximized the reusability of this algorithm code. We also wanted to preserve the user experiences and performance gains that come with developing a native application. The solution that we decided on that was able to meet all of these needs was Xamarin. By using Mono for the core of the application, there wasn’t any need to re-write the business logic multiple times, which could result in errors in transcription.
Xamarin.iOS and Xamarin.Android are implementations of Mono, a framework based on Microsoft’s .NET Framework, that run on Apple’s iOS and Google’s Android platforms, respectively. These frameworks bring together two disparate platforms under a common development environment — Xamarin Studio (or Visual Studio), and development language — C#. With the environments and languages shared, it enables a large amount of code reusability between all mobile platforms while still maintaining a completely native user experience. Since these frameworks are based on the .NET Framework, the code could be easily shared with Windows Phone as well. A Portable Class Library (PCL) containing the common code was key to sharing code between each native app.
As previously mentioned, one of our main goals was to preserve the user experiences that come with writing a native application. Each of our targeted platforms has very different and defining paradigms that we had to adhere to in order to achieve that goal. By utilizing Xamarin’s platform to create a common codebase between each application, we were able to build three completely different UI layers on top of our back end (see app architecture diagram above); each with their own UI style and experiences. This allowed us to take advantage of the native controls relative to each platform that would not have been available in an HTML5 Web Application. These native controls include Panoramas, Pivots, and Application Bars for Windows Phone; TableViews and Segmented controls for iOS; and ListViews, ActionBars, and Tabs for Android. Each one of these controls provides a unique, seamless, and intuitive user experience that users of these platforms have already familiarized themselves with and have come to expect. Providing a native user experience that matches the look and feel and usability of other apps on the platform makes it easy for users to quickly learn how to use a new app, rather than “context switching” between disparate user interfaces.
As you can see, there are a number of benefits to building a cross-platform native app if you’re looking to deploy to multiple platforms. The core benefit to this architecture is that you can easily share your non-UI-related C# and .NET code across all versions of the app (iOS, Android, and Windows Phone) with little to no changes, while still achieving native app performance. By re-using core business logic code between multiple platforms, you’re able to ensure the consistency of app behavior across platforms. You no longer need to worry about getting different calculation results because you made a mistake when porting your code from Objective-C to Java or C#. Furthermore, without having to worry about re-writing your core app business logic, you can then focus on building a native user interface that matches the look and feel of other apps on the device – providing a more seamless, intuitive user experience for end users. Overall, cross-platform native apps are a viable option if you plan to deploy a native app across multiple platforms – especially if your app contains a non-trivial amount of algorithm or business logic code.
You can read more about building cross-platform native apps in one of our previous blog posts. West Monroe Partners is a Xamarin Premier Consulting Partner, and our team has extensive experience in creating cross-platform native apps using .NET, Microsoft, and Xamarin technologies. Contact us to find out more about our mobile application solutions.