Better Web Apps With Ajax
An anonymous reader wrote to mention an article on IBM's site detailing the fundamentals of Java-based Ajax. From the article: "This article gives you a good understanding of the fundamental principles of Ajax, and a nuts-and-bolts knowledge of the client and server side components that participate in an Ajax interaction. These are the building blocks of a Java-based Ajax Web application. In addition, you will be shown some of the high-level design issues that come with the Ajax approach."
GNAA pledges aid to Katrina victims
Associated Press, September 11 2005
In an early-morning press conference, reclusive GNAA president timecop declared that the Gay Nigger Association of America will contribute to hurricane Katrina disaster relief efforts. He issued a statement describing the efforts being undertaken to rush relief to New Orleans' former residents, many of whom are black, gay, or both. "My heart tears at the sight of so many flooded niggers", timecop said.
The GNAA is contributing a currently-unknown quantity of sperm, intended to prevent starvation and malnutrition. The sperm is to be delivered this Monday to shelters across the nation. "We are having a non-stop wankathon. I believe we can do this, I believe in my niggas. We will not fail to feed NOLA's hungry refugees." Many have reporters present at the conference questioned the nutritional value of the semen being collected, eliciting angry stares and lip-licking from their host. timecop did not directly answer the questions, saying "Who the hell are you? I don't see you vigorously beating off to save the niggers!"
The next item on the list was free wireless internet spanning the Southern Louisiana region, allowing access to GNAA's Lastmeasure online service. Lastmeasure is provided free of charge. It is widely touted as "better than FEMA" in the charitable relief field. Lastmeasure surpasses FEMA's disaster aid service by being accessible to any graphical browser on any operating system. Lastmeasure will be the only website available, as all other http requests will be redirected. This measure is intended to minimize use of GNAA.net wireless for other than disaster-relief LM. The conference ended with an emotional outburst from GNAA president timecop, crying out, "so many dead, rotting black shits".
About GNAA:
GNAA (GAY NIGGER ASSOCIATION OF AMERICA) is the first organization which gathers GAY NIGGERS from all over America and abroad for one common goal - being GAY NIGGERS.
Are you GAY ?
Are you a NIGGER ?
Are you a GAY NIGGER ?
If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!
Join GNAA (GAY NIGGER ASSOCIATION OF AMERICA) today, and enjoy all the benefits of being a full-time GNAA member.
GNAA (GAY NIGGER ASSOCIATION OF AMERICA) is the fastest-growing GAY NIGGER community with THOUSANDS of members all over United States of America and the World! You, too, can be a part of GNAA if you join today!
Why not? It's quick and easy - only 3 simple steps!
Talk to one of the ops or any of the other members in the channel to sign up today! Upon submitting your application, you will be required to submit links to your successful First Post, and you will be tested on your knowledge of GAYNIGGERS FROM OUTER SPACE.
If you are having trouble locating #GNAA, t
GNAA Announces Immediate Release of OSX_x86_YHBT
Ich Bindawalross (London) - GNAA (NYSE: GNAA) President timecop released a statement today regarding the immediate Internet release of MacOS X for the x86 architecture, available on many BitTorrent networks. After making the statement, timecop yielded the stage to a second speaker at the press conference, Apple Computer co-Founder and CEO, Steve "Rim" Jobs, now fully recovered from his recent gender reassignment surgery to field questions from attending press members.
"We here at Apple Computerth [sic] have decided on a slightly different path for the upcoming version of the MacOS X," Jobs states before bursting out into high pitched giggles. "We have replaced our overpriced and bloated software with an efficient and easy-to-use interface. I would like to take this opportunity to announce a merger larger than a Zimbabwe nigger cock: GNAA and Apple Computer."
Returning to the podium, timecop began speaking again, while Steve Jobs submitted to orally pleasuring his ten inch nigger cock. "Dedicated faggots have been loyally purchasing the homosexual software and hardware abomination that is Macintosh computers. Apple has been striving to provide software customers with the most flambouyantly homosexual combination available. However, in recent days, this hasn't been enough.
"There has been increasing pressure from the disgustingly obese Lunix nerds and the socially well-adjusted and popular Windows users to convert, as well as pressure from OS X emulators to provide consumers with increasingly gay products. Apple Computer has decided to merge with GNAA in order to broaden the appeal and better serve the interests of all those who buy Macintosh products. Furthermore, we will adopt Apple's "Step 2 ???? PROFIT!" marketing model. This will also stop Apple from going out of business, which they probably would have otherwise."
At this point, timecop paused and deposited a quart of Gaynigger seed into Steve Jobs' mouth.
"GNAApple is committed to our new OS X86. Rather than give the user the difficulty of finding pornography themselves, we provide them with the classic hello.jpg, redundantly archived and brand labeled throughout the 950 MB DVD image, as well as a bundled copy of GPA (Gay Porn Avalanche). Now, greater efficiency in masturbatory pursuits can be provided to all."
"As Slashdot users, many of you might have been exposed to the pirated release, and information pertaining to it. We would like to thank Rob "CmdrCocko" Malda for running the first article, leading to the release of information about our upcoming merger. We would also like to extend our gratitude to thepiratebay.org and XiSO for helping us spread the release over the 'underground scene.' We thank you, the IRC channels who put it on their hacked .edu xdcc bots and fserves who hosted it on your dialup connections.
Steve Jobs, recovering from the large dosage of AIDS from the variety of syphilitic, festering sores of GNAA members, rose to his feet at this point during the press conference. "Our previous versions of OS X were released prematurely, and as a result the operating system was unstable and fragile. Our team of software engineers have also decided to abandon the weak and inefficient UNIX backside in favor of a more efficient and robust alternative: WinNT. The pirated version of our new operating system has had record acclaim from users of the Jewish-based internet news organization known as "Slashdot".
"Those doubting the superiority of our new release need only read user testimonials."
"The Torrent going around as: Mac OS X Tiger X86 READNFO-XISO It's a complete fake. When the image is booted it shows a picture of a guy showing off his Bu** H**e." - Anon Coward
"if you unrar, burn, and boot like the .nfo file says, it just
omgzor FP yo!
It's not "Ayax"!!!
Unpretentious Sydney reviews by unqualified Sydney reviewers
Cleaner code than the rest!
I'm glad to see another serious technical article on the pros and cons of implementing an AJAX solution. Most everyone who says the acronym "AJAX" usually falls into one of two camps - either the "OMFGZ teh AJAX is so amazing! It will change the interweb!" How? Oh, it allows parts of the page to be updated without a refresh. How interesting. Perhaps you could go a little more in-depth? No? Thanks...
The other camp... too many Slashdotters, IMO... feel the need to flex their superior understanding of the fundamental dynamics of the internet and development and offer this gem: "AJAX is just an assortment of pre-existing technologies. Nothing to see here".
The automobile was just an assortment of pre-existing technologies, and it radically changed the world. It also introduced a whole bevy of new challenges, both technical and otherwise, that we still haven't fully figured out yet. It was not a transportation panacea, and AJAX is no cure-all. But just because it doesn't solve every problem doesn't mean it doesn't have the power to be revolutionary.
Rex is 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
Atlas is Microsoft's entry into the suddenly-popular-even-though-it-has-been-around-fo r-7-or-more-years AJAX trend.
Atlas is a set of extensions to ASP.NET 2.0 that allows for web developers to use AJAX with little or no plumbing work on their part.
It integrates with ASP.NET extremely well and maintains the "event driven" style that ASP.NET is known for.
There is also a Channel 9 video about what Microsoft is doing on the AJAX front elsewhere.
I have been using "AJAX" for almost 8 years now. Even back with IE4 you could use the XMLHTTP object to make "background" XML requests to the server, process the XML on the client and then modify the UI client side. Old hat. It is nice to see they finally have a name for it. Now maybe Microsoft will get rid of that crappy "server-side click" stuff and integrate this into .NET
Ya sorry but everyone knows that to obtain Buzzword Fad Certification (TM) AJAX *must* be coupled with Ruby on Rails, an Agile Development Model and legendary programmer Bill Brasky. Java does not fit in that picture (although apparently Brasky once coded a complete J2EE Web commerce framework in one hand on his BlackBerry while siring a child with his best friend's wife ... that framework launched a little site called Half.com).
...use JSON-RPC instead. XML is longer and hard for a javascript interpreter to interpret. Why does everyone want to use it as a wire protocol? I've never understood this. It makes a lot more sense to me to just store everything as a javascript hash.
Anyway, unlike the almost most ajax libraries, which are at this point almost totally devoid of docs, the guy who wrote a JSON-RPC library actually tells you how to use it. If you've got java, its the way to go, I think. Here it is.
Personally, I'm a perl monger, so I use this lib, which isn't nearly as good, as you have to do most of the javascript stuff yourself. Faster than XML though, and its still rather trivial to turn a DOM object into a plain javascript one for use with JSON.
Mod me down and I will become more powerful than you can possibly imagine!
I much prefer a seaside solution.
--
The "are you a script" word for today is platform.
almost as though there was nothing there. Except the concept...
By the by, from the IBM site:
> Server load
>
> Implementing an Ajax UI in place of a regular forms-based one may dramatically
> increase the number of requests made to the server.
Will be interesting to see how it responds to a slashdotting...
Why? Less verbose (easier on bandwidth) and no parsing (ever tried parsing XML using XmlHttpRequest? It sucks). JSON is object syntax. It is a real, live object serialized to string.
It just so happens that JSON is also legal Python object notation.
Hmmm... GMail, Google Maps, Google Suggest... none of these use XML. Google is also renowned for using Python. JSON syntax is the same in client-side javascript and server-side python... hmmm... makes me think twice, anyway, instead of drinking the web services kool-aid Sun and Microsoft are serving.
I don't know if anyone has noticed, but digg.com seems to be much better with the stories than slashdot. I saw this on there a day or two ago. No dupes either!
So what happens when a java applet is inside a java browser? Java in Java? That can't be efficient.
ModLife.Net - If it ain't modded, what's the point?
revolutionary or not, "AJAX" is now used in lots of languages. and there are some good tools out there. there's ruby on rails with the prototype library which is also now available in perl. there's also CGI::Ajax which is pretty simple to apply... and it's perl!
There's been an interesting discussion on the Erlang mailing list about a possible AJAX implementation. http://www.erlang.org/ml-archive/erlang-questions/ 200509/msg00282.html http://www.erlang.org/ml-archive/erlang-questions/ 200509/msg00320.html
Also interesting on the IBM site is a comparison between the use of J2EE and Ruby on Rails, another great way of achieving Ajax functionality.
AJAX Security
Believe me, if I started murdering people, there would be none of you left.
I like the concept of doing more on the client side, making web applications actually feel like applications instead of static pages that have to refresh everytime you change a combo box.
However, from the comments I've read, AJAX seems like a bad solution. First off, I HATE XML. It's overly verbose and wastes tons of bandwidth. People say its human readable, but have you ever tried to open an abiword document in a text editor? Human readable?
You know what's human readable? LDIF. It's the stanrd format for importing and exporting information from an X.500 directory (LDAP, Novel Directory, etc). It's human readable, the dn gives you a location where the information fits into the tree and it eats up a lot less space than XML (although there is a lot of repeated data and wasted space still)
XML does have advantages over properity text and binary protocols in being standaridzed with DTDs/schema, however it still feels like bloat. You ever look at a raw SOAP request? It's not pretty. It's actually quite distrubting.
Still, overcomming the logistic of javascript implementations on multiple browsers is quit a task and there are many engines and concepts, AJAX being only one of them, that seem to do a good job of takling the issue. As far as XML based protocols, I try to avoid them at all cost.
Sumdog
Why not just use Echo2 and not have to worry about the details of an AJAX implementation for Java? I generally prefer not to reinvent the wheel, and with all of the various browser quirks with respect to AJAX, that's quite a non-trivial wheel to try and recreate.
"First off, I HATE XML. It's overly verbose and wastes tons of bandwidth."
Shhhh! Don't anyone tell him about server-side compression/ Client-side decompression. He hates XML so much. You'd be wasting your breath.
AJAX refers to JavaScript technology. Really, I'd expect better from IBM, JavaScript and Java are two totally separate languages.
Search Engine Optimization Tool
I do some parsing. But instead of XML, I use the HTTP-headers format.
My-var1: Something
My-var2: (Something_base64_encoded)
Has been pretty useful for me.
Does anyone have any real world experience with either DWR or JSON? I'm curious to hear what others think.
TrackIt is an application that takes advantage of all of the above technologies.
There's a pretty good library I've used recently called DWR.
If you're looking for a Java library to do some of the heavy lifting, check it out.
I stopped reading IBM articles a while ago. The forced registration is very annoying. Another reason is that the articles are often pointless.
Check out the new cal for Hula http://hula-project.org/Hula_Server - amazing work.
And the front end to the webmail for Zimbra http://www.zimbra.com/
Really, really nice stuff.
bad_outlook
--
Is this vague enough for you?
<head>
<title>Ajax app</title>
<script type="javascript" src="ajax.js">
</head>
<body onload="ajaxInit()">
<noscript>
We are very sorry but we, the developers of this website don't understand the web. We would like to provide a non-script alternative for the visually impaired, disabled and people with security smarts but "Ajax" is the future of the interweb and you are not. If you do happen to be visually impaired, disabled or security conscious then fuck off because we are too busy fapping to the latest buzzword to give a shit about you.
</noscript>
</body>
</html>
Anyway, yes I know this stuff has been around for years, but it's always been a bit hairy to implement and there were NO standards (kind of where ORM was before Hibernate and iBatis, etc.). This really could be more than a new 'fad' and allow developers to rapidly build dynamic apps based on common standards (think supportable, appliable, and extendable).
Spellchecker? We do not need no stinkin' spellchecker!!!
I made a little window-manager-esque thing in Javascript/CSS/HTML a few weeks ago (Looks messed up in IE, works fine in Firefox)
http://dugnet.com/klown/ajwm/, all that's needed are some AJAX functions to swap out the contents of each window, instant freakish web-app thing..
brand name?
Here we have a detailed, in-depth article about client-side browser XML processing that doesn't once mention XSLT. If you're writing JavaScript to transform your XML responses into updated client-side HTML by manipulating your browser's DOM, you probably should be listening to those who are recommending nonstandard-but-terse formats for data interchange.
And while we're on the subject of terseness: complaints about "bloated" XML are meaningless outside of a context that takes the application's overall bandwidth requirements into account. Is an XML document bigger than a binary data stream? Sure. Is this significant? Depends on your application.
It's not "aha"!!!
Since everyone else is mentioning their favorite AJAX toolkit, I'll list one too:
x .html
http://javawebparts.sourceforge.net/javadocs/inde
This is a component of the larger Java Web Parts project called AjaxTags. It's a taglib that allows you to easily add AJAX functionality to arbitrary page elements in a purely declarative manner, i.e., *NO* coding on your part (although there is more capability there if you need more). It really makes AJAX a breeze, and is pretty powerful at the same time. If you are a Java web developer, have a look, you may very much like what you see!
P.S., The parent projects' page is here:
http://javawebparts.sourceforge.net/
If a pion (n-) collides with a proton in the woods & noone is there to hear it, does lamdba decay into the source pa
There's a recent article on MSDN that talks about Ajax on ASP.Net:= /library/en-us/dnaspp/html/ASPNetSpicedAjax.asp
http://msdn.microsoft.com/library/default.asp?url
AJAX!!1
random underscore blankspace at ya know hoo dot comedy.
Now, that's even lighter and faster than GZIP+XML!
random underscore blankspace at ya know hoo dot comedy.
When we can do that, we'll know this "Web 2.0" is really here finally.
random underscore blankspace at ya know hoo dot comedy.
Does anyone know of any AJAX toolkits targeted towards PHP developers? I am currently working on a project that could definately gain a lot from AJAX.
Anthony Papillion
Advanced Data Concepts, Inc.
"Quality Custom Software and IT Services"
For me (I am the author of japano, an MVC/JSP engine also containing dynamic javascript integration features), the following additional principles are were important:
while (!asleep()) sheep++
Why does the Java applet security model require a browser user to set a value in their "Java Control Panel" (or other security policy equivalent), just to allow a browser to use URL class communications via a Proxy object that points at the server from which the applet was served? I'm talking about security exceptions on URLConnection.openConnection(Proxy). Stopping connections to any other host makes sense, because that could be a host within the client's firewall. But what's the point of stopping another connection to the applet's server, which could have sent whatever it wanted embedded in the applet itself? Requiring that manual security change discards the entire applet "zero install" convenience of software distribution. Which is Java's main benefit for client apps.
// Get the MIME type of the object at the URL.
) ;
This code:
String getMIMEType(URL linkURL)
{
HttpURLConnection linkConnection;
String contentType = "";
SocketAddress addr = new InetSocketAddress("appletServer", 6666);
Proxy proxy = new Proxy(Proxy.Type.HTTP, addr);
try
{
linkConnection =
((HttpURLConnection)linkURL.openConnection(proxy)
System.out.println("lC: " + linkConnection.toString()
+ "; C-T: " + contentType);
System.out.println("using proxy: " +
linkConnection.usingProxy());
contentType = linkConnection.getContentType();
}
catch (IOException e)
{
System.out.println("IO Exception: can't connect to "
+ linkURL.toString() + ": " + e.toString());
}
}
just fails to report that it's using the Proxy. Because it isn't. What a pain.
--
make install -not war
Bindows (note the B) is a pretty cool framework for AJAX. It can be downloaded for free for educational/research purposes http://www.bindows.net./ For commercial it's $695. No, I don't work for them, and am not slashvertising. I haven't ever heard any mention of it on /. and wondered if people just don't know of it or don't like it. I'm writing a .NET backend (will be GPL eventually) for it that will make client-server more seamless. Automatic event hook-ups, state-syncs, etc.
The article doesn't say whether this is Telamonian (Great) or Oilean (Little) Ajax. D'oh!
It seems that web geeks are so pleased with themselves that they can now have web applications which dynamically update, without having to redload the page.
Now, I may be dim, but I understood that most computer applications could achieve this around thirty years ago??
Doh!
Who is this delectable creature with an insatiable love of the dead?
"Its not just for XML and its not just a J language either... Ruby will do."
No, XML isn't really a requirement of functionality. If by J you mean a Java backend, you are correct, but not if you mean Javascript Without Javascript you cannot have AJAX-like functionality unless you use a plugin or browser addon like JRE, Flash, etc.
I just wanted to clarify this point to those who might take that statement the wrong way. Coding something in C++ that talks to a server is not AJAX, for instance. AJAX, imho, is defined by 3 characteristics.
1. AJAX involves dynamic content, not static content. This means that there is a seemless interaction, without the application appearing to "reload".
2. AJAX involves a stand alone web browser or an embeded web browser that is running the common scripting language Javascript.
3. AJAX involves data retrival from a source outside of the client-side application itself, and does not solely use data embedded in the application itself.
I could refine those a bit, but I think the general ideas come across. So, really, a Java applet embeded in your browser that talks to the server, such as an IRC chat client, is not AJAX, though it may provide AJAX-like functionality. The language of the backend is irrelevant; the data formats are irrelevant. The only relevance, really, is that you are taking something that has generally been static (web pages) and made the operate like a fully functioning application. It's the transition from "Information" (HTML) to "Application" (AJAX).
The definition really can't go beyond this. If it isn't limitted to seemless dynamic content, you could call any webpage that contained Javascript AJAX. If it isn't limitted to browsers and Javascript, then you could call an SSH program, chat applet, multiplayer game XBOX game, etc. "AJAX clients". If it isn't limitted to outside data, then you'd have to call Javascript clocks AJAX. An application must (at least) satisfy these three conditions before it can be called AJAX. If it doesn't, it may still be a really good interactive and dynamic application, though not AJAX.
The core of AJAX, XMLHttpRequest, is the only place I think the term XML is validated in the AJAX acronym. And, certainly, you can load any type of data you wish with it. If there was any single thing to define AJAX, it is this command. Without it (or something like it coded in a round about way... who knows, some people like the challenge) you cannot satisfy all 3 conditions.
I8-D
I've used AJAX successfully on one corporate site, but for most of my sites I find the dynamic content looks cool, but is impractical as the user can't bookmark the results of their selection - or copy and paste the link to their friends.
ie. google maps has to have the "Link to this page" hyperlink
OK for them, not really ok for my fledgling sites.
The best use I've found for it so far is loading data into select boxes, especially in linked select boxes when narrowing. That actually looks great.
I really want to find a creative use for this tech in the future, I've been trying to innovate. eg. Interactive polls on the front page perhaps, real time comments... all without the page updating. A lot of possibilities, but of course I always have to try and make things useful to the client rather than using it as a way to show off.
generic
More on AJAX and accessibility can be found here: AJAX and Accessibility.
Standards Schmandards
So far it's been great. Very easy to add to add to a project, well documented, light-weight. It makes AJAX so easy.
For testing and exploring, there's an interactive web page generated automatically by the servlet. From those pages you can see exactly which classes and methods you have access to! From there you can even call your server side methods interactively. Look ma no code!
http://frank@franklinharper.com/
So far it's been great.
DWR is very easy to add to add to a project, well documented, and light-weight. It makes AJAX so easy because javascript stubs are generated automatically for the Java classes you decide to export.
For testing and exploring, DWR creates an interactive web page generated automatically by the DWR servlet. From those pages you can see exactly which classes and methods you have access to and the number of parameters required! From there you can even call your server side methods interactively.
Look ma no code!
http://frank@franklinharper.com/
What's "distrubting" to me is your peculiar spelling...
Is there a way in Java script, or another implementation of this technique, that will trigger an update after a given time interval? OK, I can look this up myself (and will), but was wondering if anyone has done this to create a live page.
You only use 2% of your DNA
The simplest trick I remember was to use the innerhtml property of hidden divs, and write var data there, and then use a timer in the JS to load it up.
I still use that trick as it's a good replacement for session cookies when you really don't want to code a any backend scripts or mess with cookies for some little "play page".
I8-D
Ajax is a fine integration platform. We here at Lightspoke have adopted this framework for our own web-based database. Since then scores of customers have used this capability to extend our database to their existing web sites. We spent a lot of time figuring out the performance aspects - a sort of Ajax for the real world if you will. We need more articles on using Ajax in real settings - best practices, case studies, lessons learned. Integration is the key to eeking ever last but of value out from our existing technology investments. I believe our customers would be the first to agree to that.
Lightspoke Web Based Database