13 November 2009
Optimizing Sitecore development
As mentioned in my last post, I’ve spent the best part of the last year optimizing the processes involved in developing Sitecore solutions in multi developer setups.
In this post I’ll describe the core areas we’ve focused on, and shortly describe what we’ve done. As I said in my last post this has been a team effort in the development department in 1508 A/S. I’m not going to mention any names (then I won’t forget any).
Establishing a shared standard
We’ve implemented a code bible setting standards for some of the basics in .Net and Sitecore development. This ensures a common way of developing making it easier to support etc. I’m not going to waste more space explaining why this is a good idea (since it’s just common sense)...
To ensure that everyone adheres to these standards, we are using StyleCop.
Sharing source
As any other development company we are using a Source control system – we are using SVN. We commit all of the code specialized in each Sitecore solution to SVN. We also commit a serialized version of the Master database (and if we make changes to the Core database this is serialized and committed too). We also commit other technical assets like external references.
Serialized databases
As of Sitecore 6, Item serialization has been available. Due to my involvement in the development of Sitecore Intranet Portal we had an early preview of this in version 5.3, and – though a bit unstable – it was clear that this had to be the future of DB-versioning in Sitecore development environments. It adds the ability to commit partial database changes – just like you do with the source code.
Standard Sitecore implementation
One of the things we brought from Enzym to 1508 was a standardized Sitecore solution called XPAC. This has been redeveloped from scratch using all of the best concepts, conventions and techniques. We now have an extremely strong foundation for all our Sitecore solutions, including a thought through frontend framework, a well tested .Net API and much more. This has been implemented throughout 1508 including IA and Design.
Handling deploy of development environments
One of the tedious and time consuming processes of developing Sitecore solutions is setting up a new environment (whether it’s a new solution, or you just have to implement some changes to an existing solution). And it’s not only boring and lengthy… if you work with other developers you also have to keep the same conventions when naming databases, IIS site, folder structure etc.
We have solved this by automating the entire process. We now deploy any solution to a developer workstation in under 30 minutes – including everything from setting up Sitecore, creating IIS site, restoring databases, adding entries in the hosts file, updating from SVN... etc! It has been the best part of this process.
Build and Test
The latest part of our setup is a build and test server performing nightly builds generating various useful reports. We use CruiseControl / NAnt. We are also using StyleCop in the buildsetup. Nice...
Roadmap
We are currently planning other initiatives including Configuration management and Deploy management. We are currently working on establishing a large scale virtual development / test / QA environment. This will ensure that we develop, test and run QA in environments as close to the Production environment as possible.
22:55 Posted in Sitecore | Permalink | Comments (2) | Email this
28 March 2008
Sitecore Crestone
Hi all.
Just downloaded the beta version of Sitecore Crestone - I can't say much, since Sitecore made me sign an agreement not to share any information.
Some major core changes have been made - first impressions are: Fast and Innovative...
All for now - I'll write more when Sitecore allows me to :o)
Anders
10:05 Posted in Sitecore | Permalink | Comments (0) | Email this
18 December 2007
Accessing parameters in Sublayouts
Currently I'm working on a project where we utilize the Parameters on a Sublayout-assignment to "attach" metadata to the sublayout. It's definitely not a standard Sitecore way to do it - however the project required this approach.
We then ran into a small problem. In Sitecore 5.3.1 there's actually no way to access the parameters from the Sublayout.... Yes way! Its a minor "left-out" by Sitecore, and they probably didn't notice it since almost no one uses the parameters.
Thanks to Kim Hornung (Sitecore) the problem was quickly resolved. Heres the solution:
1. Create a Class named "SublayoutWithParameters".
public class SublayoutWithParameters : Sublayout, IHasParameters
{
/// <summary>
/// Adds the parameters.
/// </summary>
/// <param name="parameters">The parameters.</param>
public void AddParameters(string parameters)
{
Parameters = parameters;
}
}
2. Replace the Sitecore class in web.config:
<!--control template="sublayout" type="Sitecore.Web.UI.SublayoutRenderingType, Sitecore.Kernel" propertyMap="Path=path" /-->
<control template="sublayout" type="MyAssembly.SublayoutWithParameters, MyAssembly" propertyMap="Path=path" />
3. Now you are able to access the Parameters passed by Sitecore in your Sublayouts:
protected override void OnInit(EventArgs e)
{
if (Parent is WebControl)
{
WebControl parent = Parent as WebControl;
// parent.Parameters is a string containing the parameters specified in Sitecore (formed as a QueryString)...
string param = HttpUtility.UrlDecode(parent.Parameters);
}
base.OnInit(e);
}
That should be it...
10:40 Posted in Sitecore | Permalink | Comments (1) | Email this
13 December 2007
Sitecore Logging
Hi all!
It has been a while since my last post – I know. As everybody else, my schedule has been filled with projects so my blogging time has been very limited. This post will also be very short - just thought I’d share a little trick for those of you tired of scrolling through Sitecore log files.
The small utility BareTail auto-updates, highlights etc. So far it hasn't locked the log-files preventing Sitecore (log4net) from writing entries.
Find it here: http://baremetalsoft.com/baretail/index.php
All for now...
Anders
14:24 Posted in Sitecore | Permalink | Comments (0) | Email this
22 July 2006
Other 5.3 First Impressions
Just make a quick search, and found this "First impression" on Sitecore 5.3:
Peter Johansen, Metamatrix, Sweden:
"Hat's off to the team at Sitecore, this version will shake the foundations of CMS systems for a long time."
http://usoniandream.blogspot.com/
I'll keep this post updated, once people start posting their impressions...
12:36 Posted in Sitecore | Permalink | Comments (1) | Email this
Sitecore 5.3 Beta – First impressions
First a little hiccup: The installer – it’s a nice feature… but why?? 99% of the developers using Sitecore, doesn’t need the help it provides. Sometimes it seems like the Sitecore guys get an idea, and totally forgets about the target audience. As a Danish commercial says “Vi ta’r bussen lissom målgruppen” (in english: ”We take the buss like the target audience”).
In my case, the installer meant that I tried to download the Beta 3 times, and I finally had to ask support for a zipped version (which they provided pretty fast). The problem was that I’m using a Danish version of Windows XP, and the installer was looking for a user called “Network Service”. Well – on a Danish Windows XP the user is called “Netværkstjeneste”… Grrr… (the zipped version took about 3 minutes to setup – including moving files around).
Ok – now I’ve got that out of my system, lets look at the system:
“Beta First Impression”:
WWWWOOOOOOOWWWWW!!!! It’s fast… If you compare it to 5.1 its beyond compare. Even on my small laptop!
Opening the Content Editor the first time still takes about 5-10 seconds but after that it works really really fast. The first thing you notice is that they’ve fixed some of the UI-annoyances in 5.1/5.2. The HTML-field load behaviour (Grr...) has gone, and there is no more waste of space. Brilliant!
Contextual tabs:
The “Contextual tabs” toolbar is very intuitive. You use 30 seconds to get the idea, and then you are cookin’ (well done Microsoft ;o)).
The Media Shop:
In 5.3 all media is placed in the database as blobs – great idea. I’m looking forward to see what possibilities it generates… Also – Sitecore extracts the essential Exif data. This can prove to be very useful in the future.
The Template Editor:
The template editor has got a long needed overhaul. It’s much better than 5.1, but we’re not there yet. The main reason its better (I think) is the increased speed of the Content Editor. You still have to save each time you create a field/section, and sorting fields is still a hassle. It still leaves me longing for the good old 4.3 days… ;o)
However – it’s a step in the right direction…
The Developer Center:
It looks ok, but – honestly – I’m not sure I’m gonna use it that much… I like the Xpath Builder though.
Other things:
It looks like Sitecore has improved a lot of small things throughout the system. For example: The Publish dialog now has a checkbox to always skip the annoying first page:
Conclusion:
Well done guys! You’ve listened to the target audience (except the installer issue), and it looks like 5.3 is going to be the best version yet of the worlds best CMS… When the system acts and performs like this, it leaves you wanting more.
12:07 Posted in Sitecore | Permalink | Comments (2) | Email this
I'm back...
It's bin a long time since my last post, and I have a bunch excuses; Too much work, vacations at the office, my cat ate my paper, my arms fell off… But really I’ve just been lazy, I guess…
Now it’s time to give something back to the Sitecore community, or Pay it forward :o)
Right now I’m testing the 5.3 Beta, and will be posting my opinions in the coming days – so stay tuned!
11:49 Posted in Sitecore | Permalink | Comments (0) | Email this
25 November 2005
Remove PrecompiledApp.config
The Sitecore 5.2.0.1 package contains a file called PrecompiledApp.config, located in the root-folder. Because of this little nasty bugger, you receive this Server Error if you try to add your own class to the solution:
Server Error in '/' Application.
The directory '/App_Code/' is not allowed because the application is precompiled.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
I tried all sorts of things to fix it, but ended up contacting Runi from Sitecore. He replied that I should hust remove the PrecompiledApp.config file - and voila! it worked...
11:51 Posted in Sitecore | Permalink | Comments (1) | Email this
23 November 2005
Sitecore Database Installer for .Net 2.0 (Enhanced)
We've experienced some problems with the DatabaseInstaller provided by Sitecore, so to save us some time I decided to develop my own...
- .Net framework 2.0 (!!!)
- SQL server 2005
- Sitecore 5.2.0.1
The application is compiled on these specs - and not tested on anything else... Feel free to download and use it.
If you have any requests or find bugs, feel free to post a request - I'll see if I can find the time the add/fix it...
NOTE: this application is highly inspired by the original Sitecore database installer... I have created an application which does the exact same job, and have just added some features and fixed some bugs.
And off course: THIS SOFTWARE AND THE ACCOMPANYING FILES ARE SUPPLIED "AS IS", WITHOUT ANY WARRANTIES WHATSOEVER WHETHER EXPRESSED OR IMPLIED.... yada yada yada...
Download the file here: Sitecore Database Installer for .Net 2.0 (Enhanced)
08:35 Posted in Sitecore | Permalink | Comments (0) | Email this
17 November 2005
DbBrowser...
Log in to the Sitecore Client, and navigate to http://www.yourdomain.com/sitecore/admin/dbbrowser.aspx
Voila...
17:35 Posted in Sitecore | Permalink | Comments (0) | Email this



