One of the things that I see a lot on websites of other developers is a resume or CV section. It seems only logical that a developer would want to show off their pedigree, but I’m guessing a lot of developers would not mind some extra work (and extra cash). Creating a resume for your website is relatively straight forward, just create it! You just create some HTML page and add the information and its done, or is it? Well I found myself thinking in the shower (weird place to get an idea) and I thought that it would be really useful to write some code that made the maintenance of a resume or CV easy. Useful code does not have to be unnecessarily complex, because it achieves a certain function or purpose.
I consider maintaining my CV easy when I can edit the content of my CV and export the CV in as many formats possible. So basically I want my CV stored in one place where I can update it on a continuous basis, and when needed download it in Word, for instance. I’m sure that what I am doing has probably been done many times before, but I guess part of being a developer gives you the freedom to create your own solutions. And something I think developers should always do is use their own IP (intellectual property) to create solutions that they themselves use.
So for the CV solution I am thinking of using a very basic XML document with a very basic structure of sections and subsections. Think about it, a CV or resume is made up of sections and subsections. For instance I have a personal information section with subsections for my name, address, etc. Thus you can derive a quick schema:
Once the CV is in XML I can pretty much do with it what I want both in terms of modifying its content and exporting it. I actually started this idea by typing it out using Inkscape, simply because I dont have Word installed on my desktop machine, but also because it allows me to draw diagrams and go mad. I started off by defining some generic XML structure (without using XSD):
CVSubsection Value
As you can see from the code that a CV could be made up of multiple sections and that each section could have multiple subsections. If you relate this structure to a more practical example:
Fredrik
Erasmus
BSc Computer studies
It fits into the structure quite nicely. Each section will only have a single attribute called “name”, and each subsection will also only have a single attribute called “name”, but the subsection will have a node value, whereas the section name will not. The question begs though, what if you want to say where you got your qualification from? How would you structure that? Well you could add a custom attribute to the section called “institution”, which would change your xml:
BSc Computer studies
The basic operations for the sections and subsections would mostly involve adding,editing and removing items. I think Linq to XML would perform this quite well.