Asp.Net

DbLocalizationProvider step closer to front-end

Along with other smaller bug fixes, database-driven localization provider for EPiServer got closer to front-end. We joined forces together with my old pal and friend Arve Systad and made it possible to add translations to client side resources as well. Setup So setup for the client-side resource localization with help of DbLocalizationProvider plugin is more or less straight forward. You will need to install DbLocalizationProvider.EPiServer.JsResourceHandler package from EPiServer feed and add corresponding <script> include in your markup file to fetch translations from the server: <script…

Keep reading

Small Enhancement for Feature Folders

Great colleague of mine Māris Krivtežs wrote blog post about feature folders describing code organization into folders by features or functional areas rather than technology or different grouping. However, one of cons from Maris' approach we couldn't reconcile with - name of the sub-feature folder needs to follow Mvc controller naming convention. "Another issue is related to the sub-feature folder naming. Sub-feature folder still should be called with the same name as a controller." So I made tiny adjustment to the view engine worth sharing. Adjusted code is below. public…

Keep reading

Baking Round Shaped Software

This is the story how I discovered clean, understandable and maintainable software architecture. Why it's round shape and not pentagon, hexagon or any other *-gon shape? In this blog post I'll guide you through my journey. This part will cover theoretical side. Next blog post will map it to the code. Classical Architecture Agree that we all have been taught about N-tier/layer application software in high schools, universities or between the pages of some software development magazine?! Where order and most importantly dependency direction was stressed as one of…

Keep reading

Specify Default DisplayOption in the Content Area

Time to time when working on various projects we come across requirement to control somehow which DisplayOption will be selected as default, once content is placed inside particular ContentArea. As most of our projects are running under Twitter Bootstrap system - this is ideal feature request for EPiServer Bootstrap Content Area plugin. As I'm always trying to be developer friendly - I would like to be able to define these default display option rules in the code. And finally version 3.3 got these features. Default DisplayOption for Block So…

Keep reading

<head> driven by Content Area

For some powerful sites and editors sometimes it's wise to give them power to manipulate some stuff in <head> area. One of the simplest way to give editors this possibility is to create ContentArea where editors could create particular set of available blocks that would output themselves between <head> elements. By default EPiServer will generate wrapping element around content area (div tag name is actually controllable as well, more info here): @Html.PropertyFor(m => m.PageHeaderArea) Resulting in: <div> <!-- CA wrapper…

Keep reading

Asp.Net Mvc Areas - Packed as NuGet

If you would want to add Asp.Net Areas support to your EPiServer site, you would need to copy some files from my previous blog post. Copying files from someone's blog posts seems to be good idea, but it's a bit problematic in case of updates or changes. If so, then we share common vision that by installing NuGet package, your project gets up-to-date support for Asp.Net Mvc Areas. For that reason I packed up Asp.Net Mvc Areas support into NuGet package, for you guys. You may just…

Keep reading

Asp.Net Mvc Areas in EPiServer - Part 2

Asp.Net Mvc Areas is a great way to organize and structure your EPiServer site. Once you have multi-tenant site where the same EPiServer installation with the same set of libraries, styles, script set and other assets is handling more than single site - Asp.Net Mvc Areas become really handy to group particular site's specific assets and other stuff together under single folder. This also gives developers more obvious and more clear picture of the project setup. However we all know that there is no native support for Asp.…

Keep reading

Content Area - Under the Hood, Part 3

This is last blog post in series under the hood of Content Area. In this blog post we will take a look at how and what exactly could be customizable while content area is being rendered. Where and how developer can hook in, what can be overridden and controlled. Parts in this series: – Part 1: Registration and Discovery – Part 2: Template Selection – Part 3: Extensibility Overview Following parts and pieces can be customizable, changeable or replaced by other code completely: Change renderer - It's possible to change they guy who…

Keep reading

FeatureSwitch meets Glimpse

FeatureSwitch library got yet another plugin in its family. Glimpse is an amazing framework for troubleshooting and tracing your web application, even in production environment. If by coincidence you are a consumer of this framework and also use FeatureSwitch library, then now they run together. You can access your features through Glimpse control panel. Installation You need to install a package from nuget.org feed: > Install-Package FeatureSwitch.Glimpse Using FeatureSwitch.Glimpse package you can get an overview of your features and its state through FeatureSwitch tab. There is also…

Keep reading

Format Your Exception Message Properly

Not so Nice Failure I was hacking around NServiceBus (NSB) application and came across pretty unpleasant failure from NSB. So in short we were using Unicast bus that basically means that producer-side of the message has to have a configuration set to which NSB endpoint particular message should be sent. In this case we were using Microsoft Azure Storage Queues as physical transport level. In case when you don’t have a particular configuration to instruct NSB where the message has to be delivered you may encounter following exceptional message:…

Keep reading