Now With Web 2.0!

Category "Development" Archive

Sep
06
2008
Google Chrome Logo

gBrowser? No, Chrome

Looks like the rumors from several years ago were pretty accurate; Google just released a new browser named Chrome that they have apparently been working on for several years. This thing has been in the rumor mill for ages but it was kept so closely guarded that no one but a select (very) few even knew the project existed. There’s been several dozen reviews/ criticisms written on the browser and it’s features, namely Incognito (a.k.a. porno) Mode where no history or cookies will be recorded for that window, the new super-duper awesome V8 Javascript Engine that multiplies the JavaScript performance of websites through this browser, and it’s speed both in page and javascript rendering. So many articles that I felt it worthless to write anything like that myself so I decided to link to what I found to be the most interesting ones here so you can check those out.

Fanning the Flames

The main reason for this article was just for me to be able to say that although I was initially against YET ANOTHER browser crowding the marketplace I’ve actually become quite smitten with the little browser that could (and probably will, in many respects). Not to use, oh dear no for my heart is still with another, but as I mentioned in that past ‘Google Browser’ article I love how things like this light the fire under everyone else. This is ultimately going to spur on so many new developments in browser technology faster than it would have happened otherwise. The fact that many things like the aptly named V8 Javascript Engine is open sourced is going to make progress all the faster and, according to their comic, they’re hoping that’s the case as well.

Another big reason that I’m now willing to welcome Google Chrome with open arms is because it’s using the open source WebKit Rendering Engine (also utilized by Apple’s Safari) so your sites should render pages the same as Safari. You are testing your sites in Safari right? Right?

Sorry, this post ended up having way more links than I originally anticipated. I think they’re all good reads/resources though so when you get a chance check them out! And as always i’d like to hear what you thought about this article, Google Chrome, and the state of web browsers in general either through comments or via the contact form!


Jul
06
2008

With a mixture of a few techniques added to the .htaccess or httpd.conf files, you can reduce the pageload and the bandwith usage of your website fairly easily. In the examples below i’m referring to expressions for addition to .htaccess, the http.conf file may be structured differently to do the same things. I’m setting this up in a standard LAMP setup with Apache 2 and PHP5. It will also wirk with versions of PHP4 but not all the following items work in Apache 1.3.

Apache Module mod_expires

The first thing to do is extend the amount of time text, images, css, flash and javascript are stored in the users cache. To turn this on we need mod_expires to be active, we then use the expression ‘ExpiresActive On‘. We then set a default expiry for everything which is generally set to 6 hours (300 seconds) from the time of access. This is set using the expression ‘ExpiresDefault A300‘. Alternatively we can set it to expire a set amount of time since the file was last modified using M instead of A as in ‘ExpiresDefault M300‘. Then, if need be, we can take a more granular approach to expiration times by setting expiration by filetype using the expression ‘ExpiresByType [mimetype] [A|M][seconds]‘. So to set GIF images to expire one week from time of access we’d use ‘ExpiresByType image/gif A604800‘.

FileETag Directive

The FileETag directive configures the file attributes that are used to create the ETag (entity tag) response header field when the document is based on a file. Because we’re manually setting expirations we don’t require these headers so it’s easiest to just turn it off using the expression ‘FileETag none‘.

Compressing PHP Pages

The following requires the PHP installation to have the zlib extension enabled, which it should be by default. We use the expression ‘php_value output_handler ob_gzhandler‘ to turn on compression of the final php pages sent to the users browser. It’s noted on the PHP.net website that turning this on via the php.ini ‘zlib.output_compression is preferred if available to edit.

Apache Module mod_deflate

As of Apache 2.0, there’s an available module that compresses the server output before sending to the user, called mod_deflate. This module must be turned on in order to work.  I set this up to compress by filetype so it looks like ‘AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript text/x-javascript application/javascript application/x-javascript‘. There are ways to set this up even on a per browser basis but since the browser negotiates with the server before any files are transferred, it’s not necessary.  If the browser is not compatible with compressed content, the server will provide the content uncompressed.

It’s also worth noting that Apache version 1.3 had a method for serving compressed content called mod_gzip.

Final Notes

