Adobe AEM介绍,技术栈,技术架构和学习文档

AEM技术架构 

Adobe AEM介绍,技术栈,技术架构和学习文档_第1张图片

Editable and Static Templates

AEM now offers two basic types of templates:

  • Editable Templates

    • Can be created and edited by template authors using the Template console and editor. The Template console is accessible in the General section of the Tools console.
    • After the new page is created a dynamic connection is maintained between the page and the template. This means that changes to the template structure and/or locked content will be reflected on any pages created with that template. Changes to the unlocked (i.e. initial) content will not be reflected.
    • Use content policies, which you can define these from the template editor, to persist the design properties. Design mode within the page editor is no longer used for editable templates.
  • Static Templates
    • Static templates have been available for several versions of AEM.
    • They are provided by your developers, so they cannot be created or edited by authors.
    • Are copied to create the new page, but no dynamic connection exists after this (though the template name is registered for information).
    • Use Design Mode to persist design properties.
    • Because editing static templates is the exclusive task of a developer, please see the developer document Page Templates - Static for more information.

By definition, the template console and template editor only allow creation and editing of editable templates. Therefore this document focuses exclusively on editable templates.

 

相关资料

Adobe 官方教程入口 

https://helpx.adobe.com/support/experience-manager/6-3.html

Adobe 官方视频教程入口

 https://helpx.adobe.com/experience-manager/kt/index/aem-6-3-videos.html

Adobe 官方实例教程入口

教你一步一步的开发AEM,很实用 附带官方实例源码 https://github.com/Adobe-Marketing-Cloud/aem-guides-wknd

Adobe官方aem-project-archetype 

mvn archetype:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=10 -DarchetypeRepository=https://repo.adobe.com/nexus/content/groups/public/

其中archetypeVersion:8-13.分别含有不同的feature

Adobe官方“怎么样实现XX”文章汇总

https://helpx.adobe.com/experience-manager/topics/how-to.html

AEM几个核心技术

Apache Sling 

官网 http://sling.apache.org/

Apache Sling :: Servlet Resolution

 https://sling.apache.org/old-stuff/servlet-resolution.html

Apache Sling :: URL decomposition

 http://sling.apache.org/documentation/the-sling-engine/url-decomposition.html

Apache Sling :: HTL Scripting

 https://sling.apache.org/documentation/bundles/scripting/scripting-htl.html

Apache Sling :: Sling Models

 https://sling.apache.org/documentation/bundles/models.html#specifying-an-alternate-adapter-class-since-110

java JCR & Apache Jackrabbit

Java JSR-170(JCR) 

JCR规范下载http://download.oracle.com/otndocs/jcp/content_repository-1.0.1-mr-oth-JSpec/index.html

Jackrabbit

依据JCR规范的一个JCR实现类库 http://jackrabbit.apache.org/jcr/jackrabbit-architecture.html

Apache Felix

一个OSGI实现 官网 http://felix.apache.org/

HTL

HTML Template Language (HTL)是AEM所推荐使用的服务器端动态HTML模板语言

HTL 语法详解

 https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/master/SPECIFICATION.md#221-use

HTL Adobe 官方教程

 https://helpx.adobe.com/experience-manager/htl/using/getting-started.html

AEM Dev Tools For Eclipse 

https://eclipse.adobe.com/aem/dev-tools/

Repo Tool integration-into-intellij

 https://github.com/Adobe-Marketing-Cloud/tools/tree/master/repo#integration-into-intellij

Maven settings 

http://helpx.adobe.com/experience-manager/kb/SetUpTheAdobeMavenRepository.html

运行时加上 -Padobe-public

 

i18n的使用

    1.     /etc/languages 下定义全局语言例如:sc_cn, zh_tw

    2. 代码合适位置,创建自己的i18n定义文件,例如/apps/ns-zh/i18n/zh.json,文件的node属性中包含jcr:language=sc_cn,jcr:mixinTypes=mix:language

    3. 创建语言分类页面,例如sc_cn.html,在其jcr:content中添加jcr:language=sc_cn

    4.在组件的HTML中使用  ${'check-address' @i18n}

    5.在JS中使用,先全局定义

先引入这个category的JS:granite.utils
Granite.I18n.setLocale('sc_cn');
    6.然后在自己的JS中Granite.I18n.get('upload-time');获取


访问http://localhost:4502/libs/cq/i18n/translator.html 路径在线编辑i18n

 

 

AEM分步学习

Part 1 Project Setup 

https://helpx.adobe.com/experience-manager/kt/sites/using/getting-started-wknd-tutorial-develop/part1.html

Part 2 Creating a Base Page and Template 

