Quantcast
You are not logged in, click here to log in.
12 Replies Last post: Apr 24, 2006 10:22 PM by RichardBronosky  
Click to view MW Forums's profile New Member 12,220 posts since
Aug 2, 2004
Reply

Apr 21, 2006 7:50 AM

AJAX in the spotlight next week and beyond

AJAX is becoming more popular on the Web and now the technology has its own tradeshow. more
Reply
Click to view iron_chef's profile Member 313 posts since
Aug 28, 2004
1. Apr 21, 2006 8:32 AM in response to: MW Forums
Re: AJAX in the spotlight next week and beyond
where's a good place to start learning about AJAX? tutorial sites?
Click to view rlavere's profile Member 256 posts since
Aug 28, 2004
2. Apr 21, 2006 8:56 AM in response to: iron_chef
Re: AJAX in the spotlight next week and beyond
In reply to:<hr />
where's a good place to start learning about AJAX? tutorial sites?

<hr />


Try this site for starters.

Click to view Daren_Mitchell's profile New Member 78 posts since
Oct 12, 2004
3. Apr 21, 2006 9:43 AM in response to: MW Forums
Re: AJAX in the spotlight next week and beyond
The site: http://www.rubyonrails.org/

The product: http://www.backpackit.com/ (One of them)
Click to view Nobody's profile New Member 58,347 posts since
Oct 18, 2007
4. Apr 21, 2006 11:05 AM in response to: MW Forums
Nice To See A Name
When I started hearing about AJAX a few months ago, I thought "what is this all about?" When I realized it was a methodology I had been using professionally since 1995, and one that me and a few other guys came up with on our own, I thought, "Well it took everyone long enough!". Guess I should have come up with a cool name for it.

For anyone who doubts my claim, I can refer you to a 1995 Cold Fusion Developer's Journal article about this very topic, written by Dan Chick who used to work for me.
Click to view RichardBronosky's profile Member 181 posts since
Jul 26, 2005
5. Apr 21, 2006 11:16 AM in response to: iron_chef
Re: AJAX in the spotlight next week and beyond
Yahoo! has a great AJAX HOWTO

I for one discourage the use of XML. It is bulky, needs to be parsed, and is not necessary for async requests. Instead use JavaScript Object Notation (aka "JSON") Learn more at the Using JSON with Yahoo! Web Services site.

Also check out the Yahoo! UI Library. And specifically Connection Manager which Yahoo uses for "AJAX" or "ASYNC" as I like to call it since there is no XML is my projects. Sure, you can get AJAX libraries anywhere. But you know Yahoo! is going anywhere. And, they have worked out lots of cross-browser, cross-platform, IE 6 memory leak, IF 7 future proofing issues. This level of expertise and testing beyond what a common web developer can afford to invest.

Oh, and Rasmus uses it. That's good enough for me.

Good luck!
Click to view zarmanto's profile Member 283 posts since
Feb 11, 2004
6. Apr 21, 2006 11:24 AM in response to: rlavere
Re: AJAX in the spotlight next week and beyond
In reply to:<hr />
Try this site for starters.

<hr />


Cute... but you do make a point. The (ahem!) other Wikipedia entry is actually a very good place to start.

IMHO, one of the issues with Ajax which some of us need to take into consideration is accessibility. Ajax offers a great level of interactivity for most of us -- but if your audience requires assistive technology to view your website, then it's pretty much hit-or-miss; some programs can only function with very carefully crafted Ajax implementations, while other programs won't play that game at all.


24" iMac: 2.33GHz Core2 Duo/2GB RAM/500GB HD/GeForce 7600 w/256MB VRAM | PPCMac: 1GHz G4 DP/768MB RAM/250GB HD | PC: AMD 3200/1GB RAM/250GB HD
Click to view RichardBronosky's profile Member 181 posts since
Jul 26, 2005
7. Apr 21, 2006 11:37 AM in response to: MW Forums
Re: AJAX in the spotlight next week and beyond
In reply to:<hr />
its this loose collection of browser-native technologies

<hr />


This is the important part to take away from this.

AJAX is not some new hot thing. It's just a way of using what is already there.

Further more, I HIGHLY suggest you use JSON instead of XML for your data format. JSON, or JavaScript Object Notation, is simply using the "Object Literal Syntax" that was introduced in JavaScript 1.2 YEARS AGO. It does not require an extra tokenized parse routine like XML.

Here's an example. In JavaScript this string:
<pre>code:<hr>
{"first":"Richard","last":"Bronosky","aliases":}</pre><hr>
is equivilent to:
<pre>code:<hr>
<?php
array(
'first'=>'Richard',
'last'=>'Bronosky',
'aliases'=>array('Bruno', 'BrunoUsesBBEdit', 'RichardBronosky')
)
?>
</pre><hr>
or...
<pre>code:<hr>
<XML>
<first>Richard</first>
<last>Bronosky</last>
<aliases>
<alias>Bruno</alias>
<alias>BrunoUsesBBEdit</alias>
<alias>RichardBronosky</alias>
</aliases>
</XML>
</pre><hr>

PHP can use JSON via:
C++ Extension (my favorite)
PEAR
PHP Class

This is hardly the forum for this, but I thought I'd share.
Click to view leofish's profile New Member 23 posts since
Oct 24, 2005
8. Apr 21, 2006 12:19 PM in response to: RichardBronosky
Re: AJAX in the spotlight next week and beyond
Richard,

Thanks for pointing out JSON. The code and structure seems far cleaner than XML.

If I were doing a Ruby on Rails application, would you use JSON instead of SOAP/XML?
It also appears to be more asynchronous and faster.

Would this be preferable if I were creating an app that were to be used on mobile phone browsers
(XHTML/CSS on client). I am doing ruby development now using MVC (similar to my Objective-C
and Cocoa experiences) but for web development. I am gearing apps that have a mobile component.

Thanks much
Reno
http://www.tangentmobile.com
Click to view michaelb's profile New Member 112 posts since
Sep 29, 2001
9. Apr 21, 2006 5:42 PM in response to: leofish
Re: AJAX in the spotlight next week and beyond
You guys dis-advocating XML have good points, but keep in mind the whole idea of XML was interoperability. If the data is solely of use to your app only then that's fine, but if it's going to be repurposed later, eg, mashups, it's may make sense to keep it universally parsable (not just by JavaScript).

The whole nature of Web 2.0 is getting away from silos. My data is your data. Also XHTML + XML tends to be a good fit.

But by all means use what is appropriate. Binary data is also nice and clean (as long as a machine is doing the parsing, not a human!).
Click to view RichardBronosky's profile Member 181 posts since
Jul 26, 2005
10. Apr 21, 2006 7:38 PM in response to: michaelb
Re: AJAX in the spotlight next week and beyond
In reply to:<hr />
...keep in mind the whole idea of XML was interoperability.

<hr />

You are absolutely correct. And for sharing data between organizations I am a big fan of XML and SOAP. But for asynchronous web apps, I use JSON anytime that I don't have to use data from some other Yahoo! developer. Even then I tend to ask the developer to install the aforementioned C++ extension and add a hook so I can get the data in JSON.

You see, doing "AJAX" is different than using an external Web Service/API. The nature of the XMLHttpRequest Object is that it cannot be used to access data from a domain other than that of the original page. This protection was put in place to avoid XSS. So if you are doing "AJAX" you are using your own data (or the data of another development team that shares your domain) and it is fine to use a "less friendly format". Unless of course you are using your web service as a proxy for an external web service. (And "no" this doesn't circumvent the XSS protection, because the important part of the protection is that the cookies for abc.com won't get passed to/through xyz.com. But that's too geeky to get into here.) Another important thing to keep in mind is that no programming language (that I know of) uses XML as it's native way of defining an object or array of data. So you must encode the data from a PHP variable to XML, JSON, CSV, etc. So why not take the data and encode it to what ever format is best for the individual use? Many oh my apps take thew same data and deliver it to internal customers as CSV (with a .xls extension so that Excel opens it nicely) to external customers as XML, and to Async web apps as JSON. At some point it's just ones and zeros right?

Anyway, I'm not bashing XML. I'm bashing "AJAX". And only for it's use of XML.

Is that clear as mud?
Click to view iron_chef's profile Member 313 posts since
Aug 28, 2004
11. Apr 24, 2006 7:13 AM in response to: RichardBronosky
Re: AJAX in the spotlight next week and beyond
thanks for the links. You rock!!!!
Click to view RichardBronosky's profile Member 181 posts since
Jul 26, 2005
12. Apr 24, 2006 10:22 PM in response to: iron_chef
Re: AJAX in the spotlight next week and beyond
That's what happens when you ask about something I know. I'm talking crap most of the time... But code, I know.

Email me if there's anything you need help with. First name at last name dot com.

--RichardBronosky