dinsdag 2 september 2014

separating the frontend from the backend

Introduction

Through the years I seen a couple of application architectures. Some of them had the multi tier design but where  still one war file. I never seen that as a bad design. That was the best available way. The fun part of a way like that was that the architect had to defend the borders between the layers. That is where the weak point in this architecture lies. It is easy for a developer, for what ever reason, to cross the borders and start mixing the responsibilities of the different tiers. This is the first step of downgrading an well setup application to a kind of chaos architecture.

As allways in time ideas improve. A couple of years ago we suddenly had SOA. The backend logic was pushed back into REST or SOAP services with a separate project that was the frontend. The downside of this architecture was, that the html code was still infected with tags from java frameworks. Fore example
JSF had is own XHTML and even the newer like Wicket have there own tags. The most Frontend guys dont like that. They know html and they dont want to know about all the java frameworks.

The other downside of weaving the java frameworks into html is: that if the compagny decides that in some cases it should not be Java but something like PHP or Ruby etc... they still endup with a java frontend framework.

Now we enter a time where the possibilities to separate the frontend from the backend in a sharper and smarter way. It is possible to run a frontend tier completely on a javascript based server like node.js. Here is a list of js solutions.

The architecture:


Behind teh node js server part you can build as many java rest services as needed. Now we have a complete separation from the frontend and the backend. On the node.js server it is also possible to declare small html objects like textboxes or buttons etc...

Conclusion:

There are allready compagnies working on a application architecture like this or have in place. It requires to see the frontend as separate specialism and for that you need people that know how to deal with a frontend architecture like this. As a backend developer you have to let te responsibility for the frontend go and concentrate on what you can do actually the best backend development.

Have fun!


Geen opmerkingen:

Een reactie posten