Wednesday, April 18, 2012

2390 Lines of Templating

Today I actually finished something I've been planning to do for almost a year now. Well, at least almost. It still requires quite a lot of additional work to make it nice and clean. So what am I talking about? Of course about TOM.Net extension library/start-up kit/whatever you want to call it. Essentially it is a collection of useful methods and classes that Professional Services has used in several projects in the past years, even the good old TemplateBase is still there. Anyone who finds their code from the project feel free to boast in the comments below :)

In the beginning there was me, ReSharper and about 5000 lines of really messy code. Today after a few really efficient days I managed to clean that up into less than a half by doing some major refactoring and removing any methods that I deemed useless or implementation specific. While doing that I tried to make it as user-friendly as possible by dividing different functionality in specific classes so you should be able find what you need quite easily. Of course some of you probably don't agree with some design choices that had been made (e.g. some people hate extension methods and there are quite a few in this package) but then that's your cue to make it better ;)

This project is intended to be a starting point for any new TOM.Net projects. It is up to if you want to use it only as an example, pick up only the stuff you need or just build your project on top of it. I think it is especially useful for all the Tridion newcomers as it is packed with concrete examples. One thing to keep in mind that if you only reference to this project in your own one you need to put the DLL of this project in the GAC or use ILMerge to combine it with your own (it is a quirk of Tridion that it doesn't handle assembly references very well)

Also note that the project is still very much work-in-progress (just have a look at any class in Utilities, especially Navigation one) but I wanted to release this already as I have limited time to work on it myself. I hope some of you will pick it up, fork it and improve it. For example most of the extension methods are missing comments which I think could be very important for people not so familiar with TOM.Net.

So, without further ado here is the project. Please contribute and fork it!!

Ps. Sorry about a short and a bit messy post, I will write about some examples how to really utilize the project and to explain some design choices when I have some free time again :) Until then, please let me know any ideas and suggestions for the project!




1 comment:

  1. Wow, just saw this, Good job! I think I have a new base project for templating

    ReplyDelete