JSON: What It Is, How It Works, and How to Use It

My apologies for the lapse in posting; I'm in the midst of finishing my first book for Apress (it's called PHP for Absolute Beginners, and should be out later this year), and it's been consuming most of my attention.

This week, however, I want to cover a topic that I feel has become an important part of any developer's toolkit: the ability to load and manipulate JSON feeds from other sites via AJAX.

Many sites are sharing data using JSON in addition to RSS feeds nowadays, and with good reason: JSON feeds can be loaded asynchronously much more easily than XML/RSS.

This article will cover the following:

  • What is JSON?
  • Why does JSON matter?
  • How do we load JSON into a project?
We'll also use our... read more

FlickrScrollr Explained: jQuery

This is a continuation of the FlickrScrollr explanation. In this post we'll explore the jQuery plugin behind the animation of the thumbnails.

Why jQuery?

I resisted the switch to jQuery for a long time, telling myself that using a JavaScript framework was some kind of copout—I was going to write my JavaScript from scratch, dammit! And, for a long time, I did exactly that. However, JavaScript is a finicky language, and it's supported differently on each browser. Testing was cumbersome, exhausting, and entirely too stressful. I felt like I was putting too much into the relationship. I lost sleep, lost my appetite, and left long, slurred messages on JavaScript's answering machine at 3AM.

"Hullo? Jahv-Scripp? I juss wann know: why you gotta make me use element.style AND element.currentStyle? You wanna know why? Iss cuz... read more

FlickrScrollr Explained: PHP

NOTE: Ok, so I totally rushed the FlickrScrollr out the door on Tuesday in order to keep the Instant Tip Tuesday series alive (because, let's face it, if I'd only made it three weeks before I missed a Tuesday—well, I wouldn't be much of a blogger at all, would I?). However, in doing so, I didn't really explain how the plugin works or any of the advanced configurations of it. In an effort to rectify that, I'm going to break the code down in this post.

The Goal of This Post

First, I'd like to readdress what FlickrScrollr is and how it works, then I'd like to pick apart how the plugin was built. Because this plugin uses both a PHP class and a jQuery plugin, this writeup is going to... read more

Reading RSS with PHP

The Problem
The Internet seems to be getting easier everyday. With sites like Myspace, Flickr, YouTube, and Twitter, you can essentially create a full-on interactive web experience for free and with no knowledge of web design. This is great, but it limits your creativity, and it also requires your readers to remember multiple separate URLs.

On the flipside, you could reverse engineer all of these tools and create your own versions of them for use on your personal website, creating the same immersive user experience you get from using social tools, but that's a good deal of time and effort. The learning experience of building such tools is great, but we don't always have hundreds of hours to dedicate to rebuilding Flickr's robust photo management. Besides, doesn't it seem a little silly to reinvent the... read more

  • «
  • 1
  • »