https://helpx.adobe.com/experience-manager/kt/sites/using/getting-started-wknd-tutorial-develop/part2.html

Part 3 Client-Side Libraries and Responsive Grid 

https://helpx.adobe.com/experience-manager/kt/sites/using/getting-started-wknd-tutorial-develop/part3.html

Part 4 Developing with the Style System

 https://helpx.adobe.com/experience-manager/kt/sites/using/getting-started-wknd-tutorial-develop/part4.html

Part 5 Navigation and Search 

https://helpx.adobe.com/experience-manager/kt/sites/using/getting-started-wknd-tutorial-develop/part5.html

Part 6 Sling Models and Card Component 

https://helpx.adobe.com/experience-manager/kt/sites/using/getting-started-wknd-tutorial-develop/part6.html

 

AEM核心概念(Core Concepts)

Author instance

Typically, for security, governance, and other reasons, a production site will divide instances of AEM into Author and Publish instances. For more information on deployment architecture (including Author/Publish instances), see documentation about AEM Instances.

Caching, frying, and baking

Traditionally, the concepts of baking versus frying are an important distinction between different Web Content Management Systems.  In CMS jargon, "baking" refers to the concept of committing data to static files at publish-time, while "frying" refers to the concept of processing data for final presentation at request-time (i.e., just in time).

Clustering and load-balancing

To increase availability and imrpove the performance of a Production environment, it is common to combine multiple Author and/or Publish instances (into Clusters), by either making them available to different groups of users or by load-balancing them behind a Dispatcher configuration.

It is also possible to combine multiple instances of the content repository to create a high-availability JCR solution, which can then be integrated with your AEM solution to maximize protection against hardware and software failure. See Recommended Deployments for further information. 

Component

In AEM, a Component is an object type, instances of which can generally be created by dragging and dropping them from, say, the Sidekick. So for example, out-of-the-box components that ship with AEM include the Text, Title, Tag Cloud, Carousel, Image, and List components, all available from the Sidekick at runtime.

Content Finder

In authoring mode, the Content Finder is a special panel (frame) on the left-hand side of the page that, depending on the tab you select at the top, displays lists of images, documents, Flash assets, pages, paragraphs, or repository resources that you can drag and drop from the Content Finder into the page you're working on (on the right).

Digital assets

In AEM, Digital Assets are (typically) images and rich media files. For further information, see Working with Digital Assets in DAM.

Dispatcher

The Dispatcher is both a caching and load-balancing tool, as well as providing certain security safeguards.

JCR, Java Content Repository

The Java Content Repository specification (JSR-283) provides both an abstract data model and an Application Programming Interface for realizing a massively scalable NoSQL data repository that combines features of a file system and an object database. While you do not need to understand JSR-283 in exhaustive detail, you should take time to familiarize yourself with the basic capabilities of JCR and the data model underlying it, because JCR is what makes possible the "everything is content" philosophy of AEM.

In essence, JCR is a system of nodes and properties, in which nodes can inherit from other nodes and all content is stored as property values. Note that in addition to ordinary inheritance, JCR allows for a concept of "mixin" nodes, which enables modelling of multiple inheritance.

JCR has a number of predefined node types and property types, but in general the typing system is quite flexible, and (indeed) one of the strengths of JCR is that it allows structured as well as unstructured content to be stored/managed with equal ease. That is, JCR can accommodate highly structured data, but it can also accommodate arbitrary dynamic data structures without schema constraints.

The JavaDoc for JCR's Java API is here.

Before attempting to read the JavaDoc or the JCR spec itself, you might want to look at this high-level explanation of JCR as implemented by Adobe Experience Services.

Multi-Site Manager (MSM)

The MSM feature of AEM helps customers handle multilingual and multinational content, enabling them to balance centralized branding with localized content.

OSGi

OSGi is the services-based runtime technology that provides the basis for modularized Java development in AEM. It is a framework that provides not only a highly dynamic (and secure) classloading and execution environment for code resources (known as bundles), but also full control over the visibility and lifecycle of the various services exposed by bundles. A service registry provides a cooperation model for bundles that takes lifecycle dynamics (and version requirements) into account. OSGi solves many of the problems that application servers were intended to solve, but does so in a lightweight, highly dynamic way, making it possible, for example, to hot-deploy services (making the new code immediately available without restarting the server).

Parsys, Paragraph System

The paragraph system (parsys) is a compound component that allows authors to add components of different types to a page and contains other paragraph components. Each paragraph type is represented as a component. The paragraph system itself is also a component, which contains the other paragraph components.

Microkernel

