Tag Archives: client

Technology stack for a web application (2013) – Part II

As I speak/write the blog is kept on updating with the reasons on the choice of various technologies/framework. Please look into the blog for more updates. Please look into the first part of this blog in here.

Web/Client Tier

  1. Spring MVC (Web Framework) – Here any good web application framework can be used. Even good component based framework like JSF is also a good choice, especially JSF implementation namely RichFaces. Once you use any of the component based framework, the level of control you have on the overall final HTML generated as a whole is a big issue especially when the application’s performance is considered. To avoid this using a basic web framework like Spring MVC with a very good JavaScript library is a good solution according to me. Spring MVC has evolved a great deal over the period of time and in line with the Spring Framework philosophy, it allows integrating various other web technologies with ease. Also a typical web application development evolution according to me should be as follows:
    1. Get the requirements from the business
    2. Converting business requirement into meaning user story board
    3. Converting those story boards into HTML’s, most done by an expert graphic designers. usually these HTML nowadays does have some level interaction and page flows shown using the various open source JavaScript libraries like JQuery. Final menu structure, sitemap and so on is designed during this time.
    4. Once getting business confirmation, pass on the HTML’s to the Java developers for making it dynamic and functional in all nature.
      Once the developer gets these HTML’s as designed and agreed by business, if you use any of the component based web frameworks, looking at the HTML provided, it has to be designed from scratch. The developed final HTML which is required will never be achieved by the developer and this can be a big issue to the business. By using such a basic web application framework like Spring MVC will avoid this and the developer will be bale to use the HTML as given by the graphic designed and convert into a dynamic web application. The business will get the same look and feel which the graphic designer as shown and overall the project can be completed in a much shorter span of time.
  2. Thymeleaf / Apache Tiles (Templating framework instead of using JSP directly) – One of the greatest features that i see of Apache Tapestry (a web application framework, initial release, Tapestry 4 and older, before the framework rewrite) is the full use of the graphic designer supplied HTML’s by the developer’s as is and making necessary changes so as to make it dynamic in nature. Thymeleaf brings that advantage onto any web application framework and acts as the templating framework. But there is an issue using Thymeleaf along with the security compliance framework namely HDIV, down the lane I will explain this and how good is it for your web application to use HDIV to cover OWASP security requirements with ease by mere configuration. If you want to use HDIV, the next best templating framework that you can use with your web application framework is Apache Tiles. For more details on Thymeleaf please go through http://www.thymeleaf.org. For more details on Apache Tiles please go through http://tiles.apache.org.
  3. SiteMesh (Decorator – Filter for layout creation/maintenance) – Using a templating framework and layout framework might not be well accepted, but i feel if the application is developed keeping in mind to be made into product and customization in mind, using this layout framework along with a templating framework will be good overall. For more details, please visit http://www.sitemesh.org.
  4. JQuery (JS) – There are so many good JavaScript frameworks available in the market both open source and commercial, which will make developing a web application enjoyable and easy with lot of cool features out-of-box. One of the prominent and mostly used JavaScript framework available as of now is JQuery and I am no exception to go along with it for developing my web application. Its fast, small and feature-rich JavaScript library, which allows traversing,parsing and manipulating HTML document easy and straightforward with it easy to use API’s, guaranteeing support to a variety of browsers available in the market. For more detail, please visit http://jquery.com.
  5. JQuery-UI (JS) – Theming (More for productization) – JQuery UI (user interface) contains a whole lot of widgets, interactions, effects and themes which are built on top of JQuery JavaScript library. A must if you building highly interaction and rich web application. Using JQuery UI with JQuery is a natural choice and i too support this in all aspects. For more details, visit http://jqueryui.com.
  6. Dandelion datatables – Dandelion is a component of the open source web application framework Dandelion. It uses DataTables JQuery plugin to create full-featured HTML based tables. There are variety of ways by which to use the tables in your web application, easy to use, integrate and customize. Any web application requires a datatable for displaying data and nowadays the expectation out of a datatable has grown out of proportions. Using Dandelion will help you realize these to a greater extend with not much hassle. That’s the reason for me to choose this and being a JQuery plugin, makes it even an easier choice. To know more details on this, visit http://dandelion.github.io/datatables.
  7. Bootstrap (CSS) or Blueprint (CSS) – If you don’t have a graphic designer and you are told to do the graphics and design of the web application, i would suggest using either bootstrap or blueprint. These give a head start, suing which the skeleton of the web application can be built and it id designed by experts, so why use their expertise. For more details on bootstrap, please visit http://getbootstrap.com. For more details on blueprint, please visit http://www.blueprintcss.org. As the project name suggests, bootstrap gives you the head start and blueprint give you the blueprint on which to bild you web application. It inherently takes care of many things for you, on such example is browser compatibility and graceful degradation.
  8. D3 JS or Highcharts JS – Both are fabulous charting framework. Both are really good in features and if you application is chart/report oriented, not using any one of them is a crime. D3 can be used for commercial projects for free but Highcharts can only be used freely for non-commercial projects. Since these are JS based libraries, usage is easy and wouldn’t be that troublesome. Highcharts being a commercial products boasts good support and browser compatibility and as its a de-facto requirement, supports graceful degradation according to the browser in which you web application is rendering.
  9. Modernizr (Browser detection and grace degradation in case you are using HTML5 and CSS3) – If your application is based on HTML5 and CSS3 standards, using this JS would be handy so that the web application can degrade gracefully according to the browser in which the application is loading. For more details, visit http://modernizr.com.
  10. HDIV (HTTP Data Integrity Validator) – Good things come later, isn’t? To me one of the best Java Web application security framework. Integrates well with major web application framework and templating frameworks. Just by using this framework, you automatically get your web application security requirement covered to a good level. The framework takes care of almost all the top 10 security threats as classified by OWASP. It gives you this feature by not tampering with your pages by your developers, rather it sits as a filter (highly configurable), and takes care of all without a single line written in your main application code. At any point, if you feel that this is not doing any justice to your web application, removing it can be done very easily. Its a wonderful handy framework which you can use to get past your company’s security team (VAPT). For more details, please visit http://hdiv.org.
  11. yepnope.js (Script/resource loader) – Now your application has good amount of JavaScript library and slowly your application’s client side is becoming heavier and clunkier. You definitely need a conditional resource loader. Out of various resource loaders available in market, I consider using either of these. yepnope JS (cool, innovative and apt name) is an asynchronous conditional resource loader which allows you to load what scripts you want in your application. Its not only light-weight but super-fast. For more details, visit http://yepnopejs.com. These script loaders will surely improve your performance and will also reduce your page’s load time.
  12. backbone.js – You now really have good amount of JS libraries and maintenence of these can be cumbersome if your web applications keeps growing in size over a period of time. This JS library brings structure to the JS coding as a whole and this can be really helpful in case of big coporate web application. For more details, visit http://backbonejs.org.
  13. Custom tags – Custom tags must be written and used as much as possible bringing in component based development in case you plan to use Spring MVC as your choice of web application framework.