Using these methods I’ve decreased pageload and bandwith on my site, after adding it my ySlow score for the homepage went from a D(64) to a B(83) and there was a noticeable increase in pageload speed as I was navigating the site. Many people stress that including this code into the httpd.conf file is better because it loads faster and isn’t reloaded every page load as the .htaccess file would be but my being on a shared environment I haven’t tried it myself..

Final Code

ExpiresActive On
ExpiresDefault A300
ExpiresByType text/javascript A2592000
ExpiresByType text/x-javascript A2592000
ExpiresByType application/javascript A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType text/css A604800
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpeg A604800
ExpiresByType text/plain A604800
ExpiresByType application/x-shockwave-flash A2592000
ExpiresByType application/pdf A604800
ExpiresByType text/html A300
FileETag none php_value output_handler ob_gzhandler AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript text/x-javascript application/javascript application/x-javascript

Jul
02
2008

Official Guinness World RecordFrom 18:16 UTC on June 17, 2008 to 18:16 UTC on June 18, 2008, 8,002,530 people downloaded Firefox 3 winning it the most downloads in 24 hours. What an amazing achievement, I’m glad I was able to be a part of it!

Check out the official release here and get your own personalized Download Day certificate.


Jun
18
2008

Anticipation

I’ve been (not so) patiently waiting for FF3 for months, I remember reading with joyful glee about the ‘awesome bar’ and increased performance. I was right there when the Download Day was announced and I pledged to download Firefox 3 on all the computers I use on that day to assist in achieving a Guinness World Record.

And now, finally, the wait is over!

It was exciting to see people pledge in the millions but seeing that number multiplied several times over the 24 hours of Download Day was truly amazing! At the end of that 24 hours the download number ended up at over 8 million, it’ll be some time before we know for sure we made a record but I gotta say that seeing the world come together and make such a splash was awesome even if we don’t get it.

Initial Reaction

I downloaded and installed Firefox 3 both on my computer at work and at home and now, after a solid day of getting a feel for it, I’m ready to say that the wait was well worth it.

I think the additional security and performance alone would have been enough to make this a successful upgrade. Instead of firefox taking up 120,000 K with a few tabs open in Firefox 2, it now takes 70,000 K with Firefox 3. Believe me, I checked! After hearing from more than one source that performance was a big priority I wanted to be sure that’s what I was getting. Now, so far I haven’t noticed much of an increase in pageload speed but it’s only been a day and having a browser with almost half the footprint it used to is a great start.

Plugins

I rely pretty heavily on all the plugins I have installed to get my work done. So needless to say having any of them unavailable would have been an inconvenience. My heart dropped when I upgraded and saw that the Firebug plugin I had installed was incompatible and disabled. Luckily the authors of all the plugins I used had released new, and some improved, versions of their plugins (including Firebug) compatible with Firefox 3.

Congratulations!

I would like to thank all the people that work on the browser and all of the various plugins for their hard work and dedication. Sometimes I forget how lost I am without Firefox and my installed plugins and i’m positive i’m not the only one. I read that Firefox 3 has already broken past 4% in market share after just 24 hours, that’s truly a testament to their work and dedication. I’m hoping that the trend continues and Firefox becomes the leading web browser, it truly is at the top of the heap in every way.


May
30
2008

After a long internal debate and a lot of work I’ve recoded this site from scratch to replace the WordPress engine I’ve been using since this blog started. There were three main reasons why I decided to do this, none of which were in any way related with dissatisfaction with WordPress. In fact, I’ve been thoroughly impressed at the quality of the WordPress system and it ends up being the first thing I recommend to people looking for a blog or an easy way to publish news on their site. "So what were the reasons?" you may ask, well allow me to explain!

SPAM Bad Would you like some SPAM with that?

The first big reason was the spam, oh dear God the spam! The comments table for this blog racked up over 32,000 comments and a grand total of 31 of those were actually legitimate. All I have to say is thank goodness Akismet is preinstalled, but even with that I still kept getting slammed with dozens of bogus comments a day. So I thought I’d add the reCAPTCHA captcha system to see if that’d help some. It did, but it was only successful at curbing the spam by half. Not great by any standards. So a custom solution was the best option, if no one knows what you’re running under the hood chances are they’re not going to (easily) know how to get around that system that’s in place.

