Omni Commerce:
From Buzzword
to Technology


Jürgen Albertsen
Enterprise Architect
hybris
Commerce is Everywhere
TV
Console
Web
POS
Mobile
Call Center
Social
Print
Digital Ads
Marketplace
Mobile Native
A Few Examples
TV Mobile
+ + =
Live stream, shop as you
watch
Mobile
+ =
Want this, alert me when
near shop
Product
Produc...
We call it
Multi Channel
No, Omni Channel
No, Omni Commerce
Nice word but:
How to do it?
The solution:
Web Services
of course
The Problem:
hybris is pretty
old mature
Core Services
Core / Jalo
Over theYears We Stacked up Quite a Stack
Commerce Services
Commerce Façades
Accelerator (Web St...
Let’s Zoom In
Controller
Converter
Service
Façade
DTO
Model
Populator
A DTO
public class CartData implements Serializable {
!
private String code;
private boolean net;
private PriceData totalP...
A Descriptor for DTOs
<bean class="de.hybris.platform.commercefacades.order.CartData">
<property name="code" type="String"...
A Façade
public interface CartFacade
{
!
CartData getSessionCart();
!
CartData getMiniCart();
!
CartModificationData addTo...
A Controller for the Storefront
@Controller
public class AddToCartController extends AbstractController
{
@Resource(name =...
Spring MVC doesn’t
care if it’s HTML,
XML, JSON, 

or whatever
Another Controller — this Time for a Web Service
@Controller
public class CartController extends BaseController
{
@Resourc...
Marshal Response DTOs to XML/JSON
<!-- from springmvc-servlet.xml -->
!
<mvc:annotation-driven>
<mvc:message-converters re...
We expose 

commerce logic 

and data model 1:1
What Else?
REST-like
ETag
OAuth 2.0 & HTTPS
Template
Shipped as source
Questions?
Beer?
Upcoming SlideShare
Loading in...5
×

Occ tech for commerce

276

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
276
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Occ tech for commerce

  1. 1. Omni Commerce: From Buzzword to Technology 
 Jürgen Albertsen Enterprise Architect hybris
  2. 2. Commerce is Everywhere TV Console Web POS Mobile Call Center Social Print Digital Ads Marketplace Mobile Native
  3. 3. A Few Examples TV Mobile + + = Live stream, shop as you watch Mobile + = Want this, alert me when near shop Product Product Checkout Location POS + = Not available in store, deliver to home Product Checkout
  4. 4. We call it Multi Channel
  5. 5. No, Omni Channel
  6. 6. No, Omni Commerce
  7. 7. Nice word but: How to do it?
  8. 8. The solution: Web Services of course
  9. 9. The Problem: hybris is pretty old mature
  10. 10. Core Services Core / Jalo Over theYears We Stacked up Quite a Stack Commerce Services Commerce Façades Accelerator (Web Storefront) OCC (Web Services)
  11. 11. Let’s Zoom In Controller Converter Service Façade DTO Model Populator
  12. 12. A DTO public class CartData implements Serializable { ! private String code; private boolean net; private PriceData totalPrice; //... public String getCode() { return code; } public void setCode(String code) { this.code = code; } ! //... }
  13. 13. A Descriptor for DTOs <bean class="de.hybris.platform.commercefacades.order.CartData"> <property name="code" type="String"/> <property name="net" type="boolean"/> <property name="totalPrice" type="de.hybris.platform.commercefacades.product.PriceData"/> <!-- ... --> </bean>
  14. 14. A Façade public interface CartFacade { ! CartData getSessionCart(); ! CartData getMiniCart(); ! CartModificationData addToCart(String code, long quantity) throws CommerceCartModificationException; ! // ... ! }
  15. 15. A Controller for the Storefront @Controller public class AddToCartController extends AbstractController { @Resource(name = "cartFacade") private CartFacade cartFacade; ! @RequestMapping(value = "/cart/add", method = RequestMethod.POST) public String addToCart(@RequestParam("productCodePost") String code, Model model, @Valid AddToCartForm form, BindingResult bindingErrors) { // ... CartModificationData cartModification = cartFacade.addToCart(code, qty); if (cartModification.getQuantityAdded() == 0L) { model.addAttribute(ERROR_MSG_TYPE, "basket.information.quantity.noItemsAdded." + cartModification.getStatusCode()); } else if (cartModification.getQuantityAdded() < qty) { model.addAttribute(ERROR_MSG_TYPE, "basket.information.quantity.reducedNumberOfItemsAdded." + cartModification.getStatusCode()); } // .. } }
  16. 16. Spring MVC doesn’t care if it’s HTML, XML, JSON, 
 or whatever
  17. 17. Another Controller — this Time for a Web Service @Controller public class CartController extends BaseController { @Resource(name = "cartFacade") private CartFacade cartFacade; ! @RequestMapping(value = "/entry", method = RequestMethod.POST) @ResponseBody public CartModificationData addToCart(@RequestParam(required = true) String code, @RequestParam(required = false, defaultValue = "1") long qty) throws CommerceCartModificationException { return cartFacade.addToCart(code, qty); } ! }
  18. 18. Marshal Response DTOs to XML/JSON <!-- from springmvc-servlet.xml --> ! <mvc:annotation-driven> <mvc:message-converters register-defaults="false"> <bean parent="resolverXStreamJSONConverter"/> <bean parent="resolverXStreamXmlConverter"/> </mvc:message-converters> </mvc:annotation-driven>
  19. 19. We expose 
 commerce logic 
 and data model 1:1
  20. 20. What Else? REST-like ETag OAuth 2.0 & HTTPS Template Shipped as source
  21. 21. Questions? Beer?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×