Making Headless CMS and Commerce Talk to Each Other

As MACH architecture is gaining its popularity, solutions we are building tends to integrate on a frontend layer. This integration pattern unlocks omnichannel capabilities for your projects as you are not locked into just generating HTML for Web, but can power mobile apps, in-store devices, and even experiences in cars multimedia systems. That said, there is a problem that the operations team can face working with various components of the headless architecture....

February 15, 2021 · 4 min · Alex Smagin

Getting better observability of Sitecore with Azure Application Insights Map

I believe that everyone, who installed Sitecore Azure PaaS had their silent question moment: “Where are all my logs, and how I suppose to monitor this?”. While the first question was answered multiple times (e.g. on StackOverflow), the second part is a bit more complex. You might think about what complexity I’m talking about? Yeah, putting Application insight Key is a no-brainer but it is far from enough to get observability of your system....

July 5, 2019 · 3 min · Alex Smagin

Troubleshooting performance of Sitecore JSS in Azure App Services

Some time ago we faced an issue with NodeJS slowing JSS in integrated mode significantly over time in Azure PaaS. We saw requests growing from sub-second to 3-4 seconds. Here is what you need to check as you do troubleshooting of your solution. Configurations & Checks Pass custom parameters to Node JS in integrated mode First of all, we tried to gather some information about NodeJS. To do that, we followed a recommendation by Adam, which you can find here: https://sitecore....

June 21, 2019 · 2 min · Alex Smagin

Sitecore GraphQL schema and query cache reset

As you know GraphQL requires the schema to execute your queries. In Sitecore implementation, the schema is regenerated every time you touch templates. What we recently discovered, that if you have separate CD and CM, schema on the CD node will not be refreshed after publish. Luckily, this is quite easy to fix. You need to create an event handler and subscribe to *publish:end:remote *event. public class TemplateUpdateHandler : Sitecore.Services.GraphQL.Content.EventHandlers.TemplateUpdateHandler { public TemplateUpdateHandler(IGraphQLEndpointManager endpointManager) : base(endpointManager) { }`` public void OnPublishEndRemote(object sender, EventArgs e) { base....

May 11, 2019 · 1 min · Alex Smagin

Catching Server-side Rendering Errors in React JSS Apps

It was quite common for Sitecore MVC implementation to add logic around renderings that will catch unexpected exceptions in them and save your page from complete collapse. Such logic hides your component from end-users and might only put something in HTML comments, while during preview or editing experience it will give some visual indication of an error and its details. Such functionality can also be very useful for React JSS applications, but it is not that simple especially for isomorphic apps leveraging SSR (server-side rendering)....

January 18, 2019 · 3 min · Alex Smagin

Mixing Sitecore JSS and SXA

This investigation of Sitecore JSS and SXA was done quite a while ago, but I didn’t get a chance to post it here. I need to go back to the validation of this setup so this will be a living post and I’ll be updating as new findings arrive. You might ask why would you need to mix them, but the reason is pretty simple. SXA brings a lot of functionality outside of presentation configuration (which I’m not a fan of) that can be useful for any site, like site management, wizards for site creation, local data sources, various site settings, etc....

November 29, 2018 · 2 min · Alex Smagin

How to marry ReactJS and Sitecore with Webpack – Part 4. Module on GitHub

It’s been a while since I wrote about Sitecore, React and embedded JS Engine. Also, my presentation on Philadelphia SUG last year was mainly theoretical. So the last few days I’ve spent cleaning up my sources that I’ve been using for those posts. It looks like that this time to open sources. GitHub https://github.com/asmagin/sitecore-js-presentation In the repo, I’ve put sources, samples, and some docs that I will update and enrich going forward....

February 15, 2017 · 2 min · Alex Smagin

How to marry ReactJS and Sitecore with Webpack - Part 3. JS Engines Performance

If you are following ReactJS.NET topic, then you probably know that they are migrated to a new JS engine. Now the project is using JavaScript Engine Switcher, which supports multiple engines: MSIE, V8, Jint, Jurassic, Chakra Core & Vroom. As I’m planning to use JS engine to render components we need to know which one is the best. Test Setup For the test, I’m not going to use everything in ReactJS....

October 22, 2016 · 3 min · Alex Smagin

How to marry ReactJS and Sitecore with Webpack - Part 2. Adding Redux

I’ve ended my previous post I’ve mentioned that I would add redux in a Sitecore-ReactJS mix. That is what I’m going to talk about in this post. An original solution helps us to reuse ReactJS views on the server which actually could save us time in development and maintenance. It was more about static content generation. While most of the sites I’m working with requiring more than that. Take an e-commerce storefront, a travel site, or utility customer portals, a customer would demand a lot of interactivity in all of them....

October 20, 2016 · 6 min · Alex Smagin

How to marry ReactJS and Sitecore with Webpack

There were a few posts on the internet on how to integrate front-end code into a Sitecore solution. It all started with a post from Alex Shyba. Back in February, he describes the general concept of an integration. Then Richard Seal created a module for Sitecore that allow you to use jsx renderings in Sitecore. I was trying to solve a problem of an HTML handover between front-end and Sitecore developers for a while....

October 10, 2016 · 6 min · Alex Smagin