Loading
Showing posts with label Ajax Blogs. Show all posts
Showing posts with label Ajax Blogs. Show all posts

Sunday, February 10, 2008

Database-Driven Ajax

Now that you have a basic understanding of how to use PHP with Ajax to accomplish
some dynamic and functional goals, it’s time to start tying in some of the more complicated
and powerful functionality available to PHP. The advantage to using a robust
server-side language such as PHP with Ajax-sculptured JavaScript is that you can use it
to accomplish tasks that are not easily accomplished (if at all) with JavaScript. One such
set of core functionality is that of database storage and retrieval.
It goes without saying that MySQL combined with PHP is a developer’s dream. They
are both incredibly affordable, robust, and loaded with documentation and functionality.
While MySQL generally has a licensing fee, an exception has been made for working with
MySQL together with PHP, called FLOSS (Free/Libre and Open Source Software). FLOSS
allows for free usage of MySQL (for more information on FLOSS, see the MySQL documentation
at www.mysql.com/company/legal/licensing/foss-exception.html). PHP and
MySQL connect to each other with the greatest of ease and perform quite admirably from
a processing standpoint. With the recent release of MySQL 5.0, you can now accomplish
many things that were previously possible only with expensive database solutions such
as Oracle.

MySQL 5.0 has added a few new features—some of the more powerful ones include
stored procedures, triggers, and views. Stored procedures allow you to create and access
functions executed strictly on the MySQL server. This allows for developers to put a
greater load on the MySQL server and less on the scripting language they are using.
Triggers allow you to perform queries that fire when a certain event is triggered within
the MySQL server. Again, like stored procedures, triggers allow the MySQL server to take
on more of a processing role, which takes some emphasis off of the scripting language.
Views allow you to create custom “reports” that can reference information within the
database. Calling views is a simple and efficient way to “view” certain data within your
database. All of this functionality has been available in more elaborate database systems
(such as Oracle) for years, and MySQL’s inclusion of them really shows that it’s becoming
a key player in the database game.

The ability to harness PHP-, MySQL-, and Ajax-sculpted JavaScript is a very powerful
tool that is readily available to any developer in the know. In fact, entire software applications
have been built using the Ajax architecture to manage a MySQL database. Online
applications such as TurboDbAdmin (www.turboajax.com/turbodbadmin.html)—have come a long way in showing you what is possible when PHP, Ajax, and
MySQL come together. TurboDbAdmin shows off a good portion of the Ajax-based
application gamut. Everything from inserting and maintaining rows, switching tabs,
performing queries, and creating dynamic content is handled by seamless Ajax-based
functionality. All in all, TurboDbAdmin does a very solid job of showing that Ajax is very
capable of handling complex database management.

While TurboDbAdmin does an admirable job working with your MySQL server, and
is very simple to install and implement, I find that the functionality is not quite as
robust as some of the more refined, PHP-based MySQL management systems, such as
phpMyAdmin (more on that later). Still, TurboDbAdmin provides an interesting perspective
on where Ajax can take you and what can be accomplished.

The focus of this post be to show you just how easy it is to create online Ajaxdriven
applications that can connect easily to a MySQL server.

Monday, January 14, 2008

Ten Super-Useful Ajax Resources

There’s plenty of Ajax help on the Internet, ready to give you all sorts of information and advice. You can find a good list of Ajax resources in this post, including the Web address for the original article by Jesse James Garrett of Adaptive Path that started the whole Ajax juggernaut going. You can also get wrapped up in any of the Ajax blogs and discussion groups that I introduce here.

Don’t forget, this being the Internet, that URLs can change without notice.And also keep in mind that the Ajax phenomenon is still exploding — more sites, frameworks, and discussions are appearing all the time. Keep in touch with the Ajax community online — there are great days ahead.

The Original Ajax Page



www.adaptivepath.com/publications/essays/archives/000385.php

Yep, this is the big one, the original Ajax page where Jesse James Garrett coined the term Ajax. This article, named “Ajax: A New Approach to Web applications,” even includes a nice picture of Jesse. Although some people have noted that all the technologies involved in Ajax were in use before this article came out, the article, nevertheless, focused vast amounts of attention on Ajax and what it could do.
Adaptive Path says, “Since we first published Jesse’s essay, we’ve received an enormous amount of correspondence from readers with questions about Ajax.” You can find a question and answer section at the end of the page where Jesse answers some of those questions.

