Title: Tech Times
Email not displaying correctly? View it in your browser.

Issue 209: October 1, 2008  Tips, Tricks, News and Reviews for Web Coders

Introduction

Andrew
TetlawWeb Directions South '08 rocked! Web Directions is always a huge boost and if you're like me, you want the residual glow to last as long as possible.

Matt has a nice wrap-up of day 1 and day 2, and Alex covers the fun we had at WebJam on Thursday night. Read on for the highlights of the interview I had with Dmitry Baranovskiy, author of the Raphaël _javascript_ library.

Top

More Free Stuff? Yep! Take A Quiz And Win A Book!

Test yourself on the contents of our latest Adobe AIR article, and grab yourself a copy of the pocket guide, Adobe AIR For _javascript_ Developers, delivered to your home for FREE. This offer is only available for the first 100 people, so get in quick!

Download the Adobe AIR SDK and get started now.

Summary

Dmitry Baranovskiy Talks about Raphaël

by Andrew Tetlaw

Dmitry is the author of the amazing Raphaël _javascript_ library, which I discussed back in Tech Times #205. At Web Directions South, I managed to catch his presentation and chat about how Raphaël came about.

Here are the highlights from our discussion. If you'd like to read the whole interview, you can find it in the SitePoint blogs.

SitePoint: Right, I thought my first question should be: why did you write Raphaël? What inspired you to write it?

I was doing a FedEx project. Internally at Atlassian, we have FedEx Days when you are given the time to present a project you've been working on.

SP: FedEx Day--did you say?

It's called "FedEx" because you have to deliver something cool. You show it off at a small competition (it's not about big prizes--it's more for fun), and of course it should be related to the projects you work on. Because I'm a front end engineer and all the other guys are Java developers, I thought I'd focus on a front end project that will impress people. It's hard to impress back end developers.

So I thought I'd do something the programmers might not know anything about, and because I've had experience with SVG before, it made sense to work with SVG. But, as a front end developer, I'm concerned about creating something that only works in Firefox, so I wanted to create a bridge for VML on IE. My original project was to create a charting application, like a simple line chart. I quickly knocked it up in a day and a half from scratch, showed it, but it didn't win anything. It didn't impress people.

SP: Not even a little bit?

Oh, maybe a little bit, but not in general. So I left it for a while. Then we started our 20% projects (just like Google). I decided to pick up this project and extend it a little bit. I got rid of the charting part and turned it into a generic drawing library. Just a bridge between SVG and VML to enable me to do more cool stuff without worrying about browser compatibility.

So at the next FedEx Day, I used this library to create a Skitch-like application. You could take a picture and add things like arrows and ellipses. It even saved the image, but obviously that's not the hardest part.

Then I started working more on this 20% project. To be honest, I spent more than one day a week: I worked with my laptop on the train -- one hour to work and one hour back -- two days a week in general, for about a month. Then I decided that it was good enough to release, because it's better to do so before another developer releases the same thing. So, I released it in the middle of August.

I was stunned by the feedback. I didn't expect it, to be honest, because I wrote about it on my blog and I usually get about 20 hits per day; but after it was released and made it to the front page of Delicious and Reddit, I got about 8,000 hits per day. It chewed through my bandwidth and I had to create a new domain. It actually started costing me money!

Top

New Release: Build Your Own ASP.NET 3.5 Web Site Using C# & VB

Updated for ASP.NET 3.5, this new book is packed full of practical examples, straightforward explanations, and ready-to-use code samples in both C# and VB. This book will teach you ASP.NET without any fluff or hype.

Grab a free sample now!

SP: Where would you like to see it used?

Oh, well, everywhere. World domination is my goal! Of course, the first thing people think of is charting, and that's how I came to this idea, but what I was trying to show was that charting is just one obvious part. You could use it to add effects to a page, like the rotation of an image.

Say, you're on Flickr and you want to rotate an image by 90 degrees because you've shot the photo on the side. Currently, you press a button, it sends the request to the server, the server does the rotation, sends it back, and you see the rotated picture. Instead, you could use Ajax to just send the basic information: rotate 90% to the right, and on the client you'd have a smooth animation of rotating to the right. That would be a much more pleasant experience for the user for obvious reasons.

It'd be cool, and it's really easy to implement using Raphaël. Without it, it's more complicated to implement because you have to do the IE version separately from the version for all other browsers. Actually that's the whole reason why I built Raphaël--so that you can do something in FireFox and it works in IE. It's not absolutely there yet, but it's getting there.

SP: I was talking to some of the developers at SitePoint and a few of us agreed that, down the track, using SVG and VML driven by _javascript_ could easily replace Flash.

I wouldn't say easily. There are some things that Flash is good at, like streaming video and animations. But if you look at, for example, the Google Analytics charts, then I can't see any reason why it can't be done with Raphaël.

