Faceted Navigation Engine Nomenclature

This article is the second of a series describing the faceted navigation system for EPiServer that we have internally developed in Cognifide, that’s already proven to be a robust solution for delivering tagged content a heavy traffic site, which will be released shortly as an open source project.

First of all we have to explain the nomenclature as it is going to be used quite a bit. A few terms we use pretty extensively are:

  • Facet – this is roughly an elaborate version of an EPiServer (or WordPress) category. One of the problem with EPiServer category is that it is just that and absolutely nothing more. There is no way for attaching metadata and conditional structuring of the category tree. There is no way to assign them roles. Facets provide you with much, MUCH more.

Read the rest of this article »

The challenges of a high traffic site with EPiServer

…with an unconventional approach to data fetching.

This article is a first of a series describing the faceted navigation system for EPiServer that we have internally developed in Cognifide and that’s already proven to be a robust solution for delivering tagged content a heavy traffic site, which will be released shortly as an open source project. The article outlines some pitfalls of EPiServer that we’ve run into and the nature of the project in which the module was used first and which influenced a lot of our design decisions.

This article and the Faceted Navigtation module is developed on EPiServer 4.61 and not the latest version 5 of the CMS so far, so mind that some of my reservations may not be a problem if you’re just starting to work on a brand new project and have the luxury of using new features of it.

Also (which may be a good thing) our sites uses a different approach to navigation the content, we do not really care much for the tree structure, but we treat all EPiServer pages equally when looking for content because of how the site is designed from the creative point of view.

Read the rest of this article »

This is a slightly dated post (written around November last year), that I forgot to post some time ago, so bare in mind, we’ve already started working on the faceted navigation getting open source status and I’ve updated the first sentece to include Adam Matusiak joining our team – Welcome Adam!

LocutusBorgQueen Over the last month or two  our hive mind has assimilated two new voices, our thoughts have become one with Greg’s, and Adam’s.

But seriously, the EPiServer (and consequently the .Net) part is getting really strong with eight nine(!) developers on that side currently working on a number of projects and that’s just developers!

What I really like is that we’re not just consuming the APIs, we already have developed some very cool technologies and the best part is that we’re starting to look seriously at open-sourcing some of our technologies to make the EPiServer community benefit from our experience. As a part of Cognifide Labs (that we hope to evolve in shape of Google’s “Pet projects”, I’m really looking forward to that). I’ll be working in my spare time on making our page commenting engine as well as our faceted navigation engine public consumption ready and ultimately add to the EPiCode experience. These are some modules that we’ve been working on for a long time, but just so busy with the various project development we’ve never been able to make them commented and documented enough for it to be a viable for a 3rd party developers to grasp. But already the technologies proven to be robust, scalable and extensible to support sites with over 6 million page views per month and growing and the site being fast and responsive just like you were the only person visiting it, thanks to using our data caching/fetching routines. All of that despite of a number of content pages counted in tens of thousands now.

It’s good to be a part of the hive mind, especially as brilliant as this one, so give in …resistance is futile, you will be assimilated!

Would you be interested in working with us on the technologies? How much need do you have for an elaborate faceted navigation in your projects? Did you have a need to add a commenting (site wide) to a site that already works, in a way that is not intrusive and that allows you to moderate comments in with the EPiServer editing mode integration? Which one would you find more interesting for us to start working on making public?

Silicon Valley says: Do what Cognifide does!

There is a really heartwarming article (if you’re from Poland) on Silicon Valley Watcher about the skills of Polish engineers, the low turnover and the general satisfaction from Polish employees by international companies something that UK as a country discovered and Cognifide in particular have noticed quite a while ago.

And I really can fully relate to that, I would bet any money to stand the competency of any person in my crew against any of the top professionals out there. It definitely is a good time to be in the IT business in here. A small excerpt – worth noting:

Common cultural ties

Polish engineers are also very familiar with Western culture. Common cultural understanding is very important for any company. Poland is now part of the European Union, which gives US firms great access to huge markets, and rapidly developing markets in Poland and in Eastern Europe.

Quality not price

Mr Slawek pointed out that Polish engineers are not chosen because they are cheaper, companies choose them because of the quality of their work. And Polish teams are very good at thinking on their feet, as is shown by their numerous accomplishments in programming competitions, which are won by quickly finding solutions to complex problems.

Posted in Lifestyle, Software, Software Development
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
| 18 Comments »

