Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHP-it.net:
Creating a chat script with PHP and Ajax (Part 2)
Apr 04, 2006 @ 12:09:48

PHPit.net is following up This previous article with the next in the series today - Part Two of "Creating a chat script with PHP and Ajax".

Welcome to the second part of the 'Creating a chat script with PHP and Ajax' series. It's been a while since the previous part, and much has happened since then. 37Signals, a very popular "web 2.0" company, has released a web application called Campfire which is actually a chat script based on Ajax and Ruby on Rails, and it has many of the features we'll be implementing in this article series.

In this part we'll start from scratch again, but this time we'll start with a solid structure. Unlike the previous part, which was more or less a hack job, we'll start using JSON and several other libraries to make everything easier for us. I will also show you how to add a few more features, like a user list.

It's definitely good to see that they aren't just building on the previous structure, but setting asside time to really plan out the application before getting started. Instead of hacking together an application that "works, but just barely", they opt for using solid libraries like ADOdb and Prototype for the power behind the scenes.

Right off the bat, they show you how to set up the filesystem structure, the database structure, and the basic framework of PHP code for the client to interface with. From there, it's just the creation of the other pieces of the puzzle - the interface, functions to handle the login form, and a method to ping the server for new messages, and, of course, the backend to handle it all.

tagged: create chat script ajax adodb prototype json-php create chat script ajax adodb prototype json-php

Link:

PHP-it.net:
Creating a chat script with PHP and Ajax (Part 2)
Apr 04, 2006 @ 12:09:48

PHPit.net is following up This previous article with the next in the series today - Part Two of "Creating a chat script with PHP and Ajax".

Welcome to the second part of the 'Creating a chat script with PHP and Ajax' series. It's been a while since the previous part, and much has happened since then. 37Signals, a very popular "web 2.0" company, has released a web application called Campfire which is actually a chat script based on Ajax and Ruby on Rails, and it has many of the features we'll be implementing in this article series.

In this part we'll start from scratch again, but this time we'll start with a solid structure. Unlike the previous part, which was more or less a hack job, we'll start using JSON and several other libraries to make everything easier for us. I will also show you how to add a few more features, like a user list.

It's definitely good to see that they aren't just building on the previous structure, but setting asside time to really plan out the application before getting started. Instead of hacking together an application that "works, but just barely", they opt for using solid libraries like ADOdb and Prototype for the power behind the scenes.

Right off the bat, they show you how to set up the filesystem structure, the database structure, and the basic framework of PHP code for the client to interface with. From there, it's just the creation of the other pieces of the puzzle - the interface, functions to handle the login form, and a method to ping the server for new messages, and, of course, the backend to handle it all.

tagged: create chat script ajax adodb prototype json-php create chat script ajax adodb prototype json-php

Link:

Randy Boland's Blog:
JavaScript, JSON, and PHP
Jan 27, 2006 @ 13:27:21

With more and more talk about JSON coming up, there are blog posts like Randy Boland's latest, his brief look at this technology and his it can interact with PHP.

John first mentioned JSON about a month ago, but at the time I had no inclination to look into it and find out if it was something I could use. It came across my radar again today thanks to a Particle Tree article that I never finished reading, but that's not important. The long and short of it is that JSON is really just a fancy name for eval-ing JavaScript objects - one of those "why didn't I think of that" kinds of things.

I talked with one of the guys at work about writing a function in PHP that would take an array and generate the appropriate code, until I came across the (seemingly de facto) "official" JSON page. He's got references there for pretty much every language you'd expect to do web development in (and a few you wouldn't) - including JSON-PHP, which does exactly what I was going to.

He also notes that combined with the power of the Prototype Javascript library, a simple, Web 2.0-ish application can be made in no time flat...

tagged: json library prototype javascript json-php json library prototype javascript json-php

Link:

Randy Boland's Blog:
JavaScript, JSON, and PHP
Jan 27, 2006 @ 13:27:21

With more and more talk about JSON coming up, there are blog posts like Randy Boland's latest, his brief look at this technology and his it can interact with PHP.

John first mentioned JSON about a month ago, but at the time I had no inclination to look into it and find out if it was something I could use. It came across my radar again today thanks to a Particle Tree article that I never finished reading, but that's not important. The long and short of it is that JSON is really just a fancy name for eval-ing JavaScript objects - one of those "why didn't I think of that" kinds of things.

I talked with one of the guys at work about writing a function in PHP that would take an array and generate the appropriate code, until I came across the (seemingly de facto) "official" JSON page. He's got references there for pretty much every language you'd expect to do web development in (and a few you wouldn't) - including JSON-PHP, which does exactly what I was going to.

He also notes that combined with the power of the Prototype Javascript library, a simple, Web 2.0-ish application can be made in no time flat...

tagged: json library prototype javascript json-php json library prototype javascript json-php

Link:


Trending Topics: