Take Your Sitecore Project To The Next Level With Node.js

A presentation at Sitecore Symposium in in Orlando, FL, USA by Anastasiya Flynn

Take Your Sitecore Project To The Next Level With Node.js

Take Your Sitecore Project To The Next Level With Node.js

Agenda

Agenda

Setup

Setup

New Solution Checklist

New Solution Checklist

New Solution Checklist

New Solution Checklist

Automate Project Setup With Yeoman

Automate Project Setup With Yeoman

Yeoman – Setting Up

Yeoman – Setting Up

Yeoman – Template Variables

Yeoman – Template Variables

Yeoman – Generator Lifecycle

Yeoman – Generator Lifecycle

initializing step

initializing step

prompting step

prompting step

prompting step

prompting step

configuring step

configuring step

writing step

writing step

writing step

writing step

install step and end step

install step and end step

Yeoman – Exposing Generator For Testing

Yeoman – Running Main Generator

Sub-generator

Sub-generator

Yeoman – Running Sub-Generator

New Solution Checklist – Conquered!

New Solution Checklist – Conquered!

Development

Development

TypeScript Helix

TypeScript Helix

What is Webpack?

What is Webpack?

Webpack - Configuration

Webpack - Configuration

TypeScript Helix

TypeScript Helix

TypeScript Helix

TypeScript Helix

Webpack Dev Server - Configuration

Webpack Dev Server - Configuration

Dev Server – Ajax?

TypeScript Helix – Best practice patterns

TypeScript Helix – Best practice patterns

Mocking a server call during local testing

Mocking a server call during local testing

Replacing mocked call with a real server call

Replacing mocked call with a real server call

Headless CMS – Sample Component

Headless CMS – Sample Component

Testing

Testing

Why Unit Test JavaScript?

Why Unit Test JavaScript?

Jasmine - Setup

Jasmine - Setup

Jasmine - Implementation

Jasmine - Implementation

TypeScript Helix – Best practice patterns (continued)

TypeScript Helix – Best practice patterns (continued)

Unit Testing UI Components – Sample Component

Unit Testing UI Components – Sample Component

TypeScript Helix – Best practice patterns (continued)

TypeScript Helix – Best practice patterns (continued)

Unit Testing UI Components – Sample Component

Unit Testing UI Components – Sample Component

Karma - Setup

Karma - Setup

Jasmine/Karma – Demo

Get the code

Get the code

Many Sitecore developers still see JavaScript as just a client-side language that’s used to enhance the UI. This session proves that JavaScript belongs server-side as well, showing how to use popular Node.js-powered frameworks to automate server-side processes and make our lives as developers easier. The applications of server-side JavaScript covered in this session do not depend on Sitecore JavaScript Services, and can be used in traditional Sitecore MVC projects.

Session takeaways This presentation demonstrates practical applications of server-side JavaScript at 3 stages of a Sitecore project lifecycle.

Setup: How to automate the generation of new Sitecore solutions with yeoman Development: How to build a modular TypeScript library against a headless CMS with Webpack Testing: How to enforce Helix design principles with unit tests written in Jasmine and run with Karma

Video

Resources

The following resources were mentioned during the presentation or are useful additional information.

Buzz and feedback

Here’s what was said about this presentation on social media.