Joshua Eichorn's Blog: Adding AJAX to a website step by step
565031
Joshua Eichorn has posted this new tutorial to his site today, a detailed look at how to add Ajax to just about any site out there with the help of the HTML_AJAX PEAR package.    When looking at a adding AJAX you have a couple decisions you'll want to make up front. One is what tools your going to use. In the webthumb case thats pretty easy. Webthumb is a simple PHP app and doesn't use a framework, so I need a nice general PHP/AJAX framework that is easy to use, HTML_AJAX fits that need.   After picking my tools I need to decide what my goals are. My main focus will be to improve usability, but I also want to use AJAX to make the site seem a bit flashier, so its a bit of a technology demo too.    He uses his own current project, Webthumb as an illustration of his points including looks at remoting, a RequestStatus class, exporting a class with the HTML_AJAX package, and finally, making the Ajax calls.
625065
On DevShed a new series has started (a six-part one) with This new tutorial posted today talking about the use of the Yahoo! web services in a PHP5 application.   It's not my intention to provide you here with a fully-featured guide on how to use Yahoo!'s Web services with PHP 5, because the best place to go is simply the aforementioned Developer Network. Instead, I'll offer to you a bunch of code samples that hopefully will assist you in the development of PHP 5 applications that will utilize some of these useful web services.   You'll need to get an Application ID to work with before you get started (go here to sign up, you'll also need a Yahoo! ID), but the rest of the code is provided. They make a search request to the Yahoo! backend for "madonna" and show the XML formatting of the results.   They also include examples of querying two other services offered by the company's backend API - video search and an image search.
272507
On our sister site, AjaxDeveloper.org, today, there's a new post that mentions the latest blog post from Joshua Eichorn - a look at Javascript behaviors in his PEAR package, HTML_AJAX.    Welcome to part two of the series "Sending email with AJAX." In three parts, this series goes through the making of a simple web-based email application. It uses AJAX as the driving technology for fetching the files responsible for sending email from the server, as well as for adding and updating contacts.    This part covers the development of a "email sender" module, a "contact listing" module, the "contact insertion" module, and, finally, starting things up with the initializeEmailClient function.
512802
(InfoWorld) - Looking to bolster AJAX (Asynchronous JavaScript and XML) and development of Web 2.0 applications, the OpenAjax Alliance on Wednesday plans to introduce a project that addresses AJAX interoperability issues. The alliance, which features vendors such as IBM, Oracle, and Sun Microsystems, will roll out its OpenAjax Hub project. This effort involves developing a standard set of JavaScript functionality to tackle problems with interoperability arising when multiple AJAX libraries are used within the same Web page. With the hub, multiple AJAX run-time libraries would be able to coexist on a page. Version 1.0 of the OpenAjax Hub is planned for completion by the end of this calendar year; integration of the hub into AJAX toolkits expected in early 2007. "[In] today's world, AJAX libraries in general believe they own the entire browser [and] JavaScript environment, that they're the first one and the last one, so they assume a consequence-free environment where they can do whatever they want to do," said Jon Ferraiolo, acting director of the alliance and a Web architect in the emerging technologies group at IBM. What results, he said, are collisions of JavaScript objects and the toolkits managing HTML markup, and an inability to integrate functions such as drag and drop events. With development of the hub, the alliance is dealing with its top priority, said Jason Bloomberg, senior analyst at ZapThink, in an e-mail response to questions. "There is a critical need for OpenAjax at this point in time, because each vendor's AJAX implementation is generally incompatible with the others," Bloomberg said. "Basically, even though each AJAX widget leverages XML and JavaScript, both of which are open standards, that doesn't mean that one widget from one toolkit will work with another widget from some other toolkit. The most important goal of OpenAjax is figuring out how to resolve this interoperability problem. Clearly, Ajax will be far more successful if any widget works with any other widget, toolkit, or platform." Support for the hub is expected in toolkits such as Dojo and script.aculo.us as well as in AJAX frameworks such as Tibco General Interface and offerings from Backbase, JackBe and Nexaweb. "No one has made any commitments [to use the hub yet] but generally, [the parties cited] are all active in the alliance," said Ferraiolo. The unveiling of the hub is part of an update on the alliance's activities that is being provided Wednesday. The group will announce a near-doubling of its membership since its formation in February. New members include The Ajaxian, American Greetings, Bling Software, Curl, edge IPK, eLink Business Innovations, ENOVIA, MatrixOne, Finetooth, The Front Side, Ikivo, ILOG, IN2, IT Mill, Javeline, JWAX, Merced Systems, Nexaweb, Nitobi, OpenLink Software, Seagull Software, Sitepen, Sun, Vertex Logic, Vircon, Webtide, and Zoho. Previously announced members of the alliance include: Adobe, Backbase, BEA Systems, Borland, the Dojo Foundation, Eclipse Foundation, Fair Isaac, Google, IBM, ICEsoft, Innoopract, Intel, JackBe, Laszlo Systems, Mozilla Corporation, Novell, Openwave Systems, Opera, Oracle, Red Hat, SAP, Scalix, Software AG, Tibco, XML11, Zend, and Zimbra. While the alliance already has an impressive list of members, one name remains conspicuously absent: Microsoft. "Yes, we have extended an invitation and attempted to recruit Microsoft to join," Ferraiolo said. "We would love to have Microsoft participate in the alliance." "The purpose of the alliance is to make interoperability successful such that you can take AJAX technologies from one source and use it with another vendor's. Microsoft is one of [those] vendors and an important vendor in the AJAX community and it would be to everybody's advantage, particularly customers, if Microsoft's products would interoperate well with other people's products," said Ferraiolo. He added he was not making a statement that Microsoft products currently do not interoperate. Although Microsoft has promoted AJAX via its Atlas technologies, Microsoft currently does not have plans to join. "Microsoft has no firm plans to join the OpenAjax Alliance. However, Microsoft is very committed to working with the developer community and is engaged in dialogue with the OpenAjax Alliance organizers to learn more about the initiative," Microsoft said in a prepared statement. The alliance seeks to serve as an industry catalyst to boost AJAX-enabled Web 2.0 applications. Ferraiolo defines Web 2.0 as a new generation of the Web focused on collaboration. OpenAjax technologies are intended to produce lower development costs, faster delivery of applications, vendor choice, interoperability, and a richer Web experience. Greater collaboration capabilities that can be added to existing HTML sites or used for new applications is another goal. Also being unveiled on Wednesday is the organization's Web site and a white paper covering a description of AJAX, the AJAX value proposition and a technical section on AJAX architectures. These architectures include single and dual DOMs (Document Object Model), in which the single model involves processing everything in HTML browsers, while the dual approach involves using an XML parser that holds the description of the UI. The dual model offers a richer set of functionality but requires a larger download, typically, Ferraiolo said. AJAX in the open source world also is being included in the alliance's list of issues to cover. One of the goals for the alliance is the ability to have a zero-cost option, but it's not trying to lock out vendors from making money at all," said Ferraiolo. A second meeting of the alliance is planned for Oct. 5-6 in Santa Clara, Calif. The alliance on Oct. 5 plans to announce it has moved to a formal governance model that includes a steering committee. Goals and procedural issues also will be discussed. Security of AJAX also will be on the agenda, Ferraiolo said.
646793
The Zend Developer Zone has posted a new book review of one of SitePoint's web development related titles - "Building Your Own AJAX Web Applications".   I'm way behind on my book reviews. I've got a stack that's still knee-high and I know that there are more on the way. So let's pop one off the stack and take a peek into it shall we? This time it's "Building Your Own AJAX Web Applications" by Matthew Eernisse and published by SitePoint.   He details the contents, including the Preface. The book gives:  an overview of Ajax an inside look at the XMLHttpRequest object the asynchronous nature of it making POST requests making applications compatible with screen readers and a deeper look at what Ajax is and does  Of course, Cal explains them all in the post, giving a more complete look at each of the topics.
238493
What makes Ajax possible is the communication layer with the server. The most complete option is the JavaScript XMLHttpRequest object. If XMLHttpRequest is not suitable, hidden IFrames and cookies can also be used. Both will be examined here. By Joshua Eichorn. 1009
295875
(InfoWorld) - The Web and AJAX have many deficiencies, including security holes, and much more needs to be done to iron out these problems, according to a keynote speaker at The Rich Web Experience conference in San Jose, Calif., on Thursday evening After taking the audience through a history of computing interfaces beginning with Hollerith cards to time-sharing and finally to the Web, Douglas Crockford, an architect at Yahoo and creator of JSON (JavaScript Object Notation), gave a mostly gloomy presentation on AJAX (Asynchronous JavaScript and XML) and the Web. His presentation was entitled, "The State of AJAX." "The sad thing was the Web was a step backward in terms of interactivity [when it debuted]," Crockford said. It looked like Java would fix the problem with applets. "Unfortunately, Java was a huge failure. It completely collapsed. It didn't meet any of its goals," he said. Java's write-once, run-everywhere promise was not kept; it had an unworkable security model and a tedious UI model, said Crockford. Java did, however, become very successful on the server, he added. This left JavaScript and then XMLHTTP requests for communicating from the browser to the data server. "It was really Microsoft that created all the components that AJAX needed," Crockford said. AJAX applications are highly interactive, highly social, easy to use, and offer great network efficiency, according to Crockford. "The big problem is that it is too damn hard to write these apps," he said. "The most interesting innovation in software development in 20 years has got to be the mashup," which shows the benefits of distributed programming. "Unfortunately, mashups are insecure [in the browser]," said Crockford, with components unable to be protected from each other. The model in the browser is fully broken and needs to be fixed, he said. "The Web is an exploit waiting to happen," Crockford said. Crockford then went through a critique of various Web technologies. "[JavaScript is a] deeply flawed language," with an unpopular programming model. "But to its credit, it's working really, really well in an environment where Java failed," said Crockford. The planned JavaScript 2 upgrade also has problems. "It will make the language considerably more complicated," Crockford said. HTML raises questions about whether it is a document format or an application delivery format; it has low graphical ability and is missing a compositing model. With AJAX, HTML needs to be an application delivery format, said Crockford. XHTML was supposed to replace HTML, but it died because it was too brittle, he said. CSS (Cascading Style Sheets) presents a styling layer in the browser, but it is slow, complex, and incredibly fragile. "It surprises me that there is not a greater call for its replacement," Crockford said. XML is complicated and inefficient, he said. "Fortunately, XML has been replaced by JSON," Crockford said. "This gives me some confidence that we can fix the standards in the Web. This is our first success at that." Crockford urged standardization and uniformity in browsers. But there are computers not capable of running the latest browsers, he said.Â  If the Web is unable to repair itself, it could be replaced with a proprietary system such as Microsoft's Silverlight or Adobe's AIR (Adobe Integrated Runtime), Crockford said. Proprietary systems do present advantages, such as having only one source of new bugs and presenting a simpler upgrade story. But people like open systems and are suspicious of proprietary systems, he said. Crockford added that he used to think the browser was the most hostile programming environment ever devised, but then he found out about mobile programming. The mobile industry has had its own failed experiments, he said. "Despite all of its problems, AJAX works. So we're looking at a mobile Web now," Crockford said. Fixing the many issues might just require a lack of democracy, in which the right players are placed in the same room and agree on a remedy, similar to how the U.S. Constitution was forged, he said. "Maybe we should do that, too, but who are the right guys and how do you figure out how to get everybody else not to revolt," Crockford said. Earlier on Thursday, Kevin Hoyt, platform evangelist with Adobe Systems, emphasized the concept of experience as critical for Web development. Experience matters to business, he stressed. He spoke of an experience economy as a successor to the current service economy. "Seventy-two percent of shopping carts abandoned because of poor user experience," Hoyt said. He also urged developers not to disregard what they learned from developing desktop applications when they start building for the Web. It is OK to use desktop metaphors in Web apps, such as widgets, he said. "It's OK to think inside the box," said Hoyt. Customers, he said, want a personal relationship with a brand.SEE ALSO:Rich Web technologies debated
742027
In the next edition of their IRC Talks series, the PHP Thinktank-ers has posted the logs of the latest discussion for last week - a look at Ajax.   Some of the topics that were mentioned in this week's talk include:  what Ajax is/who uses it javascript libraries that support it a look at some of the technology (XMLHttpRequest, responseXML, responseText) that make up an Ajax message.    Be sure to check out the other talks on their blog including a PHP-GTK talk one and a look at the SPL in PHP.
439562
In a new post to his blog today, Danial Krook shines a spotlight on a the technology that bridges the gap between two different languages - Java and PHP.   In the time since I wrote that post [talking about PHP with WebSphere], and particularly in the past month, there have been several items published which demonstrate the value of this technology. I still need to delve deeper, but hereâs a quick summary of whatâs going on.   He looks quickly at this combination, breaking it out into four parts - what the technology is, how it allows PHP and Java to work together, where you can download the needed software from and some resources where you can find out more information on implementation and examples of it in action.
730193
On the Chronosight Blog, there's a follow-up post with a look at some enhancements to the original tutorial - Simple Calendar Tutorial.   Almost a year ago I made a tutorial on Simple Calendar Tutorial which trained us to develop a calendar using PHP. Now it times to enhance that tutorial to a whole new level. Let trou in some AJAX code and Javascript Document Object Model (DOM) to create not one, but three type of calendar: Single Calendar, Time Period Selection Calendar, Month-Year Calendar   He steps you through the creation of two files - one to provide a space for the Ajax interface and another for the calendar PHP class. Toss in a little CSS and some explainations along the way and you have all that you need to make a simple, easy to use calendaring system.
627987
In a much anticipated article, Peter Belesis returns with this piece on a DHTML Lab Popup Calendar. Among it's many features: No knowledge of JavaScript is necessary; only a beginner's aquaintance with HTML and CSS syntax is all that's needed. 0809
473512
On the PHPRiot.com site today there's a new tutorial posted covering an alternate method for uploading files - using Ajax to help monitor the progress of the file upload.   In this article we will develop a solution that will allow users to upload a file from their computer using HTML forms. We will then determine the progress of the upload while it is in progress using Ajax, and display the status to the user.   They chose the prototype library and the APC extension for PHP to make their code work. The basic idea is, through a feature of APC, the script can receive a progress measurement back from the server. This is handed off to the Javascript (Ajax) functionality that then updates the progress meter to reflect the change.
215064
Doing more things with the API Weâve all used Google to search the web. What if we could add Ajax to the web search operation? Google Ajax Search API does just that â could this facilitate searching?â¦
704303
Matthew McCool has a few reminders for developers out there thinking of using Ajax in your applications - mainly to remember that it has the potential of adding another vulnerability to your application.   Consider a registration form built out of PHP. Any aspect of your script that accepts and processes data is a potential point of attack. If you add Ajax, what youÃ¢ÂÂre doing is increasing the complexity of the application and, by extension, introducing greater vulnerability. More points of entry equal a larger attack surface, and that means potential problems for your application.   He continues his login form example and mentions a few things you could do to help protect your application and its users (including using the escaping functions built in to PHP to help remove some harmful input).
664550
Sebastian Bergmann has posted an official call for help for a PHPUnit-related project that seems to be a more and more requested feature for the popular unit testing package - an Ajax-based test runner.   It would be great if the frontend for the browser-based test runner would make use of AJAX. Since I am clueless when it comes to both web design in general and AJAX in particular, I would appreciate if someone else could help me with implementing this test runner.   He's looking for the XHTML, CSS, and Javascript to put it all together as well as the Javascript that makes the magic happen. If you're interested in helping out, you can either contact him on the mailing list or in #phpunit on the Freenode IRC network.
104419
Hoping to spur development of websites using the AJAX development platform, Google on Tuesday released the Google Web Toolkit. The platform would allow those with knowledge of Java to create browser compliant JavaScript and HTML easily.
179659
From the DevChix website, there's this new post that helps introduce developers (both in PHP and Rails environments) to hos to use the Yahoo! UI connection manager in their applications.   This post is geared towards folks who haven't done the "A" part of "AJAX" before (And I mean the first "A", as in "Asychronous"); are new to Yahoo's implementation of the XMLHttpRequest object (The Yahoo! Connection Manager) and would like added information on how that works; or both.   Sarah starts off slow with an example of making a connection to a backend PHP script as called by a HTML form. The simple example is fleshed out with a database backend (via PEAR::DB) and the Javascript to handle the response and the errors that might arise. Finally, a request can be made and the result eval-ed to give the client a nice, simple Javascript object to work with.