EPiServer property getter cleaner-upper

Just a daily time saver, for reuse at another time.

Any old time windows developer, will remember the fun of using the ini files with GetPrivateProfileString. As much as ini files sucked there is one nice aspect of that call – you can setup a default value it is to return in case a value is not specified in the file. Similarly in a daily episerver programming you usually want to read a value but if one is not epcified you will usually want to use another value and just move along with the progress, and not really care to have an if there to do the filling in. Not to limit the property to any specific type – the task can be nicely solved with generics to handle pretty much any type of property.

/// <summary> /// Gets a property from a page by its name - if a property does not exist or is not set - returns a default value. /// </summary> /// <typeparam name="T">The type of the property</typeparam> /// <param name="page">The page to pull the data from</param> /// <param name="propertyName">The name of the property</param> /// <param name="defaultValue">The value to be returned if the property does not exist or is not set.</param> /// <returns>The value of the property.</returns> public static T GetPropertyDefault<T>(PageData page, string propertyName, T defaultValue) { PropertyData property = page.Property[propertyName]; if (property == null || property.Value == null) { return defaultValue; } else { return (T) property.Value; } }

It’s hard not to appreciate how clean that resolve is (with strong typing being forced with use of generics):

string link = PageUtility.GetPropertyDefault(CurrentPage, "ALink", "#top");

Another speedup coming from the TryParse background – when I want to deviate from the normal execution if a property is not defined but still have a clean code and strong typing…

/// <summary> /// Gets a property from a page by its name - if a property does not exist or is not set, /// returns the presence status of the property existence as a boolean value. /// </summary> /// <typeparam name="T">The type of the property.</typeparam> /// <param name="page">The page to pull the data from</param> /// <param name="propertyName">The name of the property</param> /// <param name="value">The value to be returned if the property exist and has a value, /// if the proeprty does not exist or is not set the value witll remain unchanged.</param> /// <returns>True if the property was retrieved succesfully, false otherwise.</returns> public static bool TryGetProperty<T>(PageData page, string propertyName, ref T value) { PropertyData property = page.Property[propertyName]; if (property == null || property.Value == null) { return false; } value = (T)property.Value; return true; }

Misadventures with Database Engine Tuning Advisor

I’ve been on a sole task today to improve a database performance of the project we’ve been working on. As much as I enjoyed the task there is one thing that costed me quite a bit of head scratching. Being a standard nerd I usually have about 20-30 applications running on my machine at a time, I didn’t immediately associated the error with the tuning advisor but rather assumed it’s one of my other 29 applications/servers/daemons/services in background did something stupid, probably even some of my code craving for a bit of attention, right? So I moved to tune the database on the server via remote desktop, but when I hit a wall there I’ve looked around for the solution and it looks like that it’s been known to MS for almost 2 years now.

Found it hilarious enough though to post it here though :)

“This indicates a bug in your application”, how vicious of them show a dialog like this to a developer. It’s not in MY code you bad thing you! It’s in YOUR code!

The solution or rather a workaround is available here. And NO, you don’t need to restart your computer after applying the change to the registry, just kill and restart Explorer and then start the Tuning advisor again. Make sure to restart the SQL Server Management Studio as well if you’re launching the tuning advisor form it, the setting is applied on app startup.

Is EpiServer a hard-shelled clam or what?

As much as I seem to be enjoying my trip with EpiServer there are some little things I don’t seem to appreciate all that much and I’m not quite sure how to work around some of them in an elegant way.

EpiServer has a fairly advanced way of dealing with properties but it also seems to be a bit tough on the developer whenever you try to do something more than just strictly using its API-s. One of the areas I don’t really enjoy is the dealing with the pages that are expired or generally unavailable for the user for various reasons.

In the project that we’ve been implementing recently we needed to store page ids for further reference in numerous places and although this generally works, accessing a page that’s been deleted, expired or not published yet, has proven to be a challenge and I can’t seem to be able to find an elegant solution around it.

For instance, we have a list of bloggers, that are stored in our faceted navigation with links to their pages, our system lists them and the links to their pages, should someone’s page be unpublished yet – we run into problems.

Another good sample of where this is needed is a list of pages (A multi-page property of sorts). There seems to be no implementation of a multi-page property in EpiServer and the only reasonable implementation that I’ve been able to find is available through EpiCode. The following is it deals with the pages going in or out of the system, which leads me to think that the only way of checking whether a page is available for me is to instantiate it with all the consequences of it:

