Are there any conversion guides between Javascript frameworks?

I have a date picker library written for MooTools that I want to pass to Prototype. This seems like a long, arduous task, and I wonder if anyone has seen or written manuals about the differences between them. Variable translation dictionary, where I can find the Moo function and see the prototype equivalent, or vice versa.

The same would be good for jQuery for Prototype.

+4
source share
4 answers

I wanted to find something like this for a while. It turned out that I wanted to make my own, and a few weeks ago I started ArtLung Rosetta to have a "Hello World" page with various methods in many large libraries. This is a work in progress.

However, a few weeks ago I came across this EXCELLENT Matthias Schütz resource. JavaScript Library Comparison Matrix . This link site has syntactic comparisons with links to related documentation for: DOM Ready , DOM Fundamentals , DOM Filtering , DOM Manipulation , Effects , Transitions , Events , Custom Functions , Ajax and Classes .

I like to compare different approaches to libraries - I find that I tell a lot about the libraries themselves, about my own programming style and how I can improve it by performing the same task in several frameworks.

+2
source

I'll take a hit on this. If you did not find any resources after a thorough search on Google, I would say that you are stuck in simply opening everyone's API and just consult them back and forth and look at examples.

I am really moving from Prototype to jQuery in the project right now. (Also: I'm much happier with jQuery, which has been using both for a while.) My main workflow just references the API as needed.

I would be surprised if there was such a comparison among themselves. In both frameworks, there are many ways to accomplish any given task, and in addition, they work in different and important ways. Of course, there is some 1: 1 relationship, such as “addClass” and “addClassName,” but the JQuery DOM manipulation usually works with sets of elements (which can only be a set of 1), while Prototype works with individual elements (which can be wrapped each operator works with sets).

Fortunately, both have a pretty good and easy to use / reference API.

Good luck.

+2
source

As mentioned by Keith, there is no 1: 1 correspondence between the functions provided by the libraries.

More importantly: different frameworks require different mentalities. It is very little about renaming functions; it is more about writing code in the style of another structure. Thinking like "What will jQuery's way be?"

If you port code from frame A to B and don't know B very well, you can easily get something pretty ugly.

+1
source

I can not come up with any conversion guides. But there were a few blog posts on Library1 versus Library2, where libraries are compared and matched. It is probably worth hunting them and reading them.

0
source

All Articles