Go to http://gandolf.homelinux.org/~smhanov/todo/ to try it out.
Here's the php source code.
Actually, I hate the term Ajax. The X stands for XML, but I personally think that just about every use of XML is a mistake. I don't use any XML in my Todo list. Instead, it does all of its communication in either POST requests, or JSON.
About the Application
A unique thing about the Todo list is that it lets you add things without signing in. They are stored in the PHP $_SESSION variable. If you later create an account, or sign in, then the items are transferred to the mysql database.
Things I learned
- It is hard to debug things in IE, because it won't tell you where the error is. You have to put in alert()'s to figure out what it's doing. It's like it's 1995 all over again.
- Firebug is an invaluable development tool. It is absolutely essential for any web application development.
- script.aculo.us is really easy to use to get things to animate onto the screen instead of just appearing. You literally only have to add 1 line of code. The only downside is it adds 150K of scripts to the page.
- The PHP Pear::Auth() package is unsuitable for Ajax development. It assumes you are going to have a separate login page, a separate page for creating accounts, etc. I could have worked around the problems, but it was easier to write my own object for authentication.
- PHP documentation on the web is very bad. You pretty much have to buy a book on it.
- If you have a slow web server, Web 2.0 applications are great. You only load the page once. After that, my server only gets hit for database queries, and returns two character responses, like "ok" and "".
Want more programming tech talk?
Add to Circles on Google Plus
Subscribe to posts