Het nieuwe jaar is er en nu is het tijd om wat goede voornemens te formuleren. Ik ga niet zoals op een dozijn andere blogs een lijstje met ‘wat wil ik in 2008 bereiken’ maken maar heb maar direct de koe bij de horens gevat.
Wiigames.be, mijn blog die uitgroeide tot de meest bezochte website over de Wii in Belgiƫ is verkocht. De deal moet nog gesloten worden maar er is reeds een mondeling akkoord met 9Lives. Binnenkort eens naar de games afdeling van Telenet in Mechelen rijden met de nodige documenten en dan is de deal rond.
Stilaan beginnen we dan ook al aan een volgend, voorlopig geheim, project te denken en daar hoort de nodige planning bij. De eerste regels van het design document zijn reeds geschreven, het framework staat klaar om mee te beginnen ontwikkelen. Alleen het grafisch gedeelte moet nog bepaald worden maar dat is iets voor wanneer het design document klaar is.
En om alles vlot, correct en optimaal te laten verlopen heb ik maar wat geinvesteerd in een nieuwe PC die er binnekort aankomt, een fatsoenlijke IDE voor de ontwikkeling van het nieuwe project (Aptana Studio 1.0 Professional) en de volgende boeken:
- Getting Things Done: The art of Stress-free productivity
- Call to Action: Secret formulas to Improve Online Results
- My Start-up life: What a (very) young CEO learned on his journey through Silicon Valley
- The Long Tail: Why the future of business is Selling less of More.
Dat zal normaal wel genoeg leesvoer zijn voor de eerste 2 maanden van 2008.
Iemand nog suggesties voor boeken? Laat gerust weten!
In the past few days anybody who really digs javascript (and the inevitable Ajax) should have noticed these two announcements. And if you haven’t now you have!
- http://prototypejs.org launched along with the final version of Prototype.js v1.5. Finally a decent site for the prototype framework which still is one of my favourite javascript frameworks. The site offers good tutorials and finally some more than decent API documentation since that was the only thing prototype was lacking.
- Also Joe Hewitt, the creator of the famous and absolutely fantastic Firebug plugin for Firefox, took the time to write a debugging tutorial for Dr. Dobb’s. Be sure to check it out if you are somewhat into professional Javascripting.
I’ll be attending the Feweb Congres 3.0 this thursday in Edegem Belgium along with my colleagues at Inventis Web Architects. If you’ll be there, just drop a comment!
Nov 22
Geplaatst in PHP, Webdevelopment
Apache’s Mod_rewrite module has always been a difficult part of webdevelopment for me, wether it is because of it’s extensive use of regular expressions (which I finally master after several years of staring at regex tutorials) or the lack of response you get when something goes wrong. At work we use mod_rewrite on almost each project thus having a stable and solid base of rules to start from is a must.
Recently we decided it was time to implement something new with mod_rewrite i’ve been thinking about for a long time. Rewritten URLs with unlimited parameters by Ruben K. This allows me to rewrite a long and complex request URL into as many $_GET variables I need by using a simple PHP function. I’m not going to discuss the details here since thats something the tutorial by Ruben K. already does but let me tell you one thing … Ruben forgot something.
On a recent project I noticed that the debugger instance I was running in index.php got called several times while I only requested the page once. Strange no? The cause was quickly found … mod_rewrite! Finding the solutions took me weeks …
This rule is suggested by Rubens tutorial
RewriteRule ^(.*)\.html$ index.php?string=$1
The problem here is that ANYTHING gets rewritten to index.php … including broken images and other includes that should normally trigger a 404. Well “just fix your broken images” you’d say and yes you are right, but there are 2 problems with that. We can’t count on our client inserting only valid image links in our CMS. And second, firefox and other browsers have a habit of requesting favicon.ico several times during the loading of a page and guess what … if you don’t have a favicon it gets rewritten to index.php too!
I don’t need to tell you that this results in serious overload. I tried the modrewrite.com and sitepoint.com forums but nobody could give me a solid solutions until I found it myself. With a simple rewrite condition we are going to check if the url requested is a file that is not found and if so we rewrite to an error page. The final .htaccess looks like this, with the newly added rule in bold:
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} -f [OR]
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule .* - [L]
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.+)\.[a-zA-Z0-9]{3,}$ /error.php [L]
RewriteRule ^(.*)$ /index.php?string=$1 [L]
This fixed alot of problems we previously had with several sites and never knew where to look … mod_rewrite was to blame.
Sitepoint has recently teamed up with Ektron to have their members participate in an online survey about webdevelopment in it’s broadest meaning. The results are in, processed and now made available in PDF at the sitepoint website. If you own or run a webdesign/development business or if you work at one this is a very interesting read.