Professional Documents
Culture Documents
Hybris Documentation
Hybris Documentation
https://wiki.hybris.com/display/release5/Release+5+Documentation+Home
Single Channel
A single channel can be a unique communication channel, which is for information only, or a unique
commerce channel through which goods, services, and information flow from vendor (or
manufacturer, distributor) to consumer (or business customer, dealer, distributor). Such a
transactional commerce channel, can be online (web site, electronic catalog) or offline (store, printed
material). hybris provides tools like for feeding information into channels and other tools for
implementing the channels themselves, for example a web shop, a mobile shop, a print catalog, or an
electronic catalog.
Multi Channel
Multi channel is the concept of offering not just one communication or commerce channel to your
consumers (or business customers, dealers) but multiple. In order to ensure consistent information
like product information, pricing, or promotions in all channels, a single source of truth of product data
is mandatory. This is achieved by a Product Information Management System (PIM) that tightly
integrates with channel specific applications. The hybris Commerce Suite with its strong
PIM component enables you to centrally manage product data. In addition, you easily can add
channels like e-catalogs, Point of Sales (POS) kiosk systems, mobile web shops, or call center
applications extending the options of hybris Commerce and hybris Print.
Figure: Schema of the hybris Commerce Suite. The input channels are on the left, the output
channels on the right.
Cross Channel
Based on a consistent multi channel infrastructure, companies can start guiding customers pro-
actively from one channel to the other by means of loyalty programs, store events, vouchers, gift
cards, special channel specific promotions, and more. If a consistent multi channel infrastructure is
not in place this would only confuse customers, due to disparate and often conflicting product
information, availability, and pricing information.
Figure: Cross-channel campaigns require consistent information not only about products but also
about promotions.
Customers tend to use all channels simultaneously. For example, having the printed catalog on their
desk, a customer orders a product via web shop, that is picked up and paid for in a local retail shop.
Such a cross-channel approach supports and reinforces the natural behavior of customers and
consumers.
Figure: Cross-channel hopping customers tend to use use different channels (symbolized by
horizontal layers) for stimulation, information, and purchase.
Based on the hybris Commerce Suite you can orchestrate your complementary or channel specific
marketing activities, and thus leverage your business across all distribution channels.
Figure: A sample gift voucher loaded online but valid in both online and offline channels.
Directory Structure
The directory structure of the hybris Commerce Suite has a clear distinction between binary files
stored in bin directory and the other files like:
The advantage of having the binaries directory separated from the rest of the directories is that you
can easily integrate updates of the hybris Commerce Suite. Your customized configuration files will
not be modified by the update process.
Figure: Main directory structure of the hybris Commerce Suite.
Extension Packaging
An extension can be a part of multiple modules. To ensure that each extension exists only once, but
may be used by multiple modules, we group the extensions developed by hybris in the following
directories in the /bin directory:
ext-accelerator
ext-addon
ext-channel
ext-commerce
ext-content
ext-data
ext-platform
ext-platform-optional
ext-template
platform
Easier Development
One of the benefits of this horizontal directory structure is the fact that it is easier for developers to
work with the hybris system. Each extension is a separate Eclipse project with correctly configured
dependencies, and can be opened as needed in your IDE.
Technical Aspects
The bin directory and its subdirectories do not contain any customizable configuration data. Never
change anything within this directory. During the update processes the/bin directory and its
subdirectories may be completely replaced with newer version of hybris software.
/log It contains log files from the hybris Server, JDBC ${HYBRIS_LOG_DI
logging, and so on. R}
Directory Description Environment
Variable
For details
see hybris
Environment
Variables.
/temp It contains temporary files. ${HYBRIS_TEMP_
DIR}
By factory default, all these variables point to a directory two levels above the platform directory
plus the respective subpath. For example, if the hybris Platform is located at
C:\hybris\bin\platform, then HYBRIS_TEMP_DIR points to C:\hybris\temp\hybris by
factory default.
Platform
hybris Commerce Suite is based on a flexible modular concept that allows adding
functionality through extensions. The hybris Platform consists of a standard set of extensions
providing the main functionality of a hybris installation. An extension is a group of functions
representing a subset of the hybris Commerce Suite. An extension can contain business logic,
type definitions, a Web application, and many others. Below you can find a summary of
every hybris Platform functionality.
Architecture Overview
The hybris Commerce Suite is highly flexible and modular software. The flexibility comes
from several layers of abstraction and functionality.
Basic Architecture
From a business point of view, the hybris Commerce Suite is divided into individual packages, such
as Commerce, Content, Channel and Orders. These packages are bundles of functionality assembled
for a certain range of business functionality. All of these packages rely on more basic functionality
provided by the hybris Platform. While the hybris Platform can run without any package, no package
can run without the hybris Platform.
From a more technical point of view, packages consist of individual modules (also referred to
as extensions). For example, the hybris Print technically consists of two extensions:Print (the
technical foundation) and Print Cockpit (the graphical user interface).
Extensions are written by hybris or the implementation partner of your project. Extensions written by
hybris provide standardized functionality and are supported and maintained by hybris. If you write an
extension, you need to maintain them by yourself but you are free to implement any business
functionality you need. A full hybris Commerce Suite installation therefore consists of the hybris
Platform plus any hybris packages plus any additional extensions that you have implemented.
Extensions which are part of hybris Platform proper are also referred to as the core extensions. On
top of these core extensions, hybris Platform contains several pieces of hybris software, such as
the Build Framework, and third-party software, such as the pre-bundled Apache Tomcat.
hybris Commerce Suite is run in a Java Virtual Machine on a Servlet Container or a J2EE-compliant
application server (such as IBM Websphere or Oracle WebLogic) and connects to an external
database (MySQL, Oracle DB, Microsoft SQL Server). Internal caching and persistence mechanisms
allow the hybris Commerce Suite to run on a Servlet Container. A full-fledged J2EE-compliant
application server can be used, but is not necessary.
Figure: A technical view on the basic architecture of a hybris Commerce Suite installation.
The hybris Platform layer abstracts data from the storage structure on the database using the
persistence framework and provides functionality such as Clustering and the hybris Platform Cache.
Relying on the persistence framework, the other functional components of the Platform Layer provide
basic business functionality: Transactions, CronJobs,Personalization, Internationalization, and more.
The packages on the Functional Layer (hybris Commerce, hybris PIM, hybris Print) use the hybris
Platform to implement the functions they deliver. Actually, hybris Platform is part of any hybris
Package.
Layer Architecture
The hybris Commerce Suite contains several layers, each of which has a different function and data
abstraction level.
Figure: Overview of the architectural layers of the hybris Commerce Suite.
Layer Name Description What would a Product look like
on this Layer?
</attributes>
Layer Name Description What would a Product look like
on this Layer?
</itemtype>
Modes of Operation
You can run the hybris Commerce Suite in three different modes of operation:
Operation Schema Graphics Description
Mode
Multi-
Tenant A hybris Commerce Suite
Mode in Multi-Tenant
Mode allows using
several individual,
distinguished sets of data
separated by database
table prefixes. Multi-
Tenant Mode can be used
for Single Node and for
Cluster Mode operation.
When a product is removed, then its item data and the cached FlexibleSearch result for the above
query is removed from the cache.
Multi-Tenant Systems
The hybris Commerce Suite allows to be run in so-called Multi-Tenant Mode, in which
individual sets of data are maintained on one single hybris Commerce Suite installation. The
effect is that you can have several logical hybris Commerce Suite installations running, for
example, to host online shops for different customers on one hybris Commerce Suite.
In quite a few respects, multi-tenant systems are like having several individual hybris Commerce Suite
installations:
Note
A hybris Cluster is a concept different from multi-tenant hybris Commerce Suites. A hybris Cluster is a
number of individual, separate hybris Commerce Suites sharing one single set of data, whereas a
multi-tenant hybris Commerce Suite is one single hybris Commerce Suite using individual sets of
data. For a discussion of running a hybris Commerce Suite in clustered mode, refer to the Cluster -
Technical Guide document.
General Overview
Tenants allow customizing
By consequence, it is possible for each tenant in one single hybris Commerce Suite installation to use
a different database server, a different user account on the database, and to specify the extensions
that will be available for use.
It is not possible to use different versions of the hybris Commerce Suite - all tenants will necessarily
use the same hybris Commerce Suite version (although you will be able of specifying the extensions
available to each tenant). To run different versions of the hybris Commerce Suite, you will need to use
different hybris Commerce Suite installations.
Kinds of Tenants
There are two kinds of tenant:
This is the primary tenant of the hybris Commerce Suite. The master tenant:
– uses the database connection specified in the project.properties file and no database table
prefix.
– is created automatically.
– cannot be removed. Even on a non-multi-tenant hybris Commerce Suite, the master tenant will be
available.
slave tenants
db.tableprefix=junit_
alt.datasource.ALT1.foo=bar
alt.datasource.ALT2.foo=bar
slave.datasource.A.foo=bar
slave.datasource.B.foo=bar
slave.datasource.C.foo=bar
hmc.webroot=/hmc_junit
hac.webroot=/hac_junit
The database prefix can be configured using the local_tenant_junit.properties:
db.tableprefix=myjunit_
The fact that individual tenant data sets are isolated also means that using another tenant's data is
only possible by using exactly the same database connection. Consequently, you will need to do an
initialization on every individual tenant. Initializing the master tenant does not allow any of the slave
tenant to use the master tenant's data.
ServiceLayer
The hybris ServiceLayer is an API to develop with and for the hybris Commerce Suite.
The main characteristics of the ServiceLayer are:
Figure: Overview of the integration of the hybris ServiceLayer. For a discussion of the
components, please refer to ServiceLayer Architecture.
The ServiceLayer aims to be:
Consistent
Easily approachable
Comprehensive
Adaptable
Extensible
Flexible
ServiceLayer Architecture
The ServiceLayer uses a variety of different architecture concepts. Some of these are
optional, others are mandatory.
Structure Overview
The ServiceLayer can be described as a layer of services on top of the persistence layer. The
services themselves can be divided into subcomponents.
Figure: The ServiceLayer (blue) interconnects the persistence layer with the client. Arrows indicate
exchange of data objects.
Architectural Components
Client
A client in this context is any software component that uses the ServiceLayer, such as:
Services
A service holds the logic to perform business processes and provides this logic through a number of
related public methods. These public methods usually are defined in a Java interface. Most often
these methods operate on the same kind of model object, for example product, order and so on.
Services are expected to abstract from the persistence layer, that is, to only contain functional logic
and no persistence-related code. That means if you implement a service, make sure to implement it in
a way that the underlying implementation is as loosely coupled to the persistence layer as possible.
Figure: Sample of relations between services. Note the pattern of having an interface and an
implementation per service.
The hybris Commerce Suite exposes all of its functionality through services. There are the following
kinds of services:
Business Services implement business use cases, such as cart handling or back order.
Infrastructure Services provide the underlying technical foundation, such as internationalization,
import, export and so on.
System services provide functionality required by the ServiceLayer, such as model handling and
session handling.
Strategies
A service may delegate parts of its tasks to smaller micro-services, called strategies. The service then
serves as a kind of facade to the strategies. Clients still use the service and its stable API. But under
the hood the functionality is split into multiple parts. Because these parts are smaller and very focused
to their task, it is easier to adapt or replace them. Strategies therefore help to further encapsulate
behaviour and make it more adaptable.
Figure: Sample of a service (consisting of an interface definition and the related implementation)
relying on strategies. Note how the strategies also follow the pattern of interface definition and related
implementation.
DAOs
A DAO (Data Access Object) is an interface to the storage back end system. DAOs store and retrieve
objects. You use DAOs to save, remove, and find models.
DAOs are the place to put SQL or FlexibleSearch statements and nowhere else. This is to ensure
further decoupling from the underlying storage facility.
DAOs interact with services via models and with the database via FlexibleSearch and SQL
statements.
Icon
In the hybris Commerce Suite, DAOs use the hybris Type System for persistence. This means that
hybris Commerce Suite DAOs do not implement any individual logic and simply call the underlying
persistence layer.
Models
Models are a new way to represent hybris items. Each model contains all item attributes from all
extensions thus unifying access to an item's data. Models are generated from the type system of the
hybris Commerce Suite; see Type System Documentation. Furthermore they are more or less simple
POJOs (Plain Old Java Objects) that can be used without any storage facility. Thus, it's pretty easy to
mock them up, for example for testing and debugging.
Models are used by DAOs, services, strategies, converters, and facades.
Installation Guide
Added by Arnold Späing | hybris, last edited by Mateusz Wiktor | hybris on 02.09.2013 CEST (view change)
show comment
This document is a comprehensive guide on installing the hybris Commerce Suite. Inside you
can find the following information:
hybris Server
The hybris Commerce Suite comes with a preconfigured and highly optimized server based on
Apache Tomcat for development and production.
To deploy new versions of the hybris software, you can simply replace the entire hybris Server with a
newer version.
You can use proven standards (Tomcat) but get professional support, documentation and know-how
from hybris
Very fast deployment cycles
Simplified hosting
Setup and configuration process is exactly the same on development machines and production
environments.
The hybris Commerce Suite does not need extended JEE features like EJB or JMS. The complete
hybris stack is very lightweight and only needs a Servlet 2.5 compliant web server. The hybris
Commerce Suite does not need a JEE compliant application server. For executing background tasks
like CronJobs or administration tasks, you can even run the hybris Commerce Suite as a standalone
Java application – completely without any application server or web server.
With various enhancements like automatic updating functionality, a refurbished directory layout and a
completely preconfigured and optimized Server based on standard Apache Tomcat technology, hybris
dramatically simplifies the deployment of productive systems. hybris fully supports virtualized
environments and helps you by providing preconfigured virtual images for development and
production to further reducing the effort of installing and updating the hybris Software.
Development:
You run the hybris Server on the same machine on which you develop. An explicit deployment is not
necessary.
Production use:
The hybris Server is run on a machine different from the one on which you develop. Usually, some
sort of deployment process is used.
Development Operation
Basically, the setup procedure is the same for both development and production scenario. Refer to
the Local Installations document for details on installing the hybris Commerce Suite.
During the first hybris Commerce Suite build, select the develop configuration template.
After that, you can develop your extension(s). To "deploy" modified extensions or configuration,
simply restart the hybris Server. During restart, the modified extensions and configuration will be
loaded automatically.
Production Operation
Production operation differs from development mainly in the fact that you will want to deploy the
hybris Commerce Suite on a remote server.
During the first hybris Commerce Suite build, select the production configuration template.
Installation
Basically, the setup procedure is the same for both development and production scenario. Refer to
the Local Installations document for details on installing the hybris Commerce Suite.
Deployment
Deployment takes place in these phases:
Security Patching
You might want to update your system to a more secure Apache Tomcat installation.The reason for
that could be that a certain AJP protocol connector implementations in Apache Tomcat (6.0.0 through
6.0.33, 5.5.0 through 5.5.33, and possibly other versions) allow remote attackers to spoof AJP
requests, bypass authentication, and obtain sensitive information by causing the connector to
interpret a request body as a new request. More information on security issues you may find on pages
linked in See Also panel.
To patch the hybris Server you need to:
1. Download the tomcat-coyote.jar file from Apache Tomcat 6.0.35. It can be obtained from the
official Apache package within the tomcat-6/lib folder.
Tomcat-specific properties
hybris Commerce Suite specific properties
Log4J-specific properties
The process of how these properties are loaded and take effect have similiarites and differences:
All kinds of properties are defined (or overridden) in the local.properties Configuring the
Behavior of the hybris Commerce Suite file.
All kinds of properties are loaded on the hybris Server start-up from the file system.
Tomcat-specific properties are written to a Tomcat configuration file during the hybris Commerce
Suite build, while the hybris Commerce Suite specific properties and Log4J-specific properties are not
written to any other file.
Although the Tomcat-specific properties will be available by hybris Commerce Suite runtime and can
be read and set, modifying these values will have no effect: by the time you could set the values "from
inside", the Java Virtual Machine is already running.
The aspect that properties are read in during the hybris Server start-up means that you will not have
to re-build the hybris Commerce Suite after you have made the hybris Commerce Suite specific
changes to the local.properties file. Instead, restarting the hybris Server will do; the hybris
Server will pick up the modifications on restart. If you have modified Tomcat-specific properties in
the local.properties file, you will have to call ant deploy for the changes to take effect.
Tomcat-Specific Properties
The following table contains a list of all configuration properties specific to the hybris Server's Apache
Tomcat in the project.properties file of the hybris Commerce Suite. You can override the
factory default values via the local.properties Configuring the Behavior of the hybris Commerce
Suite file.
Property name Property description
tomcat.http.port Specifies the port that allows access to the hybris Suite via an
unsecured connection.
tomcat.ssl.port Specifies the port that allows access to the hybris Suite via an
SSL-secured connection.
tomcat.jmx.port Specifies the port that allows access to the hybris Suite via
JMX.
tomcat.javaoptions Java runtime options for the hybris Server in normal operation
mode (hybrisserver.bat / hybrisserver.sh)
tomcat.debugjavaoptions Java runtime options for the hybris Server in debug mode
(hybrisserver.bat debug / hybrisserver.sh
debug)
tomcat.generaloptions Java runtime options for the hybris Server used in both the
normal operation mode and debug mode.
Log4J-Specific Properties
Although a subset of the hybris Commerce Suite specific properties, Log4J-related properties are
handled in a special way. Log4J-related settings are loaded prior to the hybris Commerce Suite
specific properties, but are not written to any persistent file (as is the case with Tomcat-specific
properties).
You can override the factory default values via the local.properties Configuring the Behavior of
the hybris Commerce Suite file.
Projects
Attachments:1
Added by Thomas Hertz | hybris, last edited by Karolina Bargiela | hybris on 28.06.2013 CEST (view change)
show comment
Consult project-related information and benefit from our documented experiences in various
projects. Consult the projects pages in order to prepare and support your project.
See Also
Home of Release 5
Basics
How To Set up the hybris Commerce Suite as an Eclipse Project - Tutorial
Project Tips and Pitfalls - Best Practices
Configuring User Roles in the hMC - Best Practices
Import
ImpEx Import - Best Practices
How To Import from Multiple Data Sources - Tutorial
Extract, Transform, and Load (ETL) Tools
Migration
hybris Migration Guide
Testing
Testing in the hybris Commerce Suite
Selenium
JMeter Quick Start