Thursday, April 26, 2012

NetBiscuit linking solution updated!

Yesterday I updated the NetBiscuitLinking project at GitHub with the latest version. The biggest improvement is that the project now contains a TBB that handles the conversion from BML to correct ComponentLink-tags. Other than that it now supports cell-elements in addition of the three elements supported earlier. Instructions how to use these new features are covered in the ReadMe-file of the project so I won't cover them here.

What's next?

There are still some bugs/features to fix, for example I noticed that the RegEx for cell-element in the TBB doesn't seem to catch arbitrary number of attributes. Apart from the obvious bug fixing, I think the next big thing for the project is to create a Java-version of the extended ComponentLink. I've also been thinking about outputting TCDL-tags and creating a deployer extension to convert the tags to either Java or .Net controls depending on the selected target language. In my opinion that would make the solution feel more natural for Tridion (as that is how the normal HTML-links are handled) but on the other hand that would also require an extra step with the installation of the deployer extension.

Please let me know if you have any other ideas how to improve the solution!

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!