I have a web application running under Apache Wicket (a Java EE MVC framework). For now it is a website. I am thinking about the architecture to use in order to build mobile apps as well. The mobile apps will simply be rendering information and taking in user inputs (like profile configuration for example).
I have an N-tier architecture in mind where:
I was thinking that the web service layer could then serve the website as well as the mobile applications.
Does this architecture make sense? If yes, does my last suggestion break the MVC structure already in place?
Mobile app architecture may incorporate several layers, but it consists of three layers in most cases. Those are the Presentation layer, the Business layer, and the Data layer.
A web app is an app that is available online and can be used on multiple devices, but a mobile app is an app that only works on a mobile device. Learn about the differences between the two in this guide.
I wouldn't bother rewriting the existing web-app, it is probably not worth the effort.
Your intuition (IMHO) is correct though. Server side HTML templating as part of some MVC server side web architecture is simply not well suited to the web, and is particularly not well suited to mobile web apps.
For your mobile site, abandon this idea completely. Expose some web services with JSON on the server that simply return data (no UI), and let your mobile app do all the UI and web work. You can even use an MVC style architecture in your javascript if you prefer to think that way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With