As part of the EPiServer Ascend event, EPiServer showcased EPiServer Foundation. In this post I am going to explain what it is, what can you use it for, what are some of the pros and cons, and how to install it.
So, lets begin !!!!
What it is?
EPiServer Foundation is an accelerator created by EPiServer in house developers using a well structured and modular design. It tries to establish the best practices other developers should follow. It is open source and it will be modified by the community with EPiServer governance. It includes the CMS, Commerce, Personalization, Find and Social products
What can you use it for?
The main purpose of the EPiServer Foundation is to showcase a variety of products all integrated in one place. Before this you had independent reference example codes for some of their products such as: Alloy for the CMS product and QuickSilver for the Commerce one. There were no reference examples for Find, Social or Personalization. With this project you can have everything in one place and use it as a demo that can be shown to potential clients or you can use it as a starting point for a new project. However, you should keep in mind that if you don’t need some of the functionality that is already in place you will have to remove some projects and files. EPiServer is planning to solve this issue in the future by providing each feature as a NuGet package so you can start as an empty EPiServer project and add only what you need using the packages.
Open Source – Other developers can improve upon the project without depending directly from EPiServer
Modular – Each product is contained inside their own set of Visual studio projects so you can remove them if they are not needed
One project to rule them all – All main products of EPiServer are showcased here; it is by far the fasted way to implement a demo and use it to showcase EPiServer full potential
Code Best practices – The project shows the code best practices that EPiServer suggests, which at the same time will help novice and more experienced developers to see how some of their products work or how something should be implemented
Open Source – Without correct governance from EPiServer these can cause real headaches to developers who want to use it
Not that modular – Even though each product is separated in a set of Visual studio projects, for the moment there is not a way to start from scratch and add the functionality you need. You must start with the full solution and remove the things you do not need.
Other proprietary accelerators – During the years, partners around the world have been creating their own accelerators. This project will conflict with several of their implemented functionality and it is quite possible that the adoption rate of this project falls because of it.
No unit testing – Even though the code in the project is modular and uses the best practices EPiServer suggests, there are not unit tests to be found. EPiServer should have considered these tests because in my opinion it sends the wrong messages to developers who are yet to implement unit testing in their own projects.
How to install it?
To install the project, we must install the following pre-requirements first:
- Visual Studio 2017 or higher
- Sql Server Express or Developer or Sql Azure Server (If using Sql Azure download sqlcmd)
Now, we clone the repository using the git clone command using this url
After the repository is downloaded go to the folder and execute the Build.cmd file, provide the requested parameters as follows:
Note: Build.cmd is now being used for a different purpose, You can use the setup.cmd command instead
|Application name||Name of the application|
|Public domain name||Domain for the application, ex. foundation.com|
|Public domain name for commerce||Domain for the commerce application, ex. commerce.foundation.com|
|License path||Where is the EPiServer license located in your computer|
|SQL Server name||SQL Server instance name, for local use dot(.) or localhost|
|SQL Command||SQL command to execute, by default -S -E|
After providing all parameters. The wizard will execute several commands to create the new project and set it live.
When it finishes it will open a browser window using the domain you specified in the one of the parameters above.
Unfortunately, it seems like there is a mistake in the script, as the windows host file was modified with different host names as the one, we specified in the parameter
We write down the domains we specified in the parameters inside the hosts file and we try to reload the page in the browser
This will open a content migration page where we specify from which site do, we want to migrate the CMS and the Commerce Catalog content. It can take several tries to make this page appear. Refresh the page if you find something weird or if a 500 error suddenly appears.
In the first option choose remote site, and select Mosey from the list, there is only one option anyway
In the second option choose remote catalog site and select one of the three available options. I had some issues when I imported the Foundation_Tools catalog so I will recommend using the Foundation_Fashion which is the one worked for me
Press the button submit query and wait a couple of minutes. It will show the home page after the process finishes. There is no loader in the UI after you press the button, so be patient
You can access the edit UI interface by adding /episerver at the end of the home url. The default username is email@example.com with password: store
And that is all. You have now a live EPiServer site with CMS, Commerce, Personalization, Find and Social products already implemented. You can modify it as you wish after it. If you have any issues with any of the steps please review the latest installing instructions here https://github.com/episerver/foundation.