I Think I Can I think I can, I think I can, I think I can

I’m no stranger to large development projects, i’ve built a custom (albeit fairly simplified) CMS and even an eCommerce engine designed specifically for artwork prints, but I’ve never created a full blog system. So naturally I thought it’d be a cool side project to work on during my free time. I gotta say that as I was coding along I realized countless little things that I didn’t consider when I started but that’s how it usually goes isn’t it? All in all I think it turned out pretty well. Still a few things I need to work on but the majority of it is functional and (hopefully) rock solid.

One Cog One cog in the gear

Perhaps the biggest reason I custom coded this is because I envision it eventually being a part of a bigger system of sites I have brewin in the ol’ noggin. Customization and reusability is a crucial aspect of my plans and what better way to go than to create the foundation myself from scratch. This way I know every digital inch of my site and will be able to integrate it infinitely better than I would a packaged solution.What sites you may ask? Well i’m not going to tell just yet, but rest assured it’s BIG!

So that’s it in a nutshell, just me tinkering away on my little corner of the web. Hopefully i’ll be able to get more and more added as time goes on, that’s the plan anyway.


Feb
03
2008

Joomla 1.5 Stable Released!I’ve been using the Joomla! Content Management System since before it was even called Joomla! back in the day when it was Mambo. It was the first and what ended up being the only Content Management System that I’ve used. So, it should go without saying that I was happy with it as a CMS solution. What I didn’t realize was that the Developer team had some high hopes and wild aspirations for a new release they call Joomla 1.5.  The beta for this release has been around for months now while it was developed and bug-tested but I never used it because I usually need it for client websites and wanted the stability of a more mature release.  So last week when I saw that it was finally released as a stable package I couldn’t wait to install and try it out.


Joomla 1.5 DownloadI have to admit that I was amazed at how much it changed (all for the better trust me). I can totally tell that the whole thing was rewritten for ease of use and manageability, I’ve already coded 2 websites with the new version and it was a snap to get up and running. All the pages easily validate to XHTML standards. It’s a wonder to me why they’re calling it 1.5, with the wealth of changes and updates I would have called it at least 2.0. Gone are the days of two WYSIWYG editors per article, gone are the separate classifications of articles and static pages and best of all, gone are the days of needing endless add-ons and modifications to make it work the way you think it should. Two such modifications that come to mind, first is the Search Engine Friendly URLs, it’s completely built in now and better than any add-ons I’ve seen for the 1.0.x release. Second are the WYSIWYG editors I used to have to add, with the improved media manager there’s really no need for it anymore.

All in all I’d have to say that this has been a huge success for the Joomla! team, it’s an amazing achievement made even better. Joomla is definitely one of the best open source  free applications I’ve had the pleasure of using.  Go check it out if you haven’t already!


Jan
31
2008
I’ve seen more than one article about this news released by Facebook last week being revolutionary, taking it to the next step, etc. In their developer Wiki, Facebook announced a betsJavascript Client Library that as far as I can tell is basically the same thing as the API they already had just available now in static HTML sites using Javascript. One thing I didn’t get is that they say it’s an easy way to create AJAX Facebook Apps but then they go on to say it should be configured in an iFrame.
 
Now, I’m not into the "social network" stuff in general but in particular I don’t get the draw of adding applications from these sites into your own. Fueling the already huge flames and adding more and more raw data to these vast networks just seems odd to me. But anyone using computers regularly, people with email addresses, facebook pages and the like are making these big sites bigger.
 
The mechanics of the social cloud and how it all integrates and interacts with each other is a magnificent achievement and it does serve to make life easier and/or better in some ways but where does it end?  How much of our lives are saved in these huge databases and why does a select few get to profit from it?
 
Just a few thoughts that were spurred by this recent news. What do you think about all this?