Every workspace in the repository can be separately configured to store its data through a specific microkernel (a class that manages the reading and writing of the data). Similarly, the repository-wide version store can also be independently configured to use a particular microkernel. A number of different microkernels are available, capable of storing data in a variety of file formats or relational databases. (For example, there are persistence managers for MongoDB, DB2 or Oracle) The default microkernel for AEM is TarMK (see further below).

Publish instance

For security, governance, and other reasons, a production site will typically divide instances of AEM into Author and Publish instances. For more information on deployment architecture (including Author/Publish instances), see documentation about AEM Instances.

Quickstart

Unlike many other programs, you install AEM by using a single "Quickstart" self-extracting JAR file. When you double-click the JAR file for the first time, everything you need is automatically installed. The quickstart JAR includes all files required for the CRX repository (including administrative facilities), virtual repository services, index and search services, workflow services, security, and a Web server, plus the CQ Servlet Engine (CQSE) and all AEM services. There are no other files to install: the Quickstart is self-contained.

The first time you start the Quickstart, it creates an entire JCR-compliant repository in the background, which can take several minutes. After this initial startup, subsequent startups are much quicker as the repository infrastructure has already been laid down.

Many startup options (such as the active port number and whether the AEM instance in question should be a Publish instance versus an Author instance; and much more) can be controlled by appropriately renaming the Quickstart file. To see a list of options in this regard, run the JAR with "-help" on the command line:

java -jar .jar –help

Replication agents

Replication agents are central to AEM as the mechanism used to Publish (activate) content from an author to a publish environment; flush content from the Dispatcher cache; return user generated content (for example, form input) from the Publish environment to the Author environment.

Scaffolding

With scaffolding you can create a form (a scaffold) with fields that reflect the structure you want for your pages and then use this form to easily create pages based on this structure.

Segmentation

Site visitors have different interests and objectives when they come to a site. Understanding visitors' goals and fulfilling their expectations is an important success prerequisite for online marketing. Segmentation helps to achieve this by analyzing and characterizing a visitor's details.

Sidekick

The Sidekick is a palette-like floating window that appears on the editable page, from which new components can be dragged and actions that apply to the page can be executed.

Site Catalyst

SiteCatalyst provides marketers with one place to measure, analyze, and optimize integrated data from all online initiatives across multiple marketing channels. You can use Adobe SiteCatalyst to analyze data from AEM websites.

Tar Storage (TarMK)

TarMK is the default persistence system in AEM. Although AEM can be configured to use a different persistence system (such as MongoDB), TarMK has certain advantages in that it is performance-optimized for typical JCR use-cases (thus is very fast), uses an industry-standard data format, and can be quickly and easily backed up. Read more here.

Template

In AEM, a Template specifies a particular type of page. It defines the structure of a page (while also typically specifying a thumbnail image, and various properties). For example, you may have separate templates for product pages, sitemaps, and contact information.

 

Workflow

The AEM Workflow system allows for creation of automated processes involving pages or assets.

 

其他术语

 

AEM

Adobe Experience Manager, a web content management system from Adobe built on top of Sling

Apache

Apache HTTP Server, a general-purpose web server

Apache Sling

Content-driven framework for building web applications in Java

Atomic broadcast

Broadcast primitive in distributed systems that requires that all nodes receive broadcast messages reliably and in the same order

Big flip

Approach to updating distributed systems where a cluster of nodes is updated one half at a time, such that the two halves are not online concurrently during updates

Bundle

A JAR package specifically adapted to be deployed to an OSGi framework

Component

A functional module in OSGi

Config

In this thesis, a particular version of a Sling application

Content repository

Abstract data store defined by JCR that Sling uses as the data tier

Crank file

A file defining an OSGi application that can be started by Crankstart

Crankstart

OSGi application launcher that starts and configures an OSGi framework according to commands in a crank file

Dependency hell

Situation in which the graph of dependencies of a software package includes dependencies on multiple versions of the same third-party package, which cannot be loaded into a system at the same time without proper isolation

Health check

A test in Sling with an expected result, useful for checking whether certain conditions in a running Sling instance are satisfied

Home directory

A directory on the host file system that Sling, OSGi, and JCR use for storing configuration, logs, and other bookkeeping records

HTTP endpoint

A URL under which a Sling instance can be reached

HTTP front-end

A server that maintains a pool of web servers to which it forwards incoming HTTP requests

Jackrabbit

Reference implementation of JCR, used as the default JCR implementation in Sling

JAR hell

Dependency hell specific to the Java platform

JCR

Java Content Repository, specification that defines an abstract model and a Java API for data management and storage

Launchpad

Default Sling application launcher

Minion

In this thesis, one of the Sling instances running a particular version of a Sling application

Oak

An implementation of JCR that focuses on scalability and performance

Online update

An update that satisfies two properties: atomicity and zero downtime

Orchestrator

In this thesis, application managing the continuous delivery mechanism, responsible for spawning and stopping Minions

OSGi

Set of specifications that define a dynamic component model for Java

OSGi framework

Environment, similar to a container, that hosts an OSGi application

Resource

A piece of data available to Sling

Resource resolver

A component responsible for finding (resolving) resources in Sling given their paths

RESTful

Conforming to REST (Representational State Transfer) style of HTTP requests, where requests make use of URIs and HTTP methods (GET, POST, PUT, DELETE) in a way that makes each request self-descriptive

Rolling upgrade

Approach to updating distributed systems where each node in a cluster is updated one at a time

Script

A Sling component for handling HTTP requests, similar to a servlet, programmable in languages other than Java

Service

An interface through which OSGi components communicate

Service registry

OSGi module keeping track of all available services

Servlet

A Java component for handling HTTP requests

Sling

See Apache Sling

Virtual resource

A resource in Sling that does not reside in the content repository

Workspace

An element of a JCR repository that contains a tree of data nodes, intended for being used as a branch of the repository content

ZooKeeper

Cluster coordination service that provides services that require atomic broadcast

 

常用技术点

 

  1. 在线查看AEM的log http://localhost:4502/system/console/slinglog
  2. Create AEM component by using Sling Model https://helpx.adobe.com/experience-manager/using/aem63_slingmodel.html
  3. Create AEM component by using WCMUsePojo https://helpx.adobe.com/experience-manager/using/first_htl_WCMUsePojo.html
  4. Scheduling with a cron expression https://sling.apache.org/documentation/bundles/scheduler-service-commons-scheduler.html
  5. Query Builder API https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/querybuilder-api.html
  6. SSO in AEM https://helpx.adobe.com/experience-manager/6-3/sites/deploying/using/single-sign-on.html
  7. Content Services https://helpx.adobe.com/experience-manager/6-4/mobile/using/content-services.html
  8. Developing AEM Mobile Content Services https://helpx.adobe.com/experience-manager/6-4/mobile/using/spaces-and-entities.html
  9. Getting Started with AEM Content Services https://helpx.adobe.com/experience-manager/kt/sites/using/content-services-tutorial-use.html
  10. Developing Sling Model Exporters in AEM https://helpx.adobe.com/experience-manager/kt/platform-repository/using/sling-model-exporter-tutorial-develop.html
  11. Enabling JSON Export for a Component  https://helpx.adobe.com/experience-manager/6-3/release-notes/json-exporter-dev-fp.html
  12. Scripting variables in JSP https://cwiki.apache.org/confluence/display/SLING/Scripting+variables#Scriptingvariables-Commonscriptingvariables
  13. How to Build AEM Projects using Apache Maven https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/ht-projects-maven.html
  14. 动态下拉菜单 https://www.linkedin.com/pulse/granite-datasource-inside-touch-ui-select-object-aem-gonz%C3%A1lez-ramoshttps://mkbansal.wordpress.com/2016/01/04/aem-acs-generic-list-dialog-configuration-touch-ui/https://helpx.adobe.com/experience-manager/using/creating-touchui-validate11.html
  15. Using Translator to Manage Dictionaries https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/i18n-translator.html
  16. Configuring the Rich Text Editor https://helpx.adobe.com/experience-manager/6-3/sites/administering/using/rich-text-editor.html#PluginsandtheirFeatures
  17. Components for Page Authoring https://helpx.adobe.com/experience-manager/6-2/sites/authoring/using/editmode.html#Text
  18. Understanding AEM Content Fragments https://helpx.adobe.com/experience-manager/kt/sites/using/content-fragments-feature-video-understand.html
  19. 使用Multifield https://helpx.adobe.com/experience-manager/using/multifield_aem63.html
  20. 使用SlingModel https://helpx.adobe.com/experience-manager/using/aem63_htl_repeat_slingmodel.html
  21. Creating an Adobe Experience Manager HTML Template Language component that uses the WCMUsePojo APIhttps://helpx.adobe.com/experience-manager/using/first_htl_WCMUsePojo.html
  22. SlingModel https://helpx.adobe.com/experience-manager/using/aem64_coral_resourcetypes.html
  23. 创建custom sling servlet https://helpx.adobe.com/experience-manager/using/resourcetypes.html
  24. 创建render component https://helpx.adobe.com/experience-manager/using/resourcetypes.html#h2Createarendercomponentthatusesthetemplatebrh2
  25. 创建一个Servlet service http://www.6dglobal.com/blog/servlets-sling-case-disappearing-servlet-path-2013-01-31
  26. Sling Servlet service 文档 https://sling.apache.org/documentation/the-sling-engine/servlets.html

你可能感兴趣的:(AEM)