How I Build PHP Applications
ericharrison.info
How I Build PHP Applications
1–10 of 56 posts
Re: How I Build PHP Applications
#2Re: How I Build PHP Applications
#3The reason I don't care is that I'm moving on, and now php seems like such a mess. I used to not mind the arrays, the lack of proper objects. The oddly named functions. The years of backwards compatibility. I've been learning python over the past few weeks and using it for a few projects and I'm in love. Next up is probably Ruby but it looks like perl to me so I'm in no rush.
I feel like python is a better language because I'm better. Exposing yourself to different ways of thinking lets you pick up methods that work better then you knew before. I didn't even know what I was missing.
Re: How I Build PHP Applications
#4Re: How I Build PHP Applications
#5Re: How I Build PHP Applications
#6I didn't know Ellis Lab had codeignitor.com pointing to codeigniter.com! From the article, I can only say the author didn't try CodeIgniter for a couple of hours otherwise he would know you are free to do pretty much whatever you want with the framework. I do use CodeIgniter for all my projects and I do write my own queries most of the time (I'm a query performance geek). I think the only thing you are not free to ru…
Re: How I Build PHP Applications
#7I like this kind of post, but its not a topic I care too much about anymore. Like the author php pays my bills too, and most of my work is done alone. He doesn't like frameworks for reasons I don't like frameworks, abstractions are leaky. I still use frameworks because I'd rather have a team of people work on some of core features I use (orm, url routing, view engines) then just myself. I've also found that some php…
Re: How I Build PHP Applications
#8I like this kind of post, but its not a topic I care too much about anymore. Like the author php pays my bills too, and most of my work is done alone. He doesn't like frameworks for reasons I don't like frameworks, abstractions are leaky. I still use frameworks because I'd rather have a team of people work on some of core features I use (orm, url routing, view engines) then just myself. I've also found that some php…
Re: How I Build PHP Applications
#9 ### Disable direct access to *.php except main index.php
RewriteCond %{REQUEST_URI} \.php
RewriteCond %{REQUEST_URI} !^/index.php
RewriteRule ^(.*)$ /index.php [L,R]
### Run the main /index.php controller file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php [L]
In my index.php, I include my common functions and then call the appropriate file/class depending on the hostname and url. I don't know why he dirties with index.php call with: path=$1&%{QUERY_STIRNG} - that information is available in $_SERVER[] variable.What this overall approach really means is that there is a single entry point for every single thing in my app. I can manage sessions, db, custom functions, login/admin, handle apis etc. through one piece of code that is (selectively) executed for every single request. I can also shutdown the entire site and all the operations with a "sorry we're down for maintenance" if I need to. I don't even store my php files in /www folder so you can't even access them directly. This approach can easily handle my traffic - 10k uniques/day on average, 100k/day on special events.
Re: How I Build PHP Applications
#10Summary; I don't like frameworks, so I rolled my own framework.