Jan
24
2008
MySQL Acquired by Sun MicrosystemsI wasn’t sure what to think about Sun acquiring MySQL but after reading this post by Kaj Arnö i’m feeling pretty good about the prospects. I didn’t know that Sun had a proven track record as the largest contributor to Open Source, that was a big part of what helped ease my mind. Java has been released under the GPL. So has the OpenSolaris operating system, Open Office / Star Office, the GlassFish application server and the NetBeans IDE tool. That’s a long impressive list of applications. Finally, MySQL will still being managed by the same people, and their charter is still the same so there should be no anxiety about them changing directions with MySQL.  I say good for them, it must feel great to get your hard work recognized like that.  I’ve been using MySQL for years and it’s the only database system I use in daily development and I couldn’t be happier. I’m excited to see where this goes in the future, only time will tell. A press release on the Sun website “Sun Microsystems Announces Agreement to Acquire MySQL” explains the acquisition in more detail.
Jan
22
2008
The Horizontal Way It’s not too often that I find a good reason to make a site scroll exclusively horizontally rather than the easier and generally more accepted vertically but I’ve found myself in that situation recently and finding support on the subject was minimal at best so i felt it prudent to share what I’ve found to help those of you that need a horizontally scrolling site. Any searches I tried in Google were referencing how to get rid of the horizontal scroll, how to avoid the horizontal scrollbar and just how bad the horizontal scroller is in general. That is until I found a website dedicated to it called The Horizontal Way. Not only is it a showcase of sites that have used the horizontal way of display, it’s also a fine example of a horizontal display in itself. Definitely worth a bookmark for that rare occasion when you want to go against the grain of web standards.
Jan
20
2008
Linotype Font Management - A free font manager that works like magic! Good Things Should Never End - I totally agree, fun site too. McCain Potato Parade - I never had this much fun with potatoes before. Opt Out PreScreen - Save a few trees and get less crap in the mail.
Jan
18
2008
Windows Explorer Previews are back!As of Adobe Creative Suite 2, thumbnail previews in Windows Explorer no longer are supported by default. I don’t know about any of you but for me these thumbnail previews are vital to everyday production. I can understand why it’s no longer supported, the included Bridge application covers previews, organization and so much more for the whole creative suite. That said, sometimes I just want a preview of the files in a folder and don’t want to have a whole separate program open to do so. Lucky for us there’s a solution to this mild annoyance. Follow the instructions below to get those previews showing up for you again. This was apparently developed for Windows XP but I can also verify that it works for Vista. Obviously, I cannot be held liable for anything you do to your machine so be careful and get help if you don’t know what you’re doing.
  1. Download this AI and PSD Windows Preview Files zip.
  2. Shut down all Adobe programs.
  3. Set a “System Restore Point” just in case something goes wrong, it’s an option located in your control panel.
  4. Unzip the file to C:/Program Files/Common Files/Adobe/Shell. You’ll see four files and a readme, you can delete the readme if you want.
  5. Double click on ‘aiicon.dll.reg’ and ‘psicon.dll.reg’ to run them. These files will automatically update your registry settings so you don’t have to go about trying it yourself.
  6. Restart your computer to let these changes take effect.
There you go! Preview to your hearts content!
Jan
17
2008
Last month Google announced the development of a new free tool called ‘Knol’ [stands for a unit of knowledge]. The goal of Knol is to encourage people who know a particular subject to write an authoritative article about it. Using it is by invitation only currently but based on their screenshot example it looks to be a lot like Wikipedia with a few rather significant differences. In their announcement on their blog, Google noted that this tool would highlight the author, which in my opinion is a feature that is sorely needed. It gives the information found on these pages at least some basis of credibility. Also introduced in the beta of knol is common social networking tools such as an area for comments, questions, edits, additional content and even ratings, giving the content even more credibility if you ask me. Check out the knol screenshot and the Google blog post about knol for even more information. I think this is just the latest in a long and successful string of Google taking a basic idea and adding a little Google magic to it to make their version a major competitor in that market.

Google Knol Screenshot


