PHP and JavaScript Interaction: Storing Data in the Client, part 2

In the first article in this series, we developed a simple PHP function that dynamically generates a JavaScript array and populates it with external incoming data. In this article, we will develop a real world application using this method, in the form of a news ticker.

This is the second part of the series "PHP and JavaScript Interaction: Storing Data in the Client." Welcome back! If you've been following the concepts covered in the first article, then you probably have grasped the underlying ideas behind the approach taken to store data (text files or database records) directly in JavaScript arrays, avoiding additional or unnecessary server loads.

Having thoroughly covered the pros and cons of this method, we made an attempt to develop a simple PHP function that dynamically generates a JavaScript array, populating it with external incoming data, that is, file data or table records. Once that structure was created, the question spinning in our minds was the following: can we develop a real application where this method finds its place?

The good news is that we're able to implement several applications, at least, at a limited scale. Here, we're not pointing toward the big project that will change your life as developer. Instead, we're aiming to create small projects and put this approach to work, taking advantage of its benefits. So, keeping that idea in mind, in this second part, we'll create a text file-based JavaScript news ticker, as a learning process to introduce a practical use for the technique previously defined. Are you ready to work with a pinch of PHP and JavaScript? Fine, let's get started!

Chris Charlton

Chris CharltonChris, Los Angeles' CSS & ActionScript guru, successfully cannonballed into web development in the late 90's. Always caught up with the latest in Flash, Dreamweaver, Fireworks, and XML, Chris authored premium articles for the largest Dreamweaver/Flash community (www.DMXzone.com) and produced WebDevDesign (iTunes featured), a popular Web Design & Development Podcast. Somewhere, Chris finds time to run an authorized Adobe user group focused around open source and Adobe technologies. Being a big community leader, Chris Charlton remains a resident faculty member of the Rich Media Insitute and lends himself to speak at large industry events, like JobStock, NAB, and FITC Hollywood.

Brain cycles from Chris are always Web Standards, Flash Platform, and accessibility.

See All Postings From Chris Charlton >>

Comments

Be the first to write a comment

You must me logged in to write a comment.