Pattern for initialization of PageData objects

When implementing a custom page provider, the recommended way to initialize a PageData object (that is to populate the instance with properties) is to call the method InitializePageData on PageProviderBase. This call is rather costly and includes a database roundtrip. The reason for the database call is to ensure that the page gets a unique page folder. However, most custom implementations of page providers probably do not store any resources in page folders. In these cases an alternative... [ Read full article ]

01 September 2009  3 Comments

Writing unit tests for your EPiServer code

The goal with this blog post is to give EPiServer developers some tools that can help with writing unit test for your EPiServer related code. When writing a unit test you typically want to test a specific component in an isolated way. However, many functions have dependencies to other modules. Often you can get far by designing your code to be testable e.g. by using dependency injection. Then you can use a mocked dependency in your unit tests. However, there might be occasions where this is n... [ Read full article ]

06 March 2009  6 Comments

Identities in EPiServer

Traditionally in EPiServer a PageReference has been used as "the" unique reference within the site. A PageReference is still unique within a site (however the ID part of the PageReference itself is not guaranteed to be unique) but we are shifting more and more internally (at least in the storage layers, in higher layers PageReferences are more pleasant to work with) to work with Guid based identities. So internally in the EPiServer database we store references to pages and files as Guid based... [ Read full article ]

20 February 2009  4 Comments

Change regarding RawProperty.CustomData

We are currently working on improving Mirroring function targeting R3 release. This blog post is though primarily not about that (I will later make a blog post about how the new mirroring architecture is going to be) but about one change that we are about to do. The change is regarding RawProperty.CustomData and how that is handled during import/export (and also mirroring since mirroring uses import/export functionality). My guess is that not many of you out there has written any code that is... [ Read full article ]

30 January 2009  1 Comments

Page Provider - Structure your site

There might be occasions where you like to have a view of your site structure that is different from the "real" structure. Perhaps you like to view only pages in a specific language, pages that you have written, pages with some specific category, pages filtered by some criteria or pages listed in some other structure like alphabetical. You can use page providers to create "virtual" strucures that complements or replace the "real" structure. This makes it possible to have the same page appeari... [ Read full article ]

05 December 2008  4 Comments

EPiTrace logger