Sometimes you need to think out of the box.
At work we had a new client for whom we would design and host their websites. They would be using our content management systems to manage their web content.
My role on the project was to migrate their historical content from their previous third party content management systems. The project plan was broken into 3 waves. The first wave only had one third party system, while waves 2 and 3 had two third party systems I needed to migrate. The client had been utilizing a rainbow of management systems.
The first wave was easy. We had worked with this vendor before and already had a parser in place that could digest their XML and inject the content into our own management system. All I had to do was some configuration changes.
My “aha moment” came in wave 2. We didn’t have an existing parser for these two vendors as we had in wave 1. So I started work on creating them. As I was reviewing the XML, I noticed it was very similar to the wave 1. The data we needed was just put in different places. That’s when the Aha Moment came.
I figured it was easier and faster for me to use XSLT to transform the vendor XML to match the XML that the wave 1 parser was developed to digest. What was planned to be a 2-day coding job was boiled down to 15 minutes. Actually, reviewing XSLT took me longer than actually creating XSLT transformation.
It was a trick I continued onto wave 3 because it worked so well. And now, whenever I need to do a onetime data-dump into our content management system with XML, I do something very similar.
[[ Updated 2011-01-11: The reason why I would call this out-of-the-box thinking is because the original requirement I received for this project was to create a 2 new parsers for wave 2. Instead, I kept with the spirit of the request, which was to migrate their data. Just following orders and doing what your told isn’t what’s always best for a project.]]