Archive for the ‘webdev’ Category

5 Performance Tuning Tricks for jQuery

5 Performance Tuning Tricks for jQuery

In a recent post, I wrote that developers should better optimize their JavaScript. Well, that’s easier said than done, so I’d like to get down to the nitty-gritty and talk specifically about optimizing jQuery. Please note that this is not about performance tuning of the jQuery library, rather it is about better engineering the code we use to interact with it. If you’re not a jQuery programmer, and you have no interest in joining the fad, don’t worry—most of the concepts here apply to JavaScript and general programming as well.

1. Beware of class-only selectors

A great part about using a JavaScript library like jQuery is its selectors. But before you use them all over the place, stop to think: what are the processing costs?

Basically, jQuery defines all the elements on a page as a huge JavaScript object, … Read more…


Too much Javascript? Here comes WebKit and the new Safari

Too much Javascript?  Here comes WebKit and the new Safari

Let it not be said that I never fall victim to a web fad: AJAX, jQuery, SEO‚ÄîI was there with bells on. So when everyone started hating Flash and doing all web animation with HTML/Javascript, I jumped right on board. I thought it was just great! You didn’t have to lose any SEO, and most importantly you never had to open that awful Flash GUI.

But have you noticed? EVERYONE ELSE IS DOING IT! There’s just too much Javascript on the internet these days, and it is bringing many browsers to a halt. My MacBook is less than a year old (2.1GHz, 1GB mem) and Safari has been crashing frequently. In Firefox I can only have three or so tabs open before serious lag1. While I don’t have a super gaming computer, my computer is better than the average user’s, and I … Read more…


Spaces in Mac OSX Leopard – Best Workflow

Mac OSX Leopard

At first glance Mac OSX Leopard looks like Tiger with a new, sleeker skinning. A few new applications are available, and a few others are broken, but overall basically the same thing. That is, until you discover the Spaces command.

Spaces are great, they’re like the Expose flyout but taken up a level. With Spaces, you can arrange all the windows on your screen, all the clutter, into multiple, separate areas. Each of these areas functions like its own desktop, when you use the Expose flyout, only the windows in that Space are seen. And the best part is that you can set programs to open by default in certain spaces. I love this feature, since I am always working on such disparate things. Now my web development can be separate from my web design and … Read more…


jQuery Animation and SEO

jQuery Animation and SEO

I put a bit of jQuery on my site, animating the links in my art portfolio section. Check it out. I really like jQuery actually, it looks nice, and its a great way to liven up a site’s visuals without using Flash and losing all that SEO.

The problem is that jQuery, which is essentially JavaScript, is also not very SEO friendly. You can use it pretty much the same way as Flash, in limited quantities where you don’t care about searchability. However, when you want to make it SEO friendly, it operates pretty similarly to AJAX. Basically, you don’t want jQuery to be the only way you access any content. Any content that is accessed with jQuery also needs to have hard links, anchor tags with the href to make the search engines happy. These anchor … Read more…


Lower Case Months Plugin for WordPress

Wordpress plugin

This WP plugin is kind of pointless, since you can modify text capitalization via the CSS text-transform property: lowercase, capitalize and uppercase are all options. more info

While doing some WordPress customization recently, I ran into a problem forcing lower case output for the month headers in my blog archives.

It seems like a simple task but it turns out the WordPress templating engine prevents you from returning any strings from functions while within a template. You can use all the PHP you want, and call any function you want, but the functions in the end work by echo’ing out a result, rather than returning it. This seems like a pretty good security move, but it turns out to be pretty annoying when you’re used to object oriented code and you want to do something simple like make an … Read more…


Cache-Control and AJAX

Cache-Control and AJAX

Here‚Äôs some free advice: don‚Äôt forget the cache-control tags on any server-side AJAX page. I was doing some Geodesic Solutions customization today. Anyone who has dealt with Geo will tell you it‚Äôs the biggest pain to customize, and that anyone who mentions Geo and best-practices in the same breath must be joking. Basically, the only way to customize it is through a series of patches, or by reworking the Geo class files (which will be overwritten in any upgrade). Geo doesn‚Äôt allow any mysql calls within the templates (I suppose it‚Äôs a good security measure), and since I didn‚Äôt need to do too much database work, I decided to do all the database stuff with AJAX. So far so good. Basically, I was trying to populate a select box with a bunch of options, and I found out that IE … Read more…


Quickbooks Integration with nuSOAP

Quickbooks Integration with nuSOAP

I’ve been working on integrating an online shopping cart with in-house Quickbooks. I’m using SOAP (nuSOAP) and cURL / SSL to pass QBXML (Quickbooks XML) data through a port. Muchas gracias to Ryan Szrama of the open source project Ubercart for his extensive notes on Quickbooks / SOAP integration.I developed a pretty nice php class to pass data to the Quickbooks RDS server but the cURL requests kept failing, even though I opened the ports through the router and I had the computer they were passing data to on an FQDN DNS IP. It turns out I had to pass the IP through the server as well (SSH tunnel to: etc/hosts). It’s all good though, I would have liked to wrap up this project today, but it will have to wait for tomorrow.


Why WYSIWYGs Suck

It’s a new year, and what better way to start off than with a lengthy rant. Strap yourself in.

People often ask me why I am so concerned with writing standards compliant HTML, and they have good points, mainly that it takes longer to develop something that is compliant, and the only people who really know if it is are other developers. I’ve always been in favor of standards compliant code, but to be honest, for a long time I didn’t even know why I did it, it was really just nerd lore to me, the big nerds wanted it, and I agreed blindly. You might think that a production environment with constantly encroaching deadlines would make me throw my compliance to the wind, well to a certain extent it does (although I write standards compliant XHTML out of habit, I do not have time to fix other people’s … Read more…


SEO Friendly AJAX

SEO Friendly AJAX

AJAX isn’t typically thought of as being very search engine friendly. This is because search engines don’t process any JavaScript, which AJAX is built upon.

I’m using a ton of AJAX on this one search engine site. In fact, the search engine itself is done in AJAX since it makes for quick page loads and overall a great user experience. This is a big problem because we also, of course, want all the pages that our search engine indexes to be spidered by Google and the other search engines. Besides the AJAX search, the only other way users reach the bottom level pages is through an advanced search form, which of course Google can’t spider.The solution is to make a hard link search engine that parallels the AJAX one. Since the search begins with selecting a state, I put … Read more…


Dating Software Customization

I’m customizing this dating software for three different sites. Basically each site will have a different stylesheet and limited differences in functionality. It’s somewhat difficult to develop since a lot of the core functions are hashed, so we’ve had to make some compromises on what we can and cannot modify. Overall I’m actually happy that we went down the software modification route, since developing this from the ground up would take much longer, especially the streaming flash video chat.