Yesterday morning I was trying to reproduce the Google charts functionality. I did it on the train; it's really easy to do, and it works cross-browser straight away. Of course, to do this you need a _javascript_ developer in your team who will use a program like Raphaël, or as I mentioned in my talk, excanvas, or dojox. To be honest, I think that Raphaël has the more correct approach. It's probably not as well-developed yet, but those other libraries don't approach the usage correctly. They mix canvas, SVG, and VML together, and canvas is completely different. SVG and VML are ideologically the same. Well, to some extent, I guess.

I don't think it will replace Flash, but if in some task you could use SVG instead of Flash, I'd be happy to see that. Something native, something you can hack--the whole concept of the open web. SVG, and even VML, is more open than Flash. You can hack it up, you can view source, whatever. And, of course, Flash doesn't work on iPhone. That's another reason for doing this using native browser technologies. I'm not talking about Raphaël specifically; I think SVG is the way to go for a lot of things.

SP: The issue of accessibility comes up a lot in regards to Raphaël, although when I look at your demos you tend to stick to the ideal of unobtrusive _javascript_ anyway.

When you talk about images and charts--and whatever SVG produces, it's always an image, dynamic or not--it's always an accessibility issue. At my talk, we spoke about how a screen reader should read SVG; how they should read circles, and ellipses, and combinations of them. Even if you had a good parser that could read the shapes you create on the page, you couldn't tell what the shapes actually create: the final image. It's really complicated and very difficult to explain if the user is blind. Like how would you explain the Web Directions logo to a blind user? I don't think screen readers will ever be able to do this.

So it's all up to the developer to do it properly. For example, in the case of my charts, I have a table on the page. A screen reader can see that table, and if you have _javascript_ turned off, you can see the table. You still have access to the data; it's not as pretty, not as visually rich, but you can still read it and understand.

I don't think it's a problem with SVG, or a problem with Raphaël; I think it's a generic problem and there are already many articles and books about how to deal with it.

SP: Well thank you very much, really good to talk to you.

No worries.

Read the complete interview and leave your comments on the blog:

Andrew Tetlaw _javascript_ & CSS Blog: Stylish Scripting
by Andrew Tetlaw

Dmitry Baranovskiy Talks about Raphaël

Top

Everything you need to learn _javascript_ from scratch

  • 400+ pages packed with full color examples
  • Hundreds of clear illustrations
  • _javascript_ for the real world!
  • Only $39.95!

Perfect for the _javascript_ novice, this book will teach you _javascript_ with unprecedented clarity, featuring loads of color illustrations and advice on how to use _javascript_ the right way in the real world.

ORDER YOURSELF A COPY NOW!

* Get a FREE _javascript_ poster with every book purchase of Simply _javascript_ (worth $9.95)

See you next week for another issue of the Tech Times!

Andrew Tetlaw
[EMAIL PROTECTED]
SitePoint Technical Editor

Top

Latest Release

The Ultimate HTML Reference

Book

Tell me more..

Free Book Samples

Simply _javascript_
Simply Rails 2
Build Your Own Database Driven Website Using PHP & MySQL, 3rd Ed.
The PHP Anthology, 2nd Ed.

New Technical Articles

Map Your OpenSocial Data Using Flex

Jack HerringtonThe emerging OpenSocial standard is a powerful new API for creating exciting new mashups. In this tutorial, Jack shows how to mix Google Maps, Flickr, and OpenSocial using Adobe Flex. Take the quiz at the end for your chance to win a book!

Full Story...

 Techy Forum Threads

 More Techy Blog Entries

News & Trends

Five Ideas for Billowing Cloud Storage
Flash Coming to iPhone, Maybe... If Apple Says Okay
3 comments
GNU Founder: Cloud Computing is "Worse than Stupidity"
7 comments
Microsoft, Nokia Adopt jQuery
6 comments
HelpWith: Social Search Without the Effort

Web Tech

A New Era in Drupal
1 comment
Web Directions South, Day Two: Crowd vs Community
4 comments
WebJam 8: Smells Like Geek Spirits (and Beer)
2 comments
Web Directions South, Day One: Conversation Is King
More Free Stuff? Yep, Take A Quiz And Win A Book!
8 comments
Windmill Web testing framework releases version 0.8.2

PHP

DOM vs. Template
5 comments

Help Your Friends Out

People you care about can benefit from the wealth of information on new and maturing technologies available on the Internet. Help them learn how to do it by forwarding them this issue of the Tech Times!

Send this to a friend
You are subscribed as : [EMAIL PROTECTED]

Unsubscribe [EMAIL PROTECTED] from this list.

Manage your subscriptions.

View the newsletter archives.

Mailing Address:
48 Cambridge St, Collingwood, VIC, 3066 AU
Phone: +61 3 9090 8200
© Copyright 2008 SitePoint. All rights reserved.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MIS.Suresh" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/missuresh?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to