Some scripts and other programming ideas.
Firing a function from your browser The concept is as simple as firing a function from your browser, and it leans on PHP's call_user_func_array. I'm going to outline the concept as I have implemented it. This exact implementation may not work in your case, but perhaps you can adapt it to do so. if(isset($_GET['f'])... Read more »
Some simple suggestions Well I don't consider myself an expert, I do have experience with working with larger datasets and there are a couple of things that I always do to keep queries performing well. Optimize Queries with EXPLAIN Explain is your friend, get to know it well. If you take the time... Read more »
The Flow Chart CodeIgniter looks to be an interesting framework from the people behind Expression Engine. My interest was peaked when looking through their expansive documentation and coming across the following diagram: This is an excellent visualization of how a system could work in PHP,... Read more »
Happily, release candidate 1 of Xdebug 2.0 was released on Sunday. I've downloaded the .dll for my WAMP setup and things are looking good with this new version. If you're worried about the speed of your app, or happen to be looking for a decent debugger, head on over and check out the new version.
HTTP requests and data packets First, a quick look at just what we are talking about. Most of this is taken from CSS Sprites, Background Images and Website Optimization. Packet size and http requests From Web Page Design and Download Time, by Jing Zhi of Keynote Systems (seen here - pdf), cited... Read more »
Now I see that Tim Bray has written On PHP, where he states: ...based on my limited experience with PHP (deploying a couple of free apps to do this and that, and debugging a site for a non-technical friend here and there): all the PHP code I’ve seen in that experience has been messy, unmaintainable... Read more »
Before I get into this, and you serious programmers get too worked up, I realize that MVC was spawned in an Object Oriented Programming (OOP) world, but the fact is that the ideas behind MVC concepts can be applied to procedural code and simple applications that do not use OOP, and when done well can... Read more »
Posting in the weblog over at DOMscripting, Jeremy states ...you should just be building old-fashioned page by page submissions before hijacking them with Ajax, and then goes on to add Plan for Ajax from the start. Implement Ajax at the end. Planning In my experience with AJAX to date this method... Read more »
Client side Debugging JavaScript can be a hairpulling experience, but with the likes of Firefox and it's Javascript Console and Dom Inspector, one has some decent tools for cleaning up errors. And there is always the alert(someVar) when things get desperate. Server side The server side of things... Read more »
PHP Cake is a framework developed by Michal Tatarynowicz and based on Rails. With 8 releases this month alone, the code is rapidly developing into something that will be very useful for people who want to develop easily in PHP using the MVC model. There is already a short tutorial and a small set... Read more »
Get sorted Well, I knew this function existed somewhere in the back of my head because I knew to search for it. It did the rounds some time ago but it was so easy and useful that I thought what the heck, post it again. Stuart Langridge, a year ago, posted sorttable: Make all your tables sortable, a... Read more »
Sitepoint's web devlopment books have helped me out on many occasions both for finding a quick solution to a problem but also to level out my knowlegde in weaker areas (JavaScript, I'm looking at you!). I am recommending the following titles from my bookshelf:
I started freelancing by diving in head first and getting on with it. Many years and a lot of experience later I was still able to take away some gems from this book, and there are plenty I wish I had thought of beforehand. If you are new to freelancing and have a lot of questions (or maybe don't know what questions to ask!) do yourself a favor and at least check out the sample chapters.
The author line-up for this book says it all. 7 excellent developers show you how to get your JavaScript coding up to speed with 7 chapters of great theory, code and examples. Metaprogramming with JavaScript (chapter 5 from Dan Webb) really helped me iron out some things I was missing about JavaScript. That said each chapter really helped me to develop my JavaScript skills beyond simple Ajax calls and html insertion with libs like JQuery.
Like the other books listed here, this provides a great reference for the PHP developer looking to have the right answers from the right people at their fingertips. I tend to pull this off the shelf when I need to delve into new territory and usually find a workable solution to keep development moving. This only needs to happen once and you recoup the price of the book in time saved from having to develop the solution or find the right pattern for getting the job done..