5

The company I work for already has a fully functional web app that is written in java using JSF framework. I'm now in the process of creating a mobile version of this web app and having some general questions on where to put this mobile web app.

  1. Should this mobile web app be a separate project, packaged in a different war, and installed as separate app in server or should it be part of the existing web app, packaged in the same war, and installed as same app in server?

  2. Should the mobile web app uses existing web app's jsf Manage Beans? For example, we already have an order entry app that consists of several jsf Manage Beans and jsf pages. To create the mobile version of this app, should I simply create new mobile version of jsf pages but uses all the exist jsf Manage Beans in those mobile jsf pages? Will I run into problem because mobile web app's page-flow might be different from the web app's page-flow? But if I don't reuse, it seems like there will be a lot of duplicate code.

3 Answers3

1

Depending on the architecture your current web app is using. When dealing with multiple channels like in your case, it's recommended to have a core system that manages business logic and data access. On top of it, you would stack your thin clients like web app, mobile app, android app, etc...

I would say if you can, refactor the web app as much as you can to separate the business logic and presentation layer. Then utilize business logic layer as a common, while maintaining two different projects for the clients.

Alexus
  • 2,398
0

(1) depends on the intended life cycles of your web app and the mobile version of the app. If you give both always the same version number and deploy them both always simultanously, it makes more sense to keep them in the same project. If the life cycles are somewhat different (for example, you create a new version of your mobile app every 3 months, but a new version of your web app every day), then it is better to keep them as different projects.

(2) depends on (1). If the life cycle of both is the same, it will be probably much easier to have shared components, since you can always use the same version of those components. If the life cycle is different, reusing your "Managed Beans" is not impossible, but will probably need much more care and configuration management, so you do not run into problems when a older mobile app version accesses the same data produced with a newer version of your Web App.

Doc Brown
  • 218,378
0

Depends on a lot of factors, but essentially:

If you have written the web app or have a lot of experience with it OR that web app script is built with the logic/etc (rather than being a thin client calling an API) it might be easier for you to have it feed different displays and use the same logic.

However, if the app is server/client based (where the web app acts as a client speaking to a service/server through an API), it is probably much easier to start a different project and modify the original web app to redirect to the mobile web app. If everything's written with a decent framework, you might find you can handle all of the mobile/desktop display stuff through HTML/CSS/JS with minimal backend changes.

Personally, I've never written a web app where the desktop/mobile are handled in HTML/CSS/JS with the exception of when I was trying Foundation by ZURB, do note with Foundation that it's a nightmare to convert a site to Foundation as the whole idea is to design for mobile first and scale up to desktop (which is much easier than the other way around).

Jack
  • 69