In this tutorial, I will cover 5 principles that you should think about when you start to design Episerver blocks. One important aspect of block design is around the future. When designing an Episerver website you should be future-thinking and you should make an assumption that the website will change. Just because something is quick and easy to implement today, does not mean it is the correct long-term solution.
Consider The Future!
One main consideration when it comes to blocking design is the consideration of the future. Obviously, where you work will depend on how much you care about the future. Over the years, I've worked with a number of digital agencies. I have also worked for a number of companies directly. Each type of organization typically has a different approach to how they architect websites in terms of future needs. In an agency, you'll tend to work with more CMS savvy people. This is understandable. In agencies, you get more repeated exposure to different technologies and you have a broader range of requirements to work with. Agencies need to make money. Thinking about project constraints as outlined in the mythical man month we have time, cost, and quality. In agency land, time and budget are the biggest project influencers. This is why some agencies tend to be short-future focused. Make something great today, as the agency is not responsible for the potential future maintenance phase. This attitude is understandable, however, I think it's a disservice. Fast-forwarded a few years, a team will spend time and effort to unpick all the inflexibility originally built in. This is not a wise investment for a client.
This future thinking is the tricky part of block design. You need to second guess how the system will be used during development, now and in the future, in order to give content editors the best possible editor experience. In Episerver terms, a big part of this guesswork is trying to decide on what should be a page and what should be a block. I've previously written in How To Decide What Should Be A Block that designing things isn't a good approach either. In general, my advice is to stay more page focused. Only nest blocks within content areas to one level of nesting.
When it comes to designing a new Episerver website, this point is often overlooked. When you're launching a new website and you have minimum content, the correctness of your content modelling is not always obvious. Fast forward a few years, when that new marketing campaign is coming out, having a very rigid page with locked-down content areas can cause some serious issues. I recently wrote about The Perils Of Changing Existing Property Types In Your Production Episerver Website. In that article, I discuss the risks around changing existing properties on the homepage. Designing a very rigid homepage and then trying to refactor it, can result in you accidentally taking your website down!
Bearing these forward-thinking design consideration in mind when you are doing your content modelling within the requirements phase is key to getting your architecture correct. WIth that in mind I will share 5 principles I think you should consider when you start splitting up your pages and blocks.
Considering these potential forward-thinking constraints is a key part of creating a solid architecture. Now we have a baseline to think about architecture, I will share 5 principles I think you should consider when you are undertaking the content modelling process for your website!
Jon's 5 Principles Of Block Design
All of my ERpiserver content modelling adivce can be boiled down to these rules:
On the homepage, be block focused: Changing property types on the homepage page-type on a live website is risky. Adding a new block into a content area poses no risk. When you are building your homepage use content areas and blocks, rather than use lots of in page properties as this will make it future-proof
Avoid nesting content areas within content areas: If you design something so a content area exists within another content area... try to rethink your design. I think a good rule of thumb to block nesting, is to aim for one-level only. If you find yourself needing to nest numerous content area inside each other, spend 10 minutes thinking of a new way to tackle the problem, or, apply validations on the content area.
Try to follow the DRY principle: Try to keep the number of components you create to a minimum. If you have say 4 components (page/blocks) all with very similar layouts try to consolidate the design into a single page/block whenever possible. The more components that exist within the CMS, the harder it will be for content editors to find things. Speaking from experience, a site with hundreds of pages and blocks is difficult to use!
Favour creating a new block over creating a new page-type: I recommend favouring a content area and a bloc,k rather than multiple pages-types with fixed layouts. Some content modellers may counter-argue that the future design might change so it's better to duplicate HTML to cater for the future. I'd personally keep things simple and I always tend to go with the quickest approach, which is abstract the highly-likely to change parts into content areas. The more duplication you can avoid the easier the maintenance team and the future marketers will have.
Choose configuration overduplication: If you go into a supermarket to buy lunch, have you ever found yourself overwhelmed with what to choose as there are too many options on the shelves? Trust me, content editors experience the same thing in Episerver. It is better to only allow a content editor to pick from a small list of components and then within that component have some basic configuration that allows it to be customizable, compared to creating hundreds of components that get shown on the new item screen within the CMS.
When you start the content modelling process on your project, keep in mind these 5 principles. It is impossible to 100% guess how a website will change over time, however, providing the correct level of flexibility by keeping these principles in mind should give you the best chance of success. Happy Coding 🤘