`
kirenenko04
  • 浏览: 151028 次
  • 性别: Icon_minigender_2
  • 来自: 上海
社区版块
存档分类
最新评论

Cartridges

 
阅读更多

Cartridges

What is a Cartridge?

 

A cartridge is a directory structure that is used as a flexible deployment mechanism for customized functionality. A cartridge can contain many different types of files:

static files such as CSS, JavaScript, and images, as well as WSDL files.

 

There are also folders for Demandware specific files: pipelines, scripts, templates, and form definitions.

A cartridge is fully contained in one directory. Every cartridge has specific sub-

directories where certain file-types must be stored. For instance, all Demandware script files must be stored in a scripts folder.

The storefront.properties file is generated by Studio when a new cartridge is created. This file is required.

 

Cartridge Path

In order for a site to use a cartridge, the cartridge must be added to the cartridge path in Business Manager.

When a call is made to a file, the Demandware server will look for the file starting with the first cartridge listed in the cartridge path. For instance, if a call is made to an ISML file called product.isml and that file is located in two cartridges that are both in the cartridge path, the Demandware server will use the first one it finds.

 

Add Cartridge in Cartridge Path

1. Administration -> Sites -> Manage Sites -> {Select Site} -> Settings tab

2. Add Cartridge Path:

Cartridges can be added to the cartridge path by typing a colon (:) between cartridge names. All names here are case sensitive and must match the names of your cartridges in eclipse. There should be no spaces in-between each item.

e.g.   training:storefront_richUI:storefront

 

Cartridge Types

There are three types of cartridges you can create in UX Studio:

1. Storefront cartridge

2. Demandware cartridge

3. Business Manager cartridge (本课不介绍)

Your business needs will determine what type of cartridge you will create in UX Studio. Every new customer will have at least one storefront cartridge.

 

Storefront Cartridge

A new storefront cartridge contains a copy of the default SiteGenesis cartridge available in the SiteGenesis Demo Site package. Most projects start with this SiteGenesis reference code.

 

Demandware Cartridges

If you need to build re-usable functionality that is specific to a site when there are multiple sites in a production instance, then you may need to create a new cartridge.

You may want to add a new cartridge when functionality is:

Generic: reusable code used in multiple sites

An integration to an external system

Specific to a localized site: css, images and resource files for a language-specific site.

 

Some best practices

1) Keep an original SiteGenesis cartridge in your project just for comparison purposes, but don't make     it part of the cartridge path

2) Use another storefront cartridge for common code that you intend to

    reuse in multiple sites:   <client>_core

3) Create cartridges for site-specific functionality that might overwrite the core: app_<site>

4) Any integration code should go in a int_<site> cartridge

 

 

View WebDAV cartridge directory in Business Manager

1. Administration -> Site Development -> Development Setup

2. In the WebDAV Access section, click the link for Cartridges.

Create a new version on the server

1.  Administration -> Site Development-> Code Deployment.

2.  Click Add to create version2. Click Apply.

3.  In Studio, open the Demandware-> Change Upload Staging Directory…

 

Creating a New Cartridge

When you need to segregate (分离) code between sites, you may want to create a new empty cartridge. Creating a new empty cartridge will enable you to add only the code you need for a site or specific sites in an organization.

 

Create a new empty cartridge

1. File -> New -> Demandware Cartridge.

 

Creating a Storefront Cartridge

When you create a new storefront cartridge in UX Studio, a copy of the

sitegenesis_storefront_richUI and sitegenesis_storefront_core cartridges will be downloaded to your workspace and renamed with the name you specify. As mentioned before, these reference cartridges have all of the code needed for a SiteGenesis storefront to work in the Demandware platform. As part of the architecture approach since the 12.6 deployment, Demandware will be separating the Site Genesis cartridge into two distinct cartridges based on the following functional guidelines:

 

1) Core Cartridge

This cartridge will embody (体现) the business layer and contain all of the “server” side components such as Pipelines and Demandware Scripts as well as a non-JavaScript version of the storefront. This cartridge will embody the simple presentation layer and contain ISML templates, Common CSS files, Forms and Resource files. There will be no use of JavaScript, AJAX, or any advanced UI elements inside of this cartridge. As a result the rendering output of Core is just a stream of HTML & CSS assets that represent the page styled to look as close as possible to Site Genesis wireframes today without the use of JavaScript. So at this level the site will be“usable”, and only partially visually esthetic. The goal of this cartridge is to provide a fundamental (基本) starting point for new site development under the circumstances (情况) when the client’s design differs significantly (明显不同) from Site Genesis wireframes. The benefit being that you can start with just the essentials (概要) and not have to “undo” or“separate” any pre-conceived (预想的) Site Genesis UI design.

 

2) Rich UI Cartridge

This cartridge will hold the overloaded any specific CSS and advanced UI elements required to turn the Core Cartridge into the advanced look and feel of the SiteGenesis storefront as we know it today. That being said, it is important to know that the Rich UI Cartridge does not contain ISML templates, but rather uses an initialization mechanism in order to effect changes to the rendering of Core templates in the client browser.

 

When you make changes to the new storefront cartridge, your changes will be uploaded to the Demandware server and can be viewed immediately as long as you:

1) Set the cartridge to be uploadedto your workspace server

2) Put the new cartridge in the cartridge path

l  Have site caching disabled for the site

 

Create a New Storefront Cartridge

1.UX Studio: File -> New -> Demandware Storefront Cartridge

分享到:
评论

相关推荐

    Android代码-javatari

    New concept: Savestate Cartridges! Store emulator state as Savestate Cartridge files to disk any time (press F8) Savestate Cartridges can be distributed and loaded as normal ROMs Savestate Cartridges ...

    Openshift平台实现Devops方案.docx

    Gears 提供了给 cartridges 运行的容器,nodes 是一台物理机或虚拟机,districts 则定义了一些 nodes,其中的 gears 可以方便地进行 node 负载均衡。 OpenShift 平台提供了一个基于 namespace 的应用模型,每个用户...

    HPDESIGNJET5000和5500系列打印机-前面板信息的中文解释.pdf

    9. Full ink cartridges needed:墨水系统启动时必须使用装满的墨盒,才能进行整个墨水系统的初始化。 10.Have ink tube replaced or risk printer damage Contact HP:内部墨水系统软管迫切需要更换。请与惠普客户...

    private-paas-cartridges

    该存储库不再维护。 问题报告和拉取请求将不予处理。 WSO2专用PaaS墨盒 分支 建置状态 掌握 盒式磁带提供了向WSO2专用PaaS添加新的运行时,服务和中间件的方法。 它可以是使用以下方式创建的Docker映像或虚拟机...

    Foglight5安装指南

    - **Cartridge加载**:Cartridges是Foglight监控不同组件的插件,如数据库监控、操作系统监控等。在安装过程中或安装后,你需要根据需求加载相应的Cartridges。 ### 5. Foglight SPID的安装 - **Windows环境下的...

    OpenShift-2.0-User_Guide-en-US.pdf

    4. **Cartridges**:Cartridges是OpenShift平台的一个核心概念,它允许用户在应用程序中增加额外功能和服务,比如数据库服务、编程语言运行环境等。 #### 应用程序管理 手册通过一系列章节来指导用户如何通过...

    HP3608 LCD 屏幕快速参考

    - **Checking cartridges**(正在检查墨盒):打印机正在检查墨盒是否正确安装及墨量情况。 - **Shutting down**(正在关机):指示打印机正在进行关机过程。 #### 传真信息 - **Ringing**(响铃):接收到传真...

    Jolimark映美BJ109W打印机用户手册.pdf

    * 打印机组件材料的安全性:plastic parts, metal parts, ink cartridges, and other components are designed to meet safety standards. * 避免将打印机放在易被液体溅到的地方,并避免堵塞机壳上的小槽或开孔。 ...

    dp使用手册

    - **Ultrium Tape Cartridges (Ultrium 磁带盒)**:用于存储数据的物理介质。 - **SDLT Tape Drives (SDLT 磁带驱动器)**:早期的磁带驱动器技术,相较于 Ultrium 性能较低。 - **SDLT Tape Cartridges (SDLT ...

    MATLAB用拟合出的代码绘图-cartridges:墨盒

    MATLAB用拟合出的代码绘图墨盒 该软件包包含用于读取和绘制墨盒外壳图像的实用程序。 它对这些图像进行预处理,并实现一种算法来比较这些图像。 它为每个成对比较产生一个相似性得分,并计算偶然获得更高得分的可能...

    哈佛肯尼迪学院-政策制定者技术资料:疫苗平台(英文)-20212-17页.pdf

    此外,文件还提到了在疫苗平台技术发展过程中遇到的术语问题,例如“plug-and-play”和“cartridges”等术语经常被用来描述疫苗平台技术的功能性。这强调了在技术传播和政策制定过程中,清晰的术语定义和沟通的重要...

    OKI 日冲C3530 MFP参考手册.pdf

    Replacing Toner Cartridges 该部分介绍了如何更换设备的墨粉盒,包括检查墨粉盒、更换墨粉盒、调整设置等步骤。 Service & Support 该部分介绍了设备的服务和支持,包括故障诊断、维护和更新等。 Access ...

    5000和5500系列打印机.pdf

    如果显示"Full ink cartridges needed",请更换满墨的墨盒。 9. **墨水软管维护**:内部墨水系统软管需要定期更换以保持打印机的最佳性能。联系惠普客服安排专业维护,以免造成打印机损坏。 10. **非HP墨盒警告**...

    tsm服务器常用命令

    - **移动磁带**:使用`control`菜单中的`Move Cartridges`选项,可以选择源类型(如I/O站或磁带机)和目标类型来移动磁带。 3. **锁定/解锁磁带盒**:通过`control`菜单选择`Magazine`,然后选择`left`或`right`来...

    wso2 esb user guide

    WSO2 ESB支持扩展,可以通过编写Mediators(调解器)和Cartridges(扩展包)来增加自定义功能。 ### 12. 高可用性与集群 为了提高可用性和容错性,WSO2 ESB支持集群部署,允许多个实例共享状态并分发负载。 ### 13...

    silex-mongodb-parks:包含 MongoDB 空间查询和国家公园数据的示例 PHP Silex 应用程序

    https://openshift.redhat.com/app/console/application_type/custom?cartridges[]=php-5.4&cartridges[]=mongodb-2&initial_git_url=https://github.com/openshift-quickstart/silex-mongodb-par

Global site tag (gtag.js) - Google Analytics