Archive for the 'design' Category
Wiki
Tuesday, March 21st, 2006I’m thinking about the idea to add personal page to each book author, movie actor and director, and so on (as well as adding a separate comments to all them). The question is - how to implement it? I vote for wiki. Then I need some wiki engine, that I can easily change for my needs - perfect variant would be if it has functions for working with database (database layer) that I can redefine - to use my users info instead of internal usebase, to store data in my database. Or even better - if I can take just the wiki-part (working with separate page, storing history) and use it alone, without all other functions. Does anybody know such wiki engine? Or maybe you have something else to suggest?
[I’ve already built such mini-wiki-engine for eMule Plus forum, but I prefer to use something more powerful if possible]
Update. I’ll probably look into TiddlyWiki first - when I get to this feature at all.
Hosting
Saturday, August 20th, 2005Shared hosting is a good idea for static sites, or for not-so-popular sites, but it’s not my case. After series of problems, where I couldn’t do anything except asking for support from hosting provider and waiting for solution from 15 minutes to 8 hours (each time the interval varied), I decided to upgrade the hosting. Virtual dedicated server offer from GoDaddy was attractable enough (good service + only $35 monthly, instead of $9 for shared hosting). I don’t really need normal dedicated with current server load, and I think I can work with VDS for at least next few months until I need to upgrade again.
So I moved the site. It took me several hours to properly configure the server, apache, php and other stuff. By the way - right now the site is running Apache 2.0, PHP 5.0, MySQL 4.1 versions. Will (probably) post later more details about configuring all this. I also promise to post all details about VDS itself, any arising problems and their solutions.
I almost finished changing site design, prepared for me by Denis Perekhrest, with help from Glen. IMO site has got much better and professional look now. Glen reworked HTML/CSS in such way that programs list (the content itself) moved to the top part of HTML, before tags panel - so it will look better in search engine results now - when search engines rescan the site. Right now Googlebot has scanned about 35k pages, MSNbot - 9k pages.
Counters cached
Thursday, August 18th, 2005I wasn’t smart enough to add caching to all counters. So it required some temporary script to add missing things - when I realized that. Now all tag global counters, tag per-member counters and program (XX users) counters are cached - they are recounted each time something of this changes. Of course recounting is only for things being changed.
This saves a lot of database time on requests, I removed all GROUP BY query parts, changing to DISTINCT when I need distinct results.
So, if it was something like:
SELECT tag, COUNT(id) AS count FROM tags_table GROUP BY tag WHERE …
Then now it’s:
SELECT DISTINCT tag, tagcount FROM tags_table WHERE …
I will probably publish database schema soon, I just want to check out that this is the final variant and I didn’t forget something else
Transactions
Friday, August 12th, 2005At the same time I am developing another (social) project, and the only thing I miss right now is DB transaction capability. Unfortunately, almost every hosting now uses MySQL version 3.23, which does not support transactions. So when you’re trying to add data into several tables and suddenly have been interrupted in the middle - you should care to fix the data, not database…
I think that when those projects become more popular, and I will move to dedicated server - I will change the queries to be transactional, it should save me tons of headache later.
Phew
Saturday, August 6th, 2005Changed internal structure to be more clean, properly CSS-based, and it even validates now, many thanks to Glen, I hope he will help me later as well to make the site better
Added search page, it works using Ajax technology (XMLHTTPRequest object, to be precise), like it’s already working in ‘add program’ page, there are 4 types of search - your programs, your tags, programs and tags from all users. It doesn’t look very user-friendly (yet), but it does the job.
Unfortunately, Opera doesn’t support XMLHTTPRequest object, so this won’t work for Opera fans. But they promised to add this feature soon (in their next major version?).
Some statistics meanwhile: 1540 added programs, 230 registered members, site got top 4700 hits per day, 1350 unique visitors (Google Adsense reports top 3600 ads impressions per day). Total revenues for now - almost $14
When it comes to $100, you receive your first check. Basing on my current stats, I estimate that this will happen in 5-6 weeks, or maybe even before that.
DB design
Sunday, July 10th, 2005First of all, I know that my database design is far from perfect, but it is working right now and I will not change it until website become very popular (if at all). And even then I may not change it, instead using caching methods to lower server load.
What we need: table for users, table for programs, table for tags.
I could have made separate table for programs and table for user-program pairs, but I did it simpler and made one table for programs which contains also user who added this program. That means that program name field is not unique value and I have to use GROUP BY a lot, which is a little slow, but right now it’s working good. The same thing is for tags table - tag name is not unique there. I’ll post here if there will be any changes in database structure.
Meanwhile this is it:
Members table id MEDIUMINT(8) autoincrement, primary key username VARCHAR(25) mail VARCHAR(250) password VARCHAR(32) = hash of password registered INT(10) = time() Programs table id INT(10) autoincrement, primary key user MEDIUMINT(8) = members.id program VARCHAR(250) = program name description VARCHAR(250) version VARCHAR(30) link VARCHAR(250) created INT(10) = time() Tags table id INT(10) autoincrement, primary key user MEDIUMINT(8) = member.id program INT(10) = program.id tag VARCHAR(30) = tag name
