Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What architecture for web app with mobile apps?

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:

  • The DB is the same as the one used by the current webapp.
  • Building a Business logic layer which would be a webservice which exposes all the information I need from the DB and handles user inputs as well. This is server side.
  • A web service that interrogates the Business logic layer and exposes the information via XML or JSON
  • The UI layer which is basically my mobile app (iOS, Android, ...). These send queries to the business layer via the web service. The queries return data to be displayed or send UI information.

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?

like image 561
nche Avatar asked Jan 28 '12 12:01

nche


People also ask

What are the 3 layers of a mobile Web architecture?

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.

Can a mobile app be a web app?

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.


1 Answers

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.

like image 136
Daniel Alexiuc Avatar answered Nov 15 '22 11:11

Daniel Alexiuc