我正在开发一个基于AEM6.2的大型门户网站的PoC。
在此之前,我一直在使用遵循AEM前端逼近的:
- Server side rendering based on JSPs, now Sightly (HTL)
- Modular JS (Feature or page based) - Vanilla JS and jQuery
- No Frontend MV\* Architecture, no frameworks
- Hybrid rendering: Sightly (HTL) + Handlebars templates + AJAX
- Custom MVC based on Vanilla JS + Handlebars (One way)
- No frameworks
下一个项目的我们正在开发一个新的前端框架
- Clientlibs and designs will be handled with categories.
- Managed Dynamically based on page components
- Each AEM Component will be mapped to one or several UI Components
- Styles: Theme + component styles
- FE logic: Services + component controllers
- Server side rendering based on Sightly (HTL)
- Component based JS - Vanilla JS or or Angular 1.x (Component directive approach) or Angular 2
- Server side rendering based on Sightly (HTL)
- Component based JS - Angular 1.x (Component directive approach) or Angular 2
- Encapsulation with Polymer (Optional)
- Hybrid rendering: Sightly (HTL) + Polymer Web Components / Angular 2
- Two way data binding
- Encapsulation with Polymer (Optional)
- OOTB Polymer Components for Google APIs
- Browser rendering: Angular 1.x (Component directive approach) or Angular 2
- Two way data binding + Angular 1.x Routing or Angular 2 Routing
- Encapsulation with Polymer (Optional)
- React.js + Flux is discarded
My关注点- Web:
<!-- Import element --> <link rel="import" href="../web-components/banner.html"> <!-- Use element --> <banner title="${properties.title}" src="${properties.src}"></banner>
<dom-module id="banner"> <style>...</style> <template> .... </template> <script> Polymer({ is: 'banner', properties: { title: String, src: String } }); </script> </dom-module> web组件可以在其他系统中托管,可以通过Node.js或AEM与聚合物CLI (硫化等工具)协同工作。 我的担忧- AEM:
My concerns角2:
.....你觉得呢?你是如何在AEM管理你的水疗中心的?您推荐另一个框架或库吗?. 我非常感谢你的建议。这些用例可扩展到IBM的Liferay . 提前谢谢你
发布于 2016-10-16 18:52:49
发布于 2017-01-06 15:43:50
我已经让聚合物在AEM6.x作者环境下工作,但我仍然在尝试一种可能的组件架构(尽管我有一些想法和观点)。
如果您仍然面临前面提到的HTML导入问题,那么您可能会遇到与我相同的问题。在我的游乐场项目中,我添加了作为二进制数据(nt:文件节点)的web组件,但是当服务器请求它们时,AEM的Sling引擎将自动添加一个'Content-Disposition: attachement'报头。在我的设置中,是这个标题阻止了从工作中的进口。
您可以通过配置控制台(/system/ console /configMgr)配置“悬挂式内容配置筛选器”,并将web组件的路径作为例外添加。
当然,这很快就变得非常麻烦,所以我创建了一个过滤器,它足够智能,可以拦截请求到我的web组件的存储位置,并将自动删除标头。
我希望这能帮到你!
https://stackoverflow.com/questions/40070828
复制相似问题