We have integration with several vendor for showing our product catalouge. Every-time, we have to customizing the view according to the provided templates by Vendor. I have find following points after analyzing all the templates i.e. as follows:
- Commonly, i have found out there are total 6 different type of blocks. Let's supp开发者_StackOverflow社区ose A,B,C,D,E,F.
Vendor John templates contains A,C,E. And the layout of the template is
---------------------- | A | ---------------------- | C | E | ----------------------
Vendor Micheal templates contains B,D,E,F. And the layout of the template is
---------------------- | B | F | ---------------------- | D | E | ----------------------
Vendor Shane templates contains A,B,C,D,E,F. And the layout of the template is
---------------------- | B | F | ---------------------- | D | E | ---------------------- | A | C | ----------------------
- Business logic for A,B,C,D,E,F is same in all the above case.
- CSS, Image File and Html structure is different in all the above case.
I am trying to find out a generic solution where i can customize the view and prepare the presentation. Is there any framework in java who can help to solve my problem or any suggestion.
Apache tiles or Sitemesh might suit your needs. They're frameworks designed for "tiling" your view however you desire.
I have to suggest Symfony for this purpose.
A single project contains several apps on a single data model where each app can be viewed as a view for somebody, a vendor or an administrator.
Plus, you can store some reusable pieces of templates at the root and re-use them inside each app the way you want.
You dont have to switch to Symfony, you can use just a part of it, and keep your data model at it is today.
http://www.symfony-project.org/
精彩评论