Deploying an Angular on Store on SAP Commerce Cloud (Hybris)

Deliver a sub-second Angular website on SAP Commerce Cloud (Hybris) with Layer0

Angular is a frontend framework created by Google. It is a popular solution for large enterprise websites that plan to scale their site quickly. All in all, Angular offers great runtime performance and is fit to be the backbone for complex, revenue-generating websites with heavy traffic, such as eCommerce and Travel websites.

Angular comes with a bunch of built-in capabilities, including:

  • Code generation: Angular generates code that's highly optimized for JavaScript virtual machines, providing the benefits of hand-written code. HTML templates combined with JavaScript open the door for optimizations that are simply not possible in other frameworks, for example React.
  • Code splitting: Angular apps load quickly, delivering automatic code-splitting. This way, users load code required to render the view they request.
  • Real DOM: Angular uses real DOM, making the framework best suited for websites that do not change frequently. However, the framework is not the best choice for large websites, or those that make frequent updates, such as most eCommerce sites.

SAP Commerce Cloud, formerly known as Hybris, is a highly customizable eCommerce platform with a robust content management system. The platform offers two proprietary frontends. The first, Hybris B2C Accelerator theme, is a Responsive frontend solution. The second, Spartacus, is a headless frontend solution that is faily new, so there are few proof points in production. It is, however, geared specifically for the SAP Commerce Cloud platform, so you remain locked into the platform's ecosystem. Moreover, it does not support SSR out of the box. Unlike Hybris, which is a Java based application that typically runs on a Java server like Tomcat, Spartacus SSR is Angular JavaScript which runs on Node.js. As a result, supporting SSR with Spartacus requires running and maintaining a fleet of Node.js servers.

Omni Commerce Connect (OCC) is SAP Commerce Cloud's REST based API that can be used to implement shopping, account management, checkout, and even administration flows in an application. However, many enterprise  sites have significantly customized their controller logic and those customizations may need to be re-created in client side code or the separate OCC controllers. Unfortunately, this can add additional effort when migrating to an OCC based solution, like Spartacus, but synthetic APIs can reduce this workload. Synthetic APIs can be found on Layer0, along with AMP and SSR technology to optimize website speed for websites running on the platform.

Layer0 lets you deliver your Angular storefront on SAP Commerce Cloud at sub-second speeds in a matter of hours. The average website on Layer0 see median speeds of 320ms loads, as measured by Largest Contentful Paint (an important metric in Google's Core Web Vitals). Layer0, however, is much more than merely a website accelerator. It is a Jamstack platform for eCommerce. Layer0 makes websites faster for users and simpler for frontend developers. The platform was built specifically for large-scale, database-driven websites such as eCommerce and Travel and includes the following benefits: 

  • Jamstack for eCommerce via pre and just-in-time rendering
  • Zero latency networking via prefetching of data from your product catalog APIs
  • An edge that can be configured natively in your Angular app (CDN-as-JavaScript)
  • Edge rules that can be run locally, in pre-prod and production environments  
  • Automated, full-stack preview URLs from GitHub, GitLab, or Bitbucket with every new branch and push
  • Performant split tests at the edge and A/B tests that do not slow down the site, canary deploys, and personalization
  • Serverless JavaScript that is much easier and more reliable than AWS Lambda

With Layer0, your Angular SAP Commerce Cloud store will run in sub-second speeds and your developers will be empowered to control edge caching and reduce rework using the various developer productivity tools that come with the platform. 

Check out Annie Selke, a SAP Commerce Cloud website on Layer0. This mid-sized retailer is outranking eCommerce giants like Amazon, Wayfair, and Williams-Sonoma for key phrases in the search engines on Layer0 with 300ms average page loads.

If you're currently using Angular, use the this guide to deploy your Angular app on Layer0 and get sub-second loads in as soon as 1 hour of work. 

Deploy in minutes

Moovweb XDN works with all frontends
Deploy freeTakes 2 minutes