Exhausted. I will be completing my three part series in my following blog post. In couple of days and you will see my final blog. Having said that I will keep updating the earlier blog parts with more and more detail, especially when i get more details from my fellow bloggers/readers.

Page Visitors: 1780

Technology stack for a web application (2013) – Part I

This is an opinionated blog as I do favor considering Spring Framework in the various tiers of a typical web application. I consider the framework because of its features, ease and above all good enthusiastic community and activity surrounding it as a whole. While doing this evaluation and recommendation, I have put the year, as technology changes are so fast, obsolesce is down the lane and I do want to make sure that it is reviewed in a timely manner so that rather than giving a wrong recommendation, make recommendation to some extent useful and ideal for a typical web application. The whole technology stack can be summarized as below:

Web/Client Tier

  1. Spring MVC (Web Framework)
  2. Thymeleaf / Apache Tiles (View framework instead of using JSP directly)
  3. SiteMesh (Decorator – Filter for layout creation/maintenance)
  4. JQuery (JS)
  5. JQuery-UI (JS) – Theming (More for productization)
  6. Dandelion (For datatables) – JSF datatables are heavy
  7. Bootstrap (CSS) or Blueprint (CSS)
  8. D3.js – for graph representations
  9. Modernizr (Browser detection and grace degradation in case you are using HTML5 and CSS3)
  10. HDIV – to tick all security requirements in your application from a single point. At this point in time, using Spring MVC along with Thymeleaf is not supported by HDIV, but its not far away. So if you want to use HDIV, Spring MVC along with Apache Tiles should be used.
  11. yepnope.js (Script/resource loader)
  12. backbone.js
  13. Custom tags will be written and used as much as possible bringing in component based development

Server Tier

  1. Spring Framework
  2. Consider using Spring Data – Different profiles

Things to be considered as a whole:

  • WebJars for managing JS and CSS libraries as jars
  • Caching using Ehcache
  • Multiple DB support (development can be even considered using in-memory database)
  • Consider using Datatables4J
  • Reason for each technology/framework selection

As detailed earlier, the reasons that I consider might be fully opinionated/biased, please let me know your suggestions, after careful consideration looking at its advantages/disadvantages, the technology stack will be considered and changed accordingly. For the year 2013, I consider this blog as evolving as possible according to the suggestions that I get from the readers of www.javacodebook.com.

I will have another blog written very soon (2 days’ time) giving the reasons for each choice which I made so that while you do a selection in your project, you do have enough reasons and points to be given to your management.

Please visit Part II of this blog in here.

Page Visitors: 760