// get the page with error handling for // access denied or deleted page try { PageData page = Global.EPDataFactory.GetPage(pageref); isExternalLink = (page.StaticLinkURL != multipageLinkItem.Url); if (page != null && isExternalLink == false) _selectedPages.Add(page); } catch (PageNotFoundException notFoundEx) { // We should not add the page if it // does not exist } catch (EPiServer.Core.AccessDeniedException accessDeniedEx) { // User is not allowed to see page, skip it } catch (Exception ex) { // The page could not be loaded, for some other // reason. System.Diagnostics.Debug.Write("Page could not be loaded: " + pageref.ToString(), "PropertyMultiPage"); }

What I do not like about this part (of an otherwise remarkable piece) of code is that exceptions are not supposed to be the driving force of the program flow. But in this case they seem to have been forced to do it. It’s like I had to open a file to check its size or whether it even exists.

I can see why the system will not let me visit the page if I’m not allowed to do it as a user, but the fact that the API frowns at me whenever I even try to instantiate it just to check its existence or my rights to it has proven to be quite problematic. After all a user is not supposed to see a login screen in the list of pages, but rather when he/she enters a page that he/she no no rights to. Better yet, give me a way to check whether I even can access it.

Is there one already? Has anyone heard? Did anyone see?

The great missing feature of EPiServer

As we’ve been debating with Steve in the EpiCode IRC channel (Come on, join us there! You know you want it!) a few days ago, probably one of the biggest missing features in EPiServer is multi-page property.

Yes there seems to be a fairly robust implementation of a similar functionality on EpiCode however it’s got 2 serious drawbacks:

  1. adding a great number of consecutive pages is a tedious process
  2. it’s not native to EPiServer, meaning – if I use it in my module that I would like to distribute later I need to put the control there. Short of potential licensing issues, this introduces an unnecessary complication level for such distributable modules

Another big issue with the page selecting dialog – apart form being unable to select multiple pages is its inability to root it anywhere outside the original EPiServer repository root. This really limits its quality in terms of re-using of its functionality to be able to use it for selecting of a limited set of pages.

I really wish I could have a clear API for it like I can use the Windows Forms  Open/Save Dialog in desktop applications. I mean seriously – I thought it was impossible that in a product as well thought out as EPiServer something as basic would be missing – there must be something out there to do it, right? WRONG. I looked all around the EPiServer code assemblies and short of re-coding the dialog form grounds up, all I have been able to dig out was a way to re-use the a part of the favorites functionality of the dialog.

You might find a way to reuse the following piece of code. If you put this in your .ASP :

Read the rest of this article »

Posted in ASP.NET, EPiServer, Software Development, Web applications
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...
| 45 Comments »

Database-based paged EPiServer searches

Searches paged in the database have posed a problem in SQL Server at least prior to version 2005. I’ve found some solution to the problem on the net but they were so cludgy that I would never really put anything like that in a production server. I hope the following will shed some light on how they work in general by using in in EPiServer context.

Theoretically in EPiServer you can pull the pages that match the criteria from the database with EPiServer.Global.EPDataFactory.FindPagesWithCriteria() into the PageList but that seemed to be imposing a strong performance penalty with increased number of pages meeting the criteria. Since this search is sometimes done even multiple times on a page request in our project we needed something better.

Read the rest of this article »

Posted in EPiServer, Microsoft SqlServer, Web applications
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
| 15 Comments »

Our friends at EPiServer AB has just let us know that they are in need of EPiServer CMS specialists that might be looking forward to working with them directly, so if you’re an EPiServer professional and meet the requirements specified on the recruitment page give them a shout!

If you’re not already familiar with EPiServer you’re probably not going to make it this round, but then again I suggest you start looking at it now. EPiServer AB is a really dynamic company recently expanding aggresively on the international markets – and rightly so. EPiServer is deserving every credit it can get. I can say that my journey with it so far has been really smooth and I’ve enjoyed every bit of it. So if you’re not up to it, get ready for the next round, in the mean time, grab yourself a login – download a copy of the documentation from the Knowledge Center, a demo license and join us on the Developer Forum.

It’s a great bunch, really fun to work with.

Posted in Blogging, EPiServer, Software Development, Web applications
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3.00 out of 5)
Loading...
| 9 Comments »