Jan
12
2008
I never even heard of a coding ‘framework’ until I found out about the multitude of lightweight and powerful frameworks for javascript such as jQuery and Prototype. So it goes without saying that when I found out there were some for PHP too my mind was sufficiently blown. After looking through a few different types I settled on trying one called Code Igniter because it looked to have the smallest footprint and was among the easiest to learn. Codeigniter PHP FrameworkThere are several different reasons i’ve used CodeIgniter ever since I found out about it a few months ago. Following is a few examples of why this framework is priceless to me and my productivity. One is the structure it forces upon you (in a good way) namely the Model-View-Controller dev pattern. Right out of the box I found myself writing code more segmented and documented, which is excellent for those functions that are reusable in future projects like image processing and user logging. Also I love the way the URLs are designed to be search-engine and human friendly right out of the box. For example instead of a URL like artwork.php?piece=23&order=ASC it could end up more like /artwork/23/asc/. One thing I’ve noticed regarding this URL rewriting is that it makes it a little bit more challenging to integrate it into other script packages like WordPress that have their own rewriting method. Finally, there’s a ton of common functions, classes and helpers that range from form validation to email to sessions. It’s all been battle tested and works as you would expect them to every time. I apologize for how broad this is but it’s just too huge of a reason to explain in detail, if you’re interested in reading more about these there’s a detailed user manual online here and it’s all in HTML so it’s also included in the zip when you download the framework. I’ve created about 6 sites with this framework and can’t count the number of times I was able to go back to a previous site and reuse a function that not only saved me time in development but also in testing because it was all done already. All in all I think the fact that I feel I’m more productive, efficient and create all around cleaner and more documented code is the reason I love using this framework the most.
Nov
13
2007
diesel.gifSaw an amazing web campaign for Diesel Clothes that blew me away. I wonder how long and how much that took to make! This is the kind of stuff i’d love to do, although the video portion would probably have to be done by someone else.

ajaxFlakesFound a cool blog-like resource of cool AJAX and ‘web2.0′ applications and tools over at ajaxFlakes. Looks like it’s only been around since August but it already has 6 pages of cool helpful tools. I’ve already added it to my del.icio.us, will you?

freelanceSwitch Finally, a friend turned me on to this freelance hub called freelance switch that I thought was a great implementation of a job listing database. There’s definitely no shortage of such sites out there these days but something about how this is laid out and organized really made it easy to use. I’m not much one to actively look for freelance gigs but if I did I’ll be sure to check out this site first!
Nov
06
2007
I recently had the opportunity to delve deeper into MySQL and how to optimize and generally better my database structure and queries. There’s a lot of information on this topic so I thought i’d share the top ten things that matter to me when creating and querying databases.
  1. Make the fields of your tables as small as possible, if you know a varchar field is never going to need a value more than 10 characters, set it to varchar(10).
  2. Always use auto Increment IDs in your tables, even if you don’t expect you’ll need them now they always seem to come in handy.
  3. Index all the fields you will be querying directly, especially those that you know an exact value for.
  4. Normalize the data structure as much as possible, duplicate data is just more for the server to wade through when running a query.
  5. If you’re querying something against a number e.g.( WHERE x = 12 ) there’s no need to use quotes around the number value, this actually slows down the query because it needs to convert from a string to a number.
  6. Limit the use of LIKE and the % wildcard e.g.(WHERE userName LIKE %Woods%) as this slows the query considerably. If you know that the value is always going to be at the beginning of a field, be sure to only use the wildcard at the end to speed up the query e.g.(WHERE userName LIKE Woods%).
  7. Multiple field indexes are good at speeding up queries but be aware that the first field in the index must be the first item from that index searched in the query or the whole thing won’t be used the way you intended.
  8. Be aware that there is a cost to indexing, both in time and space. Indexes speed up select queries but slow down deletes and inserts and basically any other queries that involve writing to the DB. The more indexes a table has the slower these write queries will be because the indexes have to be changed with the data. The indexes also take up disk space which may cause a database to reach its disk limit more quickly. The practical implication of both these factors is that if you don’t need a particular index to help queries perform better, don’t create it.
  9. Use the EXPLAIN keyword with your query to get important information on the query including the possible keys and estimated rows that will need to be searched to find a result. Especially handy with multiple table queries with joins.
  10. Be careful with joins, if used incorrectly they can slow down a query considerably. Values from the preceding table (as listed in the output of EXPLAIN) are used to find rows in the current table. So if you have three tables each with 1000 rows to search you’re actually returning 1,000,000,000 rows of data. Obviously this is too many and indexes should be employed to reduce this number to something more manageable.