Monday, August 23, 2010

PHP OOP

I found a great site for learning object oriented php development.

php oop

Wednesday, April 28, 2010

A faster website

How To Optimize Your Site With GZIP Compression

Check out this article and give it a try for yourself.
I stumbled on this when I was reviewing my google developer dashboard for some of my sites. Google told me they were slow and i should consider this option to speed them up.

I did some looking and voila...google was right again!

With php, just add 2 lines of code to your webpages.
At the very top add this:
// start output buffering at the top of our script with this simple command
// we've added "ob_gzhandler" as a parameter of ob_start
<?php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();
?>

At the very bottom add this:
// end output buffering and send our HTML to the browser as a whole
ob_end_flush();

Just by doing this our webpages appear less choppy as they render.

Here is a complete article and direction on how to use this:
How To Optimize Your Site With GZIP Compression

Another article:
http://dev-tips.com/featured/output-buffering-for-web-developers-a-beginners-guide

Friday, April 23, 2010

Website Image Gallery

I found a great image gallery add-on for website image galleries. It builds on the zoom-image idea which i was using a lot lately but provides a little more flexability and some themes to style the image boxes however you like.

The documentation provided on the site was quick and easy to use and I had a gallery set p in a few minutes.

Hope this helps: Rokbox
http://www.rocketwerx.com/products/rokbox/documentation

Monday, February 8, 2010

Multiple browser versions

If you need to check how your site looks in multiple versions of a browser, in case you are using png images for example, here is where i got my info:
There are a few ways to do this,
1. partition your drive to run vista or windows 7 on one and xp on another.
2. use a virtual desktop: http://www.microsoft.com/windows/virtual-pc/support/virtual-pc-2007.aspx

Once you determine how your going to run xp and vista or 7 on the same machine, you should get this to run multiple versions of ie easily.

PNG support for developers

I recently began using more and more .png images in my development. A client told me of a problem and I knew it was because of browser versions not supporting .png graphics but didnt know why. I even included a png fix javascript in my head to solve the issue...

The png fix that i used turned out to only fix png images that
were within an img tag. I was using png images as a background image.

Once again, i knew a fix existed already and i just had to find it.

Hope this helps you: http://jquery.andreaseberhard.de/pngFix/index.html

By the way this led to another problem...How can i test my site in previous versions of a browser? see this post for info.

How can i display blog content on a website? JSON?

I was designing a site recently where the client had a blog and was thinking that they would like the blog posts to appear on their website as they were update in blogger.

This seemed like something possible and that someone must have done before, and so with some research i found out how.

In solving my original problem, I found that we can use json to read and output whatever someone posts on a blog to a website. It works much the same way that you can read an xml file and output the contents to a website.

Here is how i used it and what i found:Using JSON in the Google Data Protocol

Welcome to my developer blog

I thought it was about time for me to start a blog. My goal is to document whenever I find something useful or interesting as far as web development goes and write about it, for anyone else who might be interested, to read and learn about.
I hope you enjoy my posts and leave comments because i would love to hear what you think.