Roles

Application Developer

AEM Integrator

AEM Developer

AEM Author

How to integrate an web application

Preparation - Global Config

OSGi Config:

Step One: Integration Manager

The Integration Manager creates an OSGi Config for each application. Each config contains:

id=myapp

## URL to application.properties file
url=http://localhost:8080/myapp/application.properites


snippet-extractor=default|custom
+ validators
snippet-validator
mime-type validators: js, css, img





context-providers=sling,aem,myproject




## Type of cache
cache-provider-id=default|no-cache





# Properties 
default-properties=

Advanced topics:

Step Two: Application Developer

Creates application.properties file with:

html=/myapp/{lang}/my-app.html
dialog=/myapp/dialog.xml

Variables can come from 3 sources:

Application developer: dialog.xml

Context Provider

(OSGi Service, resource in → context out)

get the context from AEM with a special selector

Story 1: Basic web-application

AEM Author → Web Developer: Could you create for me?

AEM Author ← Web Developer: Here it is. Everything is in the ZIP-File.

index.html
js/myapp.js
css/myapp.css

AEM Author → AEM Developer: Can you integrate this?

NO!!!!

Put it on a web-server:

App Integration Manager

— alternative —

–> generates apps entries (components) (should be exported to GIT, and deployed afterward) –> req: sync and out-of-sync messages (status: synced, not-synced)

console.log("Hello World");

How is the HTML snippet choosen?

html extract -> so the app is usable

How to provide static and dynamic resources

cache manifest static resources are mapped /ext// dynamic resource are optionally proxied (e.g. for dev environments)

url rewriting,

resource mapping

best develop with context /ext//, so no

How does it get updated

regular updates - every hour (configurable) version check: an file with changes version file: eg. cache manifest with version key or timestamp (higher freq.)

update and cache headers

other cache headers are ignored

wcmmode Edit vs Publish

generation of apache config

export apache config (e.g. mod_proxy)

Story 2: Context Information

parameter –> xxx dialog settings context information

AEM Developer: Context Provider

Story 3: Content to App Integration

inplace content

Story 3: Advanced Application- and API- Management

Validation Examples

App doesnt’ uses certain static resources

CSS does not conflict with global settings

JS does not conflict with GLOBAL namespace