RealSimpleBlog custom control (V0.1): Day 4

.NET, ASP.NET 2.0, Technical stuff
See comments
Nice job this weekend. I moved forward a lot, implemented major features, tested most of them pretty extensively, thought about the future, and learned new things.
So far, the features implemented are: Date, Title, Text, Frame, List. Features not implemented yet are: Images, Thumbnails. That should follow soon.
Another important feature implemented: Each entry has an attribute "archive-older". If this attribute is set to "true", no older entries will be displayed after the current one. However, if the attribute is set to "false", the current entry will be displayed, and then one older one. This older entry will also be parsed, and again, if "archive-older" is true, it will be the last entry displayed. If it's false, then the next entry is parsed and displayed, and so on. That allows the user to specify exactly what will be displayed on the main page.
Of course, in the archive page, the attribute's value will be ignored, and all entries will be displayed (in V0.2, possibly with a paging system).
One more thing: Entries are sorted from the newer to the older. To realize this, and instead of using the standard Sort method which was already present in .NET 1.1, I used Sort<>, which uses generics and a delegate method instead of using a IComparer. That was something new, and pretty easy too. What's nice with it is that you don't need to specify a whole new class (implementing IComparer), you just need a method to compare the entries.
I also thought about the whole CSS problem (see friday's post), and decided that in V0.1, I will deliver two skins: GalaSoft (which is the one I use on my website) and GalaSoft.PhotoAlbum (which is the one I use on my PhotoAlbum). The skins (CSS files) will be embedded in the control's DLL, and extracted on demand. The choice between both skins will be made by one of the control's properties. As for user customization, that will be implemented only in V0.2, by letting the user create a user-defined CSS file.
Finally, I learned about Visual Studio 2005 new XML feature, and it really helped me to generate a XSD file for the blog entry files. I wanted to have a XSD so that I could profit of XML Intellisense features: if you define a XSD for the XML file you want to edit, Intellisense helps you by showing you what elements or attributes are allowed at the current position. Additionally, the file is validated as you type, which helps prevent errors. Visual Studio 2005 is able to generate a XSD file automatically based on the current XML file. This is a great basis, especially when you're learning what XSD is.
Blog entry: XSD Schema
Mmmh just realized that something is missing in the schema: Images can have a URL (link) wrapped around them, as well as ALT and TITLE attributes. I will correct that tomorrow.
Last but not least, I started a new project... It's a web application which will help me getting the best of two worlds: QuickNews and AvantGo, two Palm OS applications to read RSS news, both having strengths and weaknesses.
More about that tomorrow ;-)
Previous entry | Next blog entry

Comments for RealSimpleBlog custom control (V0.1): Day 4