Thursday, September 25, 2008

CorePoint.DomainObjects Update 1

Just posted a minor update of CorePoint.DomainObjects onto Sitecore Trac. Not much new under the sun, a bug fix and a few simple helper methods. 1) It is now possible to create a field such as: [Field("myImageField")] public Sitecore.Data.Fields.ImageField MyImageField { get; set; } This was always the intention, but implementation was faulty. It now works - knock on wood ;-) 2) StandardTemplate knows a couple of new tricks. .IsAncestorOf and .IsDescendantOf. They have similar functionality as Sitecore's own versions of same methods. Update 1 for Sitecore 5 Update 1 for Sitecore 6 Enjoy :-)

Monday, September 22, 2008

Update-3 (080912) Released

While doing my rounds on SDN I came across a new update for Sitecore 6. Unfortunately it doesn't appear to fix many (if any) of the issues that has been noted - some of which are showstoppers in my opinion - but it's better than nothing I assume ;-) Hopefully the list of known issues will diminish and we'll see Sitecore 6 reaching bug convergence this year.

Tuesday, July 15, 2008

Return to the not-so cacheable Control in Sitecore 5.3

Ok so,
It would appear that my previous post on this subject somehow managed to misdirect the focus from what was the original intention; point out the very troublesome issue of Sitecore Support's policy of recommending Sitecore 6 upgrades for Sitecore 5 problems.
The issue at hand was that of a certain Control not being cached. Well it was, but the code was also executed. Although asked specifically for workarounds, no alternatives to the upgrade route was presented. A short while spent in Reflector, a few config files and so on, leads me to believe there could be a workable solution.
This has NOT been tested outside my sandbox testing environment however, any feedback would be appreciated.
The "CachingEnabledControl". Inherit from this one and your work is 90% done.
Now all you need to do, in top of your CreateChildControls() method, is check if Sitecore has a cached copy of your control that it intends to show.
public class MyCacheableControl : CachingEnabledControl
{
 protected override void CreateChildControls()
 {
  if ( IsSitecoreCached )
   return;

  // Normal functionality here
Given the same setup as described in the original post, we now no longer incur the long delay (.Sleep()), and Sitecore outputs it's cache just fine.
Please DO keep in mind, this is probably UNSUPPORTED and MIGHT NOT WORK FOR YOU AT ALL - for whatever reason :P
Here's the source file. MyCacheableControl.cs

Monday, July 14, 2008

How do you DO?

As someone recently commented, this blog is not overall a very positive one. And while it was never my intention to write a fanboi blog, it doesn't have to be all negative either ;-)

Overall, I have grown to like the Sitecore product quite a lot. I find, that I am able to apply it to most any scenario my clients throw at me (though there was this one client of my former employer, who wanted the CMS to realtime translate her articles into all of the other installed languages... :P) - It helps me get the job done.

Now I am sure that most people who work implementing Sitecore solutions on a regular basis has adapted a way of their own. Either in the form of socalled "Helper" libraries, or maybe a drawer full of ready to go renderings for topmenus, left menus, breadcrumbs and whatnot. Me, as I often work with Sitecore jobs that involve tight integration with Sitecore data and external data (either in form of added Sitecore functionality, or migration from third party systems for instance), my most important tool in the drawer is the ability to work following modern OO practices - Domain Objects if you will.

I decided it is time for me to share something with the Sitecore community that makes it easy to do just that. Basically, this is my "5th generation" data layer if you will, although I would probably huff over anyone classifying this as generic "DAL".

Not only is it being shared, it is being shared in full. It is being released under the GNU General Public License v3, sources and all, in the hope there are other people out there that can see the benefit of the approach I suggest and will find it useful.

Here's a quick snippet of how Sitecore integration looks, when using it:

Enough rambling for now. Head on over to the official site in the Sitecore Shared Source Library to grab your copy, and to have a look around.