Quotes aka Bash.org/QDB clone
Watching movies, reading newspapers or surfing the internet i always find interesting quotes and to remember them, i just save them on a txt file. Sharing them is easy but getting feedback, well, let’s just say that there is no easy way to keep track who and what everyone likes while the quotes are in a text file so, i decided to install something like QDB. Unfortunately i only found 2 scripts. One written in Perl and one in PHP.
I don’t know Perl so, i decided to give a try to the one written in PHP. Well, it didn’t work so i decided to fix it myself. Looking at the code i was impressed but not in a good way. It was a mess of php and html, no way to make it to support short urls unless i modified all the files and more more other things so, i decided to write one myself ![]()
Normally something like QDB is very simple, very easy and it can be done in a weekend but i wanted to do a few things i’ve never had time to do like: writing my own URL routing mechanism, using mootools, using something like Java’s Hibernate… maybe a PHP form processor with support for UI components (if i have enough time
).
Reading on the internet about URL routing i found Axial Routing, i liked it and decided to base my code on that tutorial. I abused the singletons a little
and together with the router mechanism i wrote a few methods to read an XML configuration file which describes the parameters for each controller. This way i’ll have an easier life later when i will implement the input validation and data sanitization.
Now, the first step is done ![]()
Having an working routing mechanism, XML parser and an easy way to validate the data next step was finding something like Hibernate and i found Doctrine and Propel. Doctrine 2 is currently in development and different from Doctrine 1 but when will be ready will be closer to Java’s Hibernate so, i decided to use it.
Now i’m in reading stage so, in a few days i’ll start creating the database tabels and models. As soon as i’ll have them ready, i’ll write the authentication manager.
Next step: design the website to work with computer browsers and mobile browsers (webkit based… well Opera too) at the same time changing only the CSS Style Sheets without altering the HTML and/or Javascript file(s).
Posted: March 1st, 2010
at 9:17pm by Catalin C.
Tagged with hobby, PHP, programming
Categories: Blog
Comments: No comments