The Ajax Patterns Page



The Ajax Patterns page is a great Ajax resource. Patterns refers to best programming practices, and there’s a lot of discussion on this site about the topic.

In addition, this site has a great page of links to Ajax examples (http://
ajaxpatterns.org/Ajax_Examples
) and to the various Ajax frameworks
available (http://ajaxpatterns.org/Ajax_Frameworks). In Part III, It explains many ways in which you put these frameworks to use.

In my view, the interactive discussion and huge number of resources help make this the best Ajax site available anywhere, bar none. Take a look!

The Wikipedia Ajax Page



Wikipedia’s Ajax page is also a great resource. Wikipedia is a free, online encyclopedia, and this page has an in-depth discussion with many links on what Ajax is (and isn’t).
This page has one of the best all-around Ajax overviews you’re going to find anywhere, including not only a discussion of what Ajax is good for, but a discussion of problems — in other words, both the pros and cons.
And you can also find many links to Ajax resources of all kinds, from Ajax examples to Ajax frameworks.

Ajax Matters



www.ajaxmatters.com/r/welcome

Ajax Matters is another power-packed Ajax site, currently updated all the time, on all things about Ajax. It’s great for all-around Ajax topics of any kind.Here’s a quick list of what you can find:

1.Headlines on new product releases
2.Links to books, example sites that use Ajax, and resources that Ajax developers need, such as JavaScript references
3.Frameworks
4.Articles
5.Discussions

XMLHttpRequest Object References



Where are the official references showing how to use XMLHttpRequest objects in the various browsers? You can find the official references for each browser, listing object methods and properties at the following sites:

1.Internet Explorer: http://msdn.microsoft.com/library/
default.asp?url=/library/en-us/xmlsdk/html/
7924f6be-c035-411f-acd2-79de7a711b38.asp


2.Mozilla (including Firefox) and Apple Safari:
http://developer.apple.com/internet/webcontent/xmlhttpreq.html

Ajax Blogs



A handful of Ajax blogs out there have a lot of great Ajax commentary. Here’s a list of some of the better ones:

1.http://ajaxblog.com
2.www.ajaxian.com
3.http://weblogs.asp.net/mschwarz/archive/2005/11.aspx
4.www.robsanheim.com/category/software/ajax

Ajax Examples



Sometimes, nothing helps more than seeing what you want to do already done in an example. And there are plenty of examples available for you. For instance, a very simple example showing how to get started with Ajax is available at

www.openajax.net/wordpress/simple-ajax

You can find two of the best lists of Ajax examples at these URLs:
The fiftyfoureleven.com list of Ajax examples is at

http://www.fiftyfoureleven.com/resources/programming/xmlhttprequest/examples

Ajax Pattern’s list of examples is at
http://ajaxpatterns.org/Ajax_Examples

Ajax Tutorials



There are a number of Ajax tutorials available on the Internet, but most of them deal with using specific Ajax-enabled frameworks, such as Ruby on Rails. Here are some good general-purpose Ajax tutorials not tied to a specific framework:

1.A “30-second” Ajax tutorial
http://marc.theaimsgroup.com/?l=php-general&m=112198633625636&w=2

2.This tutorial uses PHP:
http://www.phpbuilder.com/columns/kassemis0050606.php3

3.This tuorial builds a tree of nodes, whose text is downloaded as needed:
http://www.codeproject.com/aspnet/ajax_treeview.asp

Ajax Discussion Group



http://groups.google.com/group/ajax-world

If you’re looking for interactive Ajax help, check out the active Google group discussion on Ajax.

This group is a good place to go to ask questions and receive answers about Ajax. No matter how complex the question, there’s probably someone on this group that can offer a few suggestions.

More Depth on XMLHttpRequest



http://jibbering.com/2002/4/httprequest.html

Here’s a site that has more information on how to use XMLHttpRequest objects and goes into more depth than the usual Ajax page.

You can find many sites that give you the Ajax basics, but sites like this one, which go deeper into the topic, are very useful when you’re ready to move on from the preliminary discussions. This site includes how to use Head requests and much more.