Posts Tagged ‘design’

A brief overview of akrish.net’s structure

Wednesday, July 18th, 2007

Since about 4PM yesterday when I actually started working on this site, I’ve been thinking a lot about how this site should be designed and built. The initial idea that maybe a lot of newer coders have is to just hard-code everything. This would mean writing my entries in HTML documents, manually moving entries from page to page etc. It didn’t seem like a very productive way of doing things, which got me thinking about some other, easier ways.

I know that there are a lot of blog-hosting sites out there, so I started looking at them for examples. Obviously they don’t let their bloggers write their entries into the HTML. That just restricts the number of users they have to mostly coders. I realized they must have some sort of web form that allows users to make posts and that they probably have some backend script that reads in the data from the web form and stores it somewhere. This seemed like a pretty reasonable idea to me, not only because it would let me leave my code alone, but also because it would allow me to make posts at any computer using any web browser, whereas in the other model I’d only be able to make posts when I have ftp access to the files on my server. It’s also a lot simpler in that I can write all the parsing tools now, and then I don’t have to manually do anything except write my entry.

I decided that this would be a good way to go, but how would I store the data? I immediately thought about mySQL because I’m pretty familiar with it and it wouldn’t be too difficult to create a bunch of tables (one per category) and then store date, title, content of each story in those tables. I was confident that this would work, but I also thought about storing my data in XML. The XML way would involve one xml file per category, each with ‘story’ or ‘entry’ tags that contain the date, title, and content of the entry. I settled on the XML approach because I’ve been working a lot with XML on wenote (my other site that’s currently being designed) and at work, so I’m pretty familiar with it, and I know that it’s very easy to use. Another minor advantage is that I can easily write articles in here before I create my web form (described above) for making posts. For example, I wrote this article directly in my xml document, and even though I don’t intend to do this, it does make it easier for me to get the ball rolling on this site.

Seeing how this is my first blogging site, I don’t really know if this is a good design plan, but it seems like it’ll work. I’m pretty happy that I’m getting a lot better at thinking of alternative ways to design things, but I do need to think more about pros and cons of each idea before just jumping into one of them. I’ll probably take a look at some of the more popular blogging companies in the next few days and compare my design with anything I can see about theirs. I’ve got a pretty basic, prototype implementation up and running but I’m changing it all the time, so I’ll describe that once I’ve settled on it.