Did you miss out on Part I? Click this link and read it here on DZone.
Implementation Technology with Java
Developing apps for different target systems is expensive. The idea of Progressive Web Apps is great since it saves you writing native apps for each operating system. But still in some cases — at least at the moment — we need to build native apps. For this purpose and to save resources there is the so-called Hybrid Application Development.
There are a lot of Hybrid Application Framework with HTML User Interface out there. The problem with this technique is that the HTML UI does not feel really native. Therefore there is a second type of Hybrid Application the so-called Hybrid Application Framework with Native UI. In this case, you still use the native UI in each operating system and use e.g. the same programming language to cover the rest. As Java is still the number one programming language it is wise to base your platform strategy on Java.
The graphic below shows a comparison between Progressive Web Apps, Hybrid Applications with HTML UI and Native UI in runtime.
Comparison Progressive Web Apps - Hybrid Apps with HTML UI - Hybrid Apps with Native UI
What kind of tools and products does Java offer us to implement the technology above?
Web Apps Based on Progressive Web Apps
- Bootstrap (GWTBootstrap3),
- Material Design (GWT Material Design),
- Material Design with Polymer.
- The future version of GWT also can work with Angular 2 (Angular2Boot).
- There is a collection of best practices how to use GWT to implement Progressive Web Apps. So you can write Progressive Web Apps today completely in Java with GWT.
Native Apps With HTML UI
Using mGWT and mGWT PhoneGap with skins of Android and iOS: With the same technology Java, GWT and PhoneGap / Apache Cordova you can write a native app with HTML UI. Instead of using this technology you maybe should use Progressive Web Apps technology since HTML UI does not look native anyway. Progressive Web App is just the same and you can write it once for web and mobile.
Native Apps With Native UI
In Android you can implement the native UI just using Java, no special workaround needed.
In iOS, you need to use Objective-C to implement the native UI. Using Open Source product like J2ObjC (Java to Objective-C transpiler) will help a lot to reuse the Java codes
A product like Google Inbox use GWT and J2ObjC to deliver the same functionalities across operating systems (Web, Android, and iOS) on the same time.
So how can we define our platform strategy today? Following points are my summary:
If you use Java as your programming language leverage Spring Boot and Spring Clouds for your Microservice architecture implementation. But at the end, you can use different implementation technologies like Java, .NET, and others. It is just important to use the standards in the next point.
Server-side and Business Logic
Use RESTful and JSON for the communication between the mircoservices.
Authentication and Single Sign-On with OpenId Connect and OAuth 2 is a must in this platform strategy so that you are able to integrate all the microservices with all different implementation technologies.
Portal and Portlets are dead. Use Progressive Web Apps for any possible apps. If you need to integrate many Progressive Web Apps just use an integration or tool bar just like what Google did with its products (see the Google+ picture above).
If you need Native Apps build them with Hybrid Application Framework with Native UI not HTML UI.
Open Source products to make your life easier for building Progressive Web Apps and Native Apps with Native UI in Java are following: GWT and J2ObjC. Consider them for better productivity and time to market.
A platform strategy today does not need to be based every single implementation in the same language, still if you have a small team emphasis on the same language and Java is still the top programming language available. The next picture at the end of this article shows state-of-the-art implementation technologies for a technical platform based on Java.