mardi 5 mai 2015

Choose web architecture for small and mid-sized intranet applications, Java EE backend?

In the next years we're planning to move our legacy fat client applications to our companies intranet. All the applications are "boring business apps" with minimal graphic requirements. The major representation of data is a table. We will need a chart (columns/ pie) from time to time.

The expected load will be very low with with 1-5 concurrent users per application.

For backend we're forced to use a Java EE Application Server (currently Glassfish), for frontend we mainly expect to see Internet Explorer 11 and Windows Mobile clients.

There are two types of applications with different requirements in terms of complexity (screens or pages), life cyle, planned end devices, developer know how available (or better "trainable") and requested development speed:

Type A (Small Sized Application)

  • different pages: up to 4
  • expected lifespan: up to 5 years
  • clients: desktop PC with IE11, Smartphones (browser) with IE11 Mobile, Windows Phone App (optional)
  • developer know how: small (part time)
  • quick development required (3 days maximum)

Type B (Medium Size Application)

  • different pages: up to 20
  • expected lifespan: 10 years and longer
  • end device: Desktop PC, Laptop
  • know how available: HTML5/ CSS/ Javascript and J2EE
  • development speed is not the biggest concern

Looking at the requirements ease of development (particular for type A) and long term support of the choosen framework (type B) are important criteria, performance and scalability are less important.

Here is where I have a couple of questions/ uncertainties where any ideas/ further readings from your side are very much appreciated:

Approach Type A applications

  • follow a Single Page Apps (SPA) style and use HTML5 technologies only
  • choose a simple enough Javascript MVC framework (http://todomvc.com/ is a good starting point)
  • expose the remote services required (only a hand full) as REST services
  • REST service is maintained by a different team with Java EE know how

I picked the SPA approach since this seems to be the common way to go when you look at how Chrome/ Firefox/ Windows Phone apps are mainly implemented.

It is also a know how thing: I can expect the personal available to learn HTML5/CSS/Javascript good enough for those simple applications. However, since we're tied to Java EE on the backend I don't want to add this extra burdon on the type A developers.

My main concern here is to find a simple yet powerful enough Javascript MVC framework. I tried AngularJS and BackboneJS myself and found the learning curve for our purposes to steep.

Approach Type B applications

Here everything is still blurry. For me the main question here is where the logic resides. For our type A applications I believe it's simpler if everything is happening on the client side with an occational Ajax request to the backend. For the type B applications I am not sure if this is still a good approach in terms of handling complexity.

Our J2EE guys are favoring Java Server Faces/ Primefaces very heavily. My personal feeling is that this is the wrong direction to go. For me JSF is trying to hide the nature of the web behind a programming model. This is also more or less what ThoughtWorks is concerned about.

I personally like the roca-style quite much. "The server-side consists of RESTful backends, serving human-readable content as well as services for machine-to-machine communication, either public or internal. The client-side focuses on a sustainable and maintainable usage of JavaScript and CSS, based on the principle of Progressive Enhancement. This technique is pursued by nearly every basic web technology, e.g. HTML or HTTP. Client and server are largely independent from, yet complement each other."

For our "boring business applications" Roca-style sound for me like the right way to go. However, if we would pick this architectrual concept for our type B applications (all logic on the backend) this would be a huge contrast to our type A applications (SPA, all logic on the client).

Since type A and Bs are all web based they still can reside next to each other. However, I don't feel well proclaiming two opposite architectural styles from the beginning on.

What would you recommend? What do you think about frontend vs. backend logic? Any really simple Javascript MVC for small applications? Or should I forget about all this decoupling and separation of concerns and give JSF/ Primefaces a try?

Many thanks for sharing your thoughts and experience.

Maik

Aucun commentaire:

Enregistrer un commentaire