File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes What can Prototype/Scriptaculous/Rico etc do? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "What can Prototype/Scriptaculous/Rico etc do?" Watch "What can Prototype/Scriptaculous/Rico etc do?" New topic

What can Prototype/Scriptaculous/Rico etc do?

Charlie Havener

Joined: Jul 07, 2003
Posts: 8
Overwhelmed with web site technologies - how do I choose between Java Applets, Adobe Flex2/Flash, and these new Javascript libraries when I need to make a graphic design editor on a web page. These are needed for any site that offers custom business cards or custom labels for example. Most of these are Flash editors. I recently did a java applet drawing editor, see my web site under Technology Demos for CoiApplet at Can these new javascript libraries do this kind of thing? I find programming in raw javascript to be a nigthmare. Is it worth the time and effort to master these numerous new libraries? For me it isn't unless they can replace the Flex/Flash and Applet capabilities.

David C. Crane
Ranch Hand

Joined: Oct 13, 2005
Posts: 59
Hi Charlie,

Nice applet.

Vector graphics and Ajax are still a little way off, although SVG support in browsers is getting better. Have a look at Kyle Scholz' JSViz to see what can be done. ( His interactive graphs will use SVG if it's available, otherwise fall back on plain old DOM.

Your nightmare experience of JS isn't uncommon. I too came to JS from a Java background, and hated JS for a long time. It's kind of grown on me a lot now, as I've realised that it's a different kind of language, borrowing a lot from functional programming as well as from OO languages. P & S in Action is, in part, a chronicle of my learning to work with JavaScript rather than try to wrestle it into being Java. Prototype certainly makes it easier to understand JS, and to work with it fluidly and elegantly. Chapters 8-10 cover a lot of language fundamentals, as well as Prototype's extensions to the language.

In the end, though, it's horses for courses. Some things can be be easier in Flash or an Applet, especually in an intranet or similar where you can mandate the browser specifications.



---<br />Author of...<br />'Ajax in Action' <a href="" target="_blank" rel="nofollow"></a><br />'Prototype & Scriptaculous in Action'<br /><a href="" target="_blank" rel="nofollow"></a><br />'Ajax in Practice'<br /><a href="" target="_blank" rel="nofollow"></a>
Charlie Havener

Joined: Jul 07, 2003
Posts: 8
Dave, I looked at the link you gave but all links on that page are circular, I can't get anywhere in my FireFox 2 browser. But I clicked on the dojo ad on the right and found some very interesting SVG demos. E.g.

From your reply my impression is that Prototype and Scriptaculous can't easily make a graphic designer for custom labels but maybe something like Dojo might. However it seems to be on the bleeding edge with one book in sight. In fact Amazon turns up only one, a Dojo Wisdom book that seems like Judo/karate - nothing to do with programming.

I read the excellent tutorial on Javascript and Prototype in your Ajax in Action book and I realize that Javascript is Lisp in disguise but I still don't have a clear picture of what it is capable of in the graphics drawing editor realm. At the moment it doesn't look like much.

The whole Javascript programming model in a browser is difficult to get a grasp on. It is not multi-theaded and when the page that the Javascript is on is replaced, it just commits suicide. A common javascript application on web browsers and one I am tinkering with now is the on line chat for customer service. It seems you really must open a pop up window with Javascript in it talking to the server just to keep the javascript alive.

Iv'e been trying to figure out how a cobrowse feature would work using javascript. This would let the customer service control the customers browser over the web to direct them to suitable product pages. In the presence of a site that uses an iframe and a tree menu like, this is a real challenge. The Russian coldbeans Cobrowse servlet is the closest thing I have found to a real cobrowser but it is old and not production ready. The source costs $500 so I don't really know how it works.

Would Prototype or Scriptaculous help make a cobrowse web site controller?

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
For SVG look at this:
The demos in the download show you what can be done with a few lines of code.

Could you do a co-browse with Ajax, sort of, you are not going to control the user's computer, but you can update fields and do things. Will not be real time.

The best soultion for that would be a Flex type of application. If you would have gone to any of the Ajax Events where Adobe talks, they show a Flex application that has video chat with the customer service and they take control of the screen to fill out the form.

I agree. Here's the link:
subject: What can Prototype/Scriptaculous/Rico etc do?
It's not a secret anymore!