Recently I’ve been working through some optimizations to some code and realized that there are alot of programmers who don’t know some programming best practices. There is alot to do with the performance of a program with how the programmer wrote it. Here are some things to concider:
Read the rest of this entry »
I just wrote a new post (http://www.zonkio.com/the-javascript-injection-problem_685.html) on Zonkio. The post is about the dangers of javascript injection and understanding good coding practices when dealing with client server architecture.
Think you know PHP, MySQL or Javascript? Why not become an author at solutionbot? We are in the process of gathering new authors to participate in Solutionbot and help it to grow. If you are interested in writing articles or participating in helping it grow please fill out the following form.
At Qorvis we have just released it"s newest iPhone application for the inauguration. Features include:
- - How many steps you are away from the capitol
- - Where are the nearest ZAGAT rated restaurants from where you currently are
- - Where are the nearest metro lines and when will the next metro train be coming through
- - A list of events going on around you, how far are they from your current location, and how to get there
and much more. Here is a news release (among many) that we have done:
PointAbout featured on ABC News from Daniel R. Odio on Vimeo.
You can find out more about this application by going to http://qorvis.com/inauguration/
Something every web developer has to do a lot is redirecting your web page to another location. For PHP developers it usually looks like this:
< ?php header('Location: http://www.mylocation.com'); ?>
This works well enough as long as headers have not been sent. A common mistake for PHP developers is to use ob_start() to put all content into the output buffer. This can be useful for other functions such as compression, but it’s not a good habit to get into just to compensate for sloppy code. Here is a simple little function that can help redirect using multiple methods.
A simple function that we need every once in awhile is to download a file. The problem sometimes is that there are numerous amounts of browser plugins that will open the file within the browser itself instead of opening the browsers download manager and downloading the file to the hard disk such as microsoft IE’s office plugin that will display an excel spreadsheet or word document in the browser itself. Here’s a simple function that will send http headers to your browser and tell it to download the file instead of running in the browser.
Eclipse PDT has been around for awhile now and keeps getting better and better. Especially with their new powerful PDT 2.0 release. It has all the great features that the 1.x version had such as debugging in Zend or Xdebug, syntax highlighting, code completion and project outlining. However as this is a new release there are alot of new and improved features.
In the vast ocean of bad PHP programming books that serve only to perpetuate bad programming habits in the world of PHP, there are few PHP books that I would recommend more than George Schlossnagles’ Advanced PHP Programming. In Advanced PHP Programming George takes us all the way from simple (yet very important) syntax rules and standards, to advanced object oriented design patterns, profiling and debugging your php code, data caching, extending php and much much more. This insightful book illustrates the importance of security in PHP development and gives you many wonderful tools to develop large scale php applications. I would definitely give this book 2 thumbs up and highly recommend it to anyone wanting to break free from the typical PHP tutorial books. Anyone who wishes to get into the meat of PHP web development should read this.
I recently finished up a website for Qorvis www.fasterbettersafer.org. This is a website was for the United States Chamber of Commerce who is promoting better transportation in America. This site was built using Joomla as the CMS which allows our client to control almost every aspect of the site and update it on their own. Along with the beautiful designs Qorvis also built out a flash widget that can be placed on any user community or website.
One of the many common things we do as PHP developers is ftp files from one server to another. There are many times when I have needed this functionality and PHP has a wonderful API for ftp. Here is a quick wrapper class that I wrote that encapsulates much of the functionality for ftp: