Sunday, March 02, 2008

Web Application Project revisited

The most recent Sitecore project I was involved in, was quite a beast. Not in terms of the project itself, but how we had to cope to handle it in our daily working environment. The client had a handful of sites in the solution, all of them sharing functionality to some extent, and then each site had its own unique functionality bits as well. Now as I'm sure most anyone who's ever worked with Web Application Project in a VSS environment can imagine; a solution such as the one we had our hands on there, gets fairly big. And then imagine 2-3 separate teams working on the solution at the same time - getting exclusive access to the ever so central Project File becomes problematic in ways that most of all remind me of The Dining Philosophers. I am no fan of the Web Application Project, never have been and never will be. So I thrawled through SDN, just to see if there were any new developments in this area. I came across this one; VS2005 and Sitecore 5.3 setup without Web Application Project. Nice. I'll summarize what it says - basically it instructs you to move the "problematic" areas of your Sitecore solution outside your project scope (much like your /Data folder), and voila. I don't know though, and the article points this out as well... How will various modules and tools react to this somewhat dramatic change in structure? As I don't really have the time to test this out in any detail, I decided to just give something a shot. I pulled this tip off the web some time ago (I forgot where, sorry). If, as the SDN article states, the problem is isolated to two folders; "/App_Config" and "/Sitecore", there is a fairly quick and simple workaround that appears to be working - and is by far, less intrusive than moving the folders out of the directory structure entirely.
  1. Configure your explorer (not IE, your Windows Explorer) to "Show Hidden Files and Folders" (I won't post screenshots, as my current Vista installation is in Danish)
  2. Go to your root "/Website" directory for your solution. Mark the two folders; "App_Config" and "Sitecore", rightclick, and check the box "Hidden" (found right below readonly). It will ask you if this should apply to subitems as well, just say no to that.
  3. Fire up your favorite Visual Studio (I just tried this with Visual Studio Express 2008 and it worked fine), go "Open Website" (or "Open Website in Existing Folder", all depends a bit on what VS version you are using)

And there we go.

From here, I rightclicked the "Website root" and selected "Add ASP.NET Folder" -> "App_Code", tossed a few class files in there, made up a few references to this code from both .aspx pages and .ascx sublayouts... it all ran fine, and I never needed to manually compile (ah, the good old CTRL-SHIFT-B) once.

Does this qualify as conclusive evidence this will work? Absolutely not. But if the method of moving the folders out is "under evaluation", maybe this should be as well? Seems to me to be very straightforward.

I'll work with it for a while, see if I bump into any unexpected mishaps.

Wednesday, August 08, 2007

Sitecore 5.3.1 performing badly for you (too)?

Yea, I know it's been a while :P Been extremely busy on lots of projects of a non-Sitecore nature, so haven't really been getting new material to write about. Until today that is. Ok so, 2 colleagues were pretty much getting ready to tear an entire solution apart, looking for the source of a massive performance issue inside the Sitecore client. We're talking like 30 seconds+, for clicking any item in the Content Editor - fun stuff, I tell ya. Ok, so the SQL databases were not set to "Simple Recovery" - this on it's own caused a growth in the log-files to the neighbourhood of 3 gigabytes. And here comes me, thinking I'll save the day before lives are lost - and quickly switch it to "Simple" and sort out the performance issue. You know - two birds with one stone, kinda thing. But no. Instead I found myself getting caught up in endless log prowling activity, minuteously replacing single files one by one, to try and track down this problem. Eventually I turn to a colleague of mine, who has worked pretty much non-stop on Sitecore projects for the past 2 years - to see if he has a helping hand for me. Indeed. He turned me to a solution he had opened in the Sitecore support site, back in May 2007.
Change source to GUID on these /sitecore/templates/system/Templates/Sections/Appearance/Appearance/__Subitems Sorting – Source: {B01EB085-82BC-4D79-B15F-90EAB9E98062} /sitecore/templates/system/Templates/Sections/Publishing/ Publishing /__Publishing groups – Source: {D9E44555-02A6-407A-B4FC-96B9026CAADD} This should resolve your performance issue.
And sure enough. Without really having a clue why, this actually solved any and all issues we had with performance on the solution - just like that. Go figure. The support issue is closed with the words; "It is already fixed in Sitecore 5.3.1 and it is related just to Sitecore 5.3.1.". Who knows....

Tuesday, May 23, 2006

Item Name Length oddities

Was running some custom code that created lots and lots of items in the Master Database. Now nevermind the reasoning for now, but the code needs to create items in a "flat" structure (as opposed to a folder-based hierarchical one) and some of those names can turn out to be fairly long. Wasn't long before I encountered this one:

An item name can not be more than 100 characters in length at Sitecore.Data.Items.ItemUtil.AssertItemName(String name) at Sitecore.Data.DataManager.AssertItemName(String itemName) at Sitecore.Data.DataManager.AddFromMaster(String itemName, ID itemID, ID masterID, Item parent) at Sitecore.Data.Items.Item.Add(String name, MasterID masterID)

Now, ok... I can understand the fact that there HAS to be some sort of limit imposed on Item Name length. What eludes me though, is the "100 character" limit, when the database looks like this: I looked around, and this length isn't configurable anywhere I can locate (in Sitecore 5.1.x atleast).

Thursday, April 06, 2006

5.1.1.12 released

Well bit late on this news, but had a few busy weeks. Changed employer, I now work at Codehouse and this is probably going to get me heavily involved in various Sitecore projects. Hopefully this also means, my activity level will go up a bit on this blog ;-) Anyhow, 5.1.1.12 provides a few minor changes:
  • Fixed: Events for DataList controls (such as DataGrid, Repeater, etc.) do not work with Sitecore. Didn't encounter this one myself.
  • Fixed: Performance Counters throw access denied errors on Windows 2000 Server and Windows 2003(IIS 5 /Isolated mode) when someone tries to access the back-end. Mentioned this one, after spending a couple of hours trying to figure out what was going on. Excellent that this is now fixed ;-)

Other than that, it looks to be a minor bugfix release with no other major changes.