Monday, October 31, 2005

Symfony integrates AJAX

Flickr PhotoFlickr Photo

See Demo's

The Symfony project has added built AJAX support (available in the svn
repository). Having these built in options will help developers
integrate rich client functionality seamlessly and effortlessly,
following the ease of development motto of Symfony.

Technorati Tags: , ,

Tuesday, October 25, 2005

Symfony - Php's answer to Rails

Flickr Photo

I began to get acquainted with Symfony tonight and I am liking what I see so far. I really like the concept of fast, easy development that Rails delivers but, there is one thing that has been holding me back from jumping in... I don't know Ruby. I am learning but, I am happy to see an alternative in a language that I am very comfortable in, Php5.

While following the tutorial on their website, I really like what they have done for the dev mode of working on the application. Symfony has a nice little info sidebar that gives you quick information about the configuration of the application.

As seen in the image, it has generated some CRUD scaffolding for a blog much like Rails. While this generated code will need to be modified, I don't see anything wrong with setting a nice start for some processes.

Technorati Tags: ,

Sunday, October 23, 2005

AJAX - Why use XML?

"1) Ajax and XML, A Match Made by Acronym - Ajax and XML actually aren't necessary for Ajax. No, not at all. Ajax actually prefers JSON! What the heck is JSON you ask? It's the JavaScript Object Notation. It's a much better way to transfer and parse data over lightweight HTTP services. Waaaay better than XML/HTTP, REST, or even, god forbid, SOAP. Don't even ask about WS-*. Don't believe me? Then read the docs on the eval() function in JavaScript. Good, huh?. Next test: Try to send lists of data in XML to your Ajax client and not get tired out writing the (inevitably buggy) DOM navigation code. You'll switch to JSON. Your HTTP service developers will thank you. And everyone will be happy. Well, except folks that want interoperability and performance over ease of programming. Those obviously picky folks should just stick with XML, particularly if they've already heard of it."

5 Earth-Shattering Things You Should Know About Ajax And Probably Don't (web2.wsj2.com)

In his blog, Dion Hinchcliffe, brings up a point that I have been fighting, and probably will continue fighting, at work. Currently, a lot of our stuff is being pulled from a DB (tabular format), marshalled into XML (Castor), returned to client via XHR, and then parsed and formated for tabular display, via JS, on the client. This seems like a total waste to me. Not only are we doing an unneccesary transfer to XML, each client is left to format the data (setting decimal places, rounding data, etc...).

My point of view is to grab the data from the DB, have a common library to format the data, it is weather data, and then use a templating system, Velocity in our case since we are dealing with Java, and return Javascript objects to the be eval()'ed on the client. No more needless XML junk in the middle.

As for JSON, I haven't looked at it enough to decide its usefulness. What is different than just passing data into a templating system to build a normal JavaScript object?

Technorati Tags: ,

Saturday, October 22, 2005

Php web framework

symfony is an open-source PHP5 web frameworkprofessional web tools for lazy folks

symfony - open-source PHP5 web framework

I am looking forward to playing with this Php5 framework I recently found. I haven't been doing much with Php and I want to shake off some of the rust. Before I got my current job, I was looking into writing a book on some of the Php frameworks that have started to show up. Now that things are slowing down, maybe I will start that project back up.

After looking at the documentation and the website, I am seeing some familiar words like, YAML configuration and scaffolding. Is this Php's answer to Rails?

Technorati Tags: ,

Wednesday, October 19, 2005

From Flock

I posted my last blog with Flock. So far, I am impressed! I really like the bookmarks integration with del.icio.us

On Demand AJAX and Templates

On most of my recent Java projects, I have been consistent in using
DWR, which is a great framework that is easy to use and quick to get
started with. On my recent trials, I had to prepare some of our
portlets to work on a Pocket PC browser (Internet Explorer).
Considering that our portlets depend on AJAX, I knew I was in for a treat.

I tried to use DWR but, it was throwing some object errors. Given I
was on a very, very tight schedule, I couldn't try and debug the
situation at that time. I reverted to rolling my own XHR solution which
turned out to be rather flexible.



I decided that I didn't want to deal with marshalling, passing, and
parsing XML, that is why I wanted to use DWR in the first place,
passing and parsing plain text would be just as bad. So what are my
options left. I decided to pass a JavaScript object, built by a servlet
on the back end, back to the client. The client simply passes the
responseText to eval() and "Wala" the data is now a convenient Javascript bean
that contains the needed data.



To get around the ugly part, creating the JavaScript object on the
back end, I decided to create templates of my JavaScript objects using
Velocity. This was great!



- Receive request



- Do some business logic



- Initialize Velocity and fill the context



- merge the template and pass it back in the response



Very clean and easy to do. I am going to look into replacing my XHR
js code and replace it with a dojo install that only has the IO
functionality in it. I have been playing with it and it rocks. I like
that you can choose to eval the return.



This can also be accomplished in other languages as well. I started doing the same thing with PHP, Dojo, and Smarty templates!

Thursday, October 13, 2005

remembermilk - signup


remembermilk
Originally uploaded by wimsycal.
The signup page for "remember the milk" is great! I really like the fact that it checks if the username you are requesting is available as you type. It also marks the password fields as matching while you type. I have been thinking that this would work well as it saves some headaches when trying to signup for a site only to find out that the username is taken or the passwords don't match.

Monday, October 03, 2005

The top 10 things that aren't Web 2.0 - Signal vs. Noise (by 37signals)

Web 2.0 is about collaboration.

Sunday, October 02, 2005

Manage your life with Subversion

I actually did something similar to this for my wife a few weeks ago. She was constantly loosing data so I thought Subversion would be a great way to back her stuff up. Now she can simply do a commit on her backed up directories to make sure her data is safe.

read more | digg story