Sunday, November 24, 2013

Hybris commerce suite - Insight

Recently started exploring Hybris commerce suite 5.0.4 and have some of the interesting facts to share. So let’s start with basics.

What is [y] Hybris ?
Hybris is one of the upcoming agile and comprehensive commerce suite. Hybris platform is simple and based on open standards like Spring, ZK, SOLR/Lucene, ANT, Groovy, Apache Commons. The hybris commerce suite is engineered for expansion, extension and scale.

How’s the [y] Hybris architecture ?
From business standpoint 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.

From a technical point of view, packages consist of individual modules (aka extensions).
Extensions written by hybris provide standardized functionality and are supported and maintained by hybris.


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.


















What are the key Hybris commerce capabilities and features which comes out of the box  ?

General Storefront Capabilities - Language selection , Country selection , Currency selection , SEO frienddly URLs
Product Search - Solr-based product search with Keyword Search , Keyword Autocomplete , Spelling suggestions , Faceted browsing and more
Merchandising
Personalization and Promotion
Catalog Navigation
Product Display
Cart
Checkout
Hosted Payment
Customer Account
Store Location
Content Management
Data Import / Export
Google Local / Google Shopping
Content Pages and Templates
Organization Management
Jirafe Customer Intelligence
Google Analytics
Quote Negotiation
Order Approval
Order Management (OMS)
Store Locator
Device Detection

Lets dig deeper into some of the other concepts which is essential to know –

Hybris Cockpit framework –
The hybris Cockpit framework offers a large number of highly configurable components which can be used to build a new cockpit for your customers needs, such as for example workflow and comments.

The hybris Cockpit framework is the foundation for all hybris Cockpits. It offers a large number of highly configurable components, which can be used to build a Graphical User Interface (GUI) to support high-level business use cases, allowing users to perform all their common tasks quickly and intuitively. The hybris Cockpit framework complements the functionality offered by the hMC, which provides lower-level control over all the data in the hybris system.

The hybris Cockpit framework is based on ZK, a rich internet application (RIA) framework that enables desktop-like GUIs within a web browser. The ZK Framework is also well supported by Spring. ZK delivers a rich set of user interface (UI) components, making it easy and quick for developers to deliver a rich front end experience.

The major features of the hybris Cockpit framework include:
  • Security infrastructure based on Spring security
  • Ready to use front end template
  • Base configuration as a starting point for new applications, based on Spring
  • Reusable front end components in addition to existing ZK components
  • Generic abstraction of persisted items in the front end layer via the Type Service
  • GenericSearch providers
  • Highly customizable front end
  • Automatically stored user interface configuration at application run time
  • Drag and drop functionality
Here’s the key Hybris cockpits listed with brief description -

Hybris Administration Console -  The hybris Administration Console is an administration Web page provided by the hac extension. It provides functionality for administration, monitoring, and configuration of the hybris Commerce Suite.
Hybris Management Console (hMC) - hMC is the administration tool of the hybris Commerce Suite. As part of the hybris Commerce Suite, it runs in web browsers. Using the hMC, you can manage business objects of the hybris Commerce Suite such as products, customer data, orders.

Product Cockpit - The hybris Product Cockpit enables organizations to manage and structure product information and catalogs in high-volume and collaborative environments. Product managers can visualize their input from multiple perspectives and make product management processes more efficient

WCMS Cockpit - The hybris WCMS Cockpit enables you to manage data of a website. For efficient management of information on your online shop, you can use both the catalog perspective and live edit perspective. Each of them provides you with different ways of data management.
In the hybris WCMS Cockpit you can easily do the following:
·         Create and update website pages and content components
·         Check and change website pages status
·         Synchronize catalog versions of your website
·         Create collections of chosen pages
·         Search for website pages, according to advanced criteria

Admin Cockpit - At present, the hybris Administration Cockpit is used for the manipulation of: Data Validation constraints and Instances of types

Customer service Cockpit - The hybris Customer Service Cockpit enables you to quickly and efficiently manage the customer and orders in the call-center environment. 

Report Cockpit - The hybris Reporting Module adds Report Cockpit in which users can create and manage personal Dashboard containing rich graphical report widgets.

Print Cockpit - The hybris Print Cockpit enables you to create the publication structure and to manage the publication data for in an intuitive and user-friendly way. Linked with Adobe InDesign, it is a unique and powerful application.

Lets take closer look at some technical bits –

Adding a new page in Hybris –
  • Create a new page using the cmscockpit and with the available templates(we can also create new templates using the hmc as per the requirement).
  • Add components to the content slots available
  • Create a controller to handle the user requests for the newly created page.
  • Get the request mapping from the request, perform the business logic and return the model and view

Adding a new component in Hybris –
  • Create own item in items.xml file as below
            jaloclass="de.hybris.platform.endeca.jalo.cms2.components.OurComponent">
           //necessary attributes go here.....
  •  Create a new controller OurComponentController.java
      Note: The name of controller is important and should be created as follows: Component Type +"Controller" (in       our case OurComponentController). Beside that we also have to create a representation of our component           ourComponent.jsp

      All the controllers  are defined the way we define beans in Spring MVC in the spring-servlet.xml file as                 mentioned below
  •  Perform the business logic and return the model and view.


Creating new extensions --
The hybris Commerce Suite comes with an extension generator system called extgen located in the ${HYBRIS_BIN_DIR}/platform/extgen/ directory. Using extgen, you can create new extensions based on extension templates.

The hybris Commerce Suite comes with the following extensions, which you can use as a template for new extensions:

yempty
ycockpit
yaddon
ybackoffice
yacceleratorstorefront
yacceleratortest
ycommercewebservices
yinstoreinitialdata
yacceleratorcore
yacceleratorfacades
yacceleratorinitialdata

Extgen prompts you to specify:
  • The extension's name.
  • The extension's Java package.
  • The extension template to use.
After you have provided the prompted values, extgen does the following:
  1. Copying the extension template to a temporary directory.
  2. Modifying the extension template to reflect the specified values.
  3. Copying the new extension from the temporary directory to the directory specified by  the extgen.extension.path property in the project.properties file.
To create a new extension we follow following steps -
  1. Optionally: Modify default values for the extension generation process.
  2. Create a new extension.
  3. Reference the new extension in localextensions.xml file.
  4. Rebuild the hybris Commerce Suite.
  5. Update the hybris Commerce Suite.
Afterwords, you can start implementing your business logic in the new extension.

How to get started with Hybris ?
Best to register at https://wiki.hybris.com and get started. As of now they only allow certain partner companies to register so please check with your organization.
Once you registered at their wiki then you can access the product documentation.

I would highly recommend doing the Hybris core and commerce Trails. They are logically sequenced and it helps to understand overall product features and capabilities. Make sure you are good with Spring framework fundamentals , Annotations and ant commands.



Final thoughts ... No deny that Hybris has put great efforts to bring a light weight agile commerce framework which seems very promising. Best part is it cuts lot of development time to build some of the common features in a commerce site in no time, Their modular approach and open stack also gives you enough choice to pick and chose as per your need. It will be interesting to see how their future releases fair. I am yet to see how it scales and perform in a high volume and high transaction environments.

No comments:

Popular Posts