有没有为不同供应商定制不同视图的框架?
我们与多家供应商集成以展示我们的产品目录。每次,我们都必须根据供应商提供的模板来自定义视图。 在分析所有模板后,我发现以下几点:
- 通常,我发现总共有 6 种不同类型的块。假设 A、B、C、D、E、F。
供应商 John 模板包含 A、C、E。模板的布局是
---------------------- | A | ---------------------- | C | E | ----------------------
Vendor Micheal 模板包含 B、D、E、F。模板的布局是
---------------------- | B | F | ---------------------- | D | E | ----------------------
Vendor Shane 模板包含 A、B、C、D、E、F。模板的布局是
---------------------- | B | F | ---------------------- | D | E | ---------------------- | A | C | ----------------------
- A、B、C、D、E、F 的业务逻辑在上述所有情况下都是相同的。
- CSS、图像文件和 Html 结构在上述所有情况下都是不同的。
我正在尝试找到一个通用的解决方案,我可以在其中自定义视图并准备演示文稿。 java中是否有任何框架可以帮助解决我的问题或任何建议。
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 suppose 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为此我必须推荐 Symfony。
单个项目包含单个数据模型上的多个应用程序,其中每个应用程序都可以被视为某人、供应商或管理员的视图。
另外,您可以在根目录中存储一些可重复使用的模板片段,并按照您想要的方式在每个应用程序中重复使用它们。
您不必切换到 Symfony,您可以只使用它的一部分,并保持当前的数据模型。
http://www.symfony-project.org/
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/
Apache 切片 或 Sitemesh 可能适合您的需求。它们是专为按照您的意愿“平铺”您的视图而设计的框架。
Apache tiles or Sitemesh might suit your needs. They're frameworks designed for "tiling" your view however you desire.