Showing posts with label AJAX. Show all posts
Showing posts with label AJAX. Show all posts

Friday, July 27, 2007

OSCON: Prototype and Object.prototype

After the afternoon break, and we're back with Prototype and Object.prototype: JavaScript Power Tools given by Amy Hoy. As Mark mentioned earlier in the day, there a bunch of different AJAX toolkits, and Prototype is one of the bigger players.


Amy Hoy talking about prototype

Javascript is a real language, and everything is an object, really, everything. Even strings are objects,

var string = "This is a string"
string.length;

It relies very heavily on functions, while it does have objects, it doesn't have classes. It's a prototype based language...

Update: It's interesting sitting in Javascript talks, the people giving them sound the same way people did giving Perl talks five years ago. They start off justifying their language of choice, reassuring you it's a real language and explain why it can do cool stuff. Thinking about it, there are a bunch of ex-Perl hackers working on AJAX related stuff as well. Interesting, don't you think? These people are definitely drinking the Kool-Aid.

Thursday, July 26, 2007

OSCON: Ajax and Web Services

I'm in Mark Pruett's talk on Ajax and Web Services. He's defining an Ajax application as a web service client that runs inside a web browser, and he's going to be talking about both REST and SOAP services.


Mark Pruett's talk on Ajax and Web Services

Mark argues that people go through an evolutionary path in the way they use Ajax, they start off sending back a chunk of HTML, they move on to sending back delimited text, then XML and finally some people move to JSON.

There a bunch of client side Ajax toolkits: prototype, Dojo, GWT (Google), Atlas (Microsoft), Rico, Zimbra, DWR. Some of these, like GWT and DWR are tightly coupled with the server side language. You probably want to pick a toolkit that doesn't do that...

Update: He's talking about the whole SOAP vs REST debate, and arguing that externally you should expose your services via REST, but internally SOAP might be more appropriate, or at least more frequently used. Which isn't necessarily the same thing.

Update: REST uses GET, PUT, POST and DELETE. Where GET will get data, a PUT will create a new resource, POST will update an existing resource and DELETE will delete an existing service. Although of course there are certain limitations to GET which means that you sometimes have to use POST anyway.

Update: He's just totally dismissed synchronous REST requests, arguing that you should always use asynchronous requests. Which seems like a lot of overhead for simpler services. Although he's also arguing that you shouldn't bother with XML, but you should be using JSON instead, which means you can do this,

var my_json;
my_json = eval ("(" + http_request.respinseText + ")");

which I think is probably officially evil.

Update: He's moving on to talk about the cross-domain problems. This is something we've all run into before, because of course you can only do Ajax calls to the server that delivered the original page. One way around this, which actually hadn't occurred to me before, is to use Apache ProxyPass rules and redirect calls to other servers transparently to your client side Javascript.

OSCON: Error Handling in Ajax

Next up, I'm in the Error Handling in Ajax session given by Anthony Holdener, who seems to be running late.

Update: Except that I'm now not. Nat just walked in and said that the speaker had mailed them months ago to say that he wasn't going to make it and the session was cancelled, except that nobody had actually got around to cancelling it. He didn't look that happy...

Monday, June 11, 2007

The WWDC'07 keynote

Well I'm typing this using the new Safari 3 Public Beta on my ageing 12-inch Powerbook, and I must admit to being moderately unimpressed. It looks like they've finally caught up with Firefox. Okay, so everybody and their dog have been able to rearrange their browser tabs, but being able to drag one out of the browser and make a new window is kind of cool, although not being able to drag another window into your browser to make it a tab definitely isn't.


Inline search in the Safari 3 Public Beta

The new inline search feature is definitely cool, and along with the new snapback feature for returning to my search results after I've navigated navigated away from the original page, look like a good solid user interfaces. It also look like they've been talking to Google as a good deal of the new Blogger interface has suddenly gone "live" with the new browser. I wonder how many more Google applications that were previously just non-functional with Safari (or had limited functionality) just also started working?

For a public beta, the new browser also seems reasonably stable, so I can't complain too much, but what's really new? It's a web browser, I'm no longer impressed by a web browser. Why doesn't do exposé for tabs in the same way as Shiira does? Why doesn't it apply some sort of default style sheet for HTML and XML source code, why do I have to hit View Source? For that matter why does View Source not do syntactic highlighting when it shows you the page source? Every other browser does...

That said the new beta looks good, but I'm still probably going to stick with Safari for the same reason I always have, that it integrates into the system spell checker when entering text.

Apart from the new Safari, Steve talked a lot about the new features upcoming in Leopard. We've seen some of this stuff last year at WWDC'06, but there was some new stuff...

Although I guess someone has been looking at the BumTop interface, because you know what, Stacks look a bit familiar and to be honest, I've never really liked the iTunes interface. I don't have enough screen real estate for it on my 12-inch Powerbook, so the new Finder doesn't really impress me that much. Quick Look is okay, but not an amazing step forward.

I think it's quite telling that Apple stock fell 3% following the keynote. None of the announcements here are particilarly amazing, and when it comes down to it where were all the cool hardware the rumour sites were promising. Where are the new ultra-portables to replace my 12-inch Powerbook ?

I'm not even going to mention the weak excuse for developer support for the iPhone. If it doesn't appear as an icon on the main phone interface, it's a web application, not an phone application. No matter what the integration with the local hardware turns out to be...

Update: Apple has just posted the keynote address on to their website.

Update: I'm not alone thinking that the third party developer option we're being offered isn't exactly great, although I agree that Steve didn't really do a good job of selling what they are offering to the assembled developers.

Update: I should have thought of this (via iPhone Matters). Because it all makes sense, the reason why Apple has ported Safari to Windows is fairly obvious,
...in order for developers to write and test “applications” for the iPhone, they must have access Safari. As of yesterday, that would limit iPhone developers to Mac developers only, since Safari did not exist on Windows. - The Apple Press
Update: For those of you who missed it, "Hello I'm Steve Jobs"...


Update: David Cann has created an iPhone interface mock-up (via TUAW) to try and get a feel for how these web applications will look on the iPhone. I'm still not convinced, if it doesn't show up as an icon on the main interface, will users really think of it as an application, or just another web site?

Monday, November 27, 2006

Web 2.0 or is it 3.0?

Nick Carr declares that Web 2.0 is dead, and with John Markoff announcing the arrival of Web 3.0 in the New York Times before the paint is dry on 2.0 maybe he's on to something..? Of course somewhat predictably Tim O'Reilly disagrees and argues that we'll get there when we get there, and that Markoff is talking about Web 2.0 anyway.

While only a couple of days after Bill Thompson argues that Web 2.0 is a dead end which is distracting people from building real distributed systems, Kathy Sierra argues that Web 2.0 is more than a buzz word (via O'Reilly Radar). It looks like the whole Web 2.0 argument is kicking off again, and this time people aren't taking any prisoners...

Update: More from Nick Carr, who seems to be going with the Casablanca Test for Web 2.0, "I can't define it, but I know it when I see it"...