| Magamuse 1.0 Design Diary |
| July 26, 2003 |
|
While I've not been keeping up this diary as well as I should, work has been progressing steadily. At this point, we are feature complete with the magamuse before the rewrite. I've also added the backend code neccesary to support logins using a persistant user object that is stored in a session variable. Session variables are a very neat feature in PHP that allow any variable to persist for the user's entire visit. It does this by using a session ID stored in a cookie or appended to the end of the URL as you go from page to page. I've also started work on the user information/configuration pages and the first bit of the weblog code. I'm not sure if the entire planned feature list for the weblogs will be ready for the first release, but they should follow along soon after. I was asked to provide a list of features for magamuse in a messageboard post. Some of the features are visable to everyone. Examples of those are the article search, the news based on a phpBB forum, and the category filter on the articles page. Magamuse's backend has been pretty feature poor, but I hope to address that in this new release as well. The backend, at its simplest, will import an article in XML format into the mysql database. The XML file format is very simple, and requires only a few tags. It is documented, very tersely, here. Once it has been imported, it goes into the "sandbox." Here, we can review the article to be sure it was imported properly, and it remains there until we move it out to the article page. The new version of Magamuse will create a news story annoncing the new article, but in the current version we do that manually. Posting news stories to the index is as simple as posting to the news forum of the messageboard. The front page is simply an alternate view of the same data. That's really all there is to the backend. I intend to add editing capabilties so that articles can be edited without having to be re-imported from the XML. This will make it easier to make small corrections to articles that have been published. In a future post, I'll try to compile a bullet list of features for you, and get a few screenshots of the backend. Until then, thanks for visiting Linuxmuse! |
| July 10, 2003 |
|
I worked on the articles page today, and things went more slowly than they should have, mainly because I spent so much time fighting with jedit's CVS plugin, Gruntspud. It has a great interface, and seems very featureful, but it simply doesn't work for me. I tried it quite a few different ways, and each time I tried to do something that would talk to the CVS server on tserve, it would just throw java exceptions and abort. I tried new versions, old versions, and it does the same thing. Finally, I settled on using gcvs, which is a capable front end that feels similar to wincvs which I've used at work. I also worked a bit with Komodo under Windows, to see if its problems were specific to the Linux version. While it is quite a bit faster in Windows, it is just as buggy. The debugger is almost useless. Half the time it just doesn't work at all, and the other half it ignores my breakpoints. I'm very glad I didn't pay for this yet, and I don't intend to. I suggest anyone looking for a php IDE to look elsewhere, or at least try Komodo before paying. For the balance of my development time, I used jedit, which is still my favorite editor. I miss the "intellisense" like features of Komodo, but at least it is fast and stable in Linux, and it never loses work. Anyway, I promised to reveal the "big" new feature for subscribers. Subscribers will get to have a weblog at LinuxMuse! Brian and I are very excited about this new feature, and we hope it will get you excited too. Here's what I hope to have in the first iteration: -post entries via email, web, or WAP mobile phone -Short URLs for each user (probably weblog.linuxmuse.com/~username) -templatized layout with simple template editor -A small amount of storage space (amount undecided as of yet) for images -comments and karma I've not too much experience with what is available in some of the other services like blogger or the like, but I think our offering should be a nice addition to the site. If you have any specific features you'd like to see, please let us know! |
| July 8, 2003 |
|
Sorry I missed Monday, I was feeling under the weather and quite tired, so I took the night off. I was very productive tonight however, completing and debugging the new sub template code I discussed in my last entry. It seems to be working quite well, which makes me very happy. I was worried it would be too slow or hard to use, but it seems my worries were unfounded. Tonight I'll start on the templates and code for the articles page. Once that is complete, I'll have broken even, feature wise. Then I get to start adding new features. The first I'll be adding is a profile edit page. From this page users will be able to see their subscription status, make changes to their settings, pick a theme, and etc. Next I'll start the "big" new feature for this release, which I'll finally reveal here tomorrow, so stay tuned. Finding a perfect editor sure is a chore. I decided last week that I'd be willing to pay whatever it cost for a good editor that met all my needs and improved my productivity. Alas, I'm still searching. I thought I had found editor nirvana with Komodo, but it turns out that Komodo is quite a buggy mess, at least in Linux. I can't count how many times I've had it go "weird" on me in a dozen different ways. After spending days fighting with remote debugging, I finally got it working, only to find that it will crash Komodo in fun and interesting ways after about two sessions. The most interesting was when the editors entire client window turned gray. It seems to lose the ability to save files after a 20-30 minutes of use and I have to close and restart to resolve this, losing work. It is also dog slow, and has tons of repaint problems. My biggest complaint, though, is that they don't seem to update it very frequently. With the amount of bugs in the current version, I'm less than pleased with their release cycle, which seems to be about one new version every 6 months. I'm probably spoiled with the release early and often methodology of much of the OSS world, but I still think that 4 months without a bugfix release when your product is as buggy as this and costs $300 is pretty bad. They do have a trial version, and I've not paid yet, so I really can't complain too harshly. However, I love this IDE when it does work, and am truly disappointed that it is so buggy. |
| July 5-6, 2003 |
|
While working on templates for the article and news list, I discovered a better way of handling what I've been refering to internally as "blocks" and "lists." A block is defined as a bit of HTML that repeats for each news or article item. A list is the surrounding HTML location for the repeating blocks. If you look at the current linuxmuse.com index, for example, there are two lists containing multiple blocks: the archived news list at the far left, and the current news stories at the right. It was sort of a pain to make seperate template files for a block and list pair. After talking with Brian a bit, I decided to add the first bit of "smarts" to the template class. It was pretty simple to start with, only really being able to do simple token replacement. I added a bit of code in the tempalte constructor that will detect a tag {@mm_block} and remove any code up to {/mm_block}. That code will be placed in a second template class as a member of the parent template. It will then be very easy to work with a list/block pair, as both templates will be availalbe in one template instance and be contained within one template file. One thing I'm a bit worried about is how all this file IO will affect performance. So far, the impact is not too bad, but I worry that it won't scale to tons of hits with each user possibily having a different theme. We'll have to do some profiling to see how this works out during the beta. |
| July 2, 2003 |
|
I made quite a bit of progress tonight. I completed the class for processing templates and after fixing the usual smattering of buglets, it seems to be working correctly. The class maintains an unedited copy of the template in a member variable and automatically resets to this version if you attempt to replace the same token twice. This makes a "block" template that is used repeatedly on a single page very easy to work with. Another "problem" I tackled was that of session tracking. At least one of the new planned features will be subscriber only. In order to track a login, some form of state tracking is required. PHP provides a very easy to use session system, which uses the superglobal $_SESSION. By default, php uses text files in the webserver tmp directory for storing these variables. I wanted to use mysql for this. PHP's developers, being the geniuses they are, anticipated this, and allow you to create your own backend for the session manager very easily. I used a recipe from Oreilly's excellent Php Cookbook as a starting point, and after about 30 minutes of hacking, it seems to be working perfectly. I ended the evening with the "index" page displaying correctly using the new templates. I have a few more code changes to make here and there before I'll be happy with how everything integrates. Then I'll start on the articles page, which should go much more quickly. Once I've completed that, I'll probably make another template to test that things are working as expected. My end goal is to pick a "default" template based on the user's browser. It will display a simple version for those that use links/lynx, or a WML version for WAP browsers. I also want registered users to be able to pick a default theme. Brian and I are going to throw some themes together based on some of the cooler GTK themes. I'm still trying to gather feature ideas for the final release. I have a few in mind that I'd like to keep as a surprise until a bit later, but I'm always looking for ideas and feedback from you. Please post your ideas to the messageboard in this topic. |
| July 1, 2003 |
|
At this point, Magamuse's design is pretty solid in my head. I'm not sure about a few technical details, but overall I know where I'm going. So I had a code-breaking ceremony on the rewrite and started what I intended to be the first step. But, before I go into that, I'd like to detail why I've decided to do a complete rewrite instead of just enhancing the current codebase. When I wrote the current version of Magamuse, I was both in a hurry, and inexperienced. I made many irritating design choices that I'd like to get rid of. First, the layout and code are in the same files, and all interspersed with one another. That makes it quite a nightmare to make layout changes, other than those that can be achieved by editing the CSS classes. Second, the code isn't even close to object oriented. Finally, most of the new features I wanted to add would require major hacks to work with the current code. I decided it would be better to just start from scratch and make things more flexible and easy to work with. So, I worked on creating templates for the current layout, based on the layout HTML hidden throughout the current codebase. This set of templates will make up the first theme for the new Magamuse. |