Where is ver. 2.0 is coming?

25 views
Skip to first unread message

buda

unread,
Nov 28, 2011, 11:30:30 AM11/28/11
to Prototype & script.aculo.us
Who knows when is early code ver.2.0 of the library will appear?

Pablo Aravena

unread,
Nov 28, 2011, 11:48:38 AM11/28/11
to prototype-s...@googlegroups.com
Hi buda

I think there will be no new releases of prototype in the near future. That is sad, but some months ago I began looking at CoffeScript and I began thinking that it will be the natural replace for prototype library. Also many of the original creators of the prototype library are working on that project. 

See this presentation:



Saludos
Pablo

On Mon, Nov 28, 2011 at 8:30 AM, buda <www...@pochta.ru> wrote:
Who knows when is early code ver.2.0 of the library will appear?

--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
To post to this group, send email to prototype-s...@googlegroups.com.
To unsubscribe from this group, send email to prototype-scripta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.


buda

unread,
Nov 28, 2011, 2:57:55 PM11/28/11
to Prototype & script.aculo.us
But it's only new syntax sugar - not framework like Prototype with
many features!!

On 28 ноя, 18:48, Pablo Aravena <paraven...@gmail.com> wrote:
> Hi buda
>
> I think there will be no new releases of prototype in the near future. That
> is sad, but some months ago I began looking at CoffeScript and I began
> thinking that it will be the natural replace for prototype library. Also
> many of the original creators of the prototype library are working on that
> project.
>
> See this presentation:
>

> https://sstephenson.s3.amazonaws.com/presentations/fowa-2011-coffeesc...

buda

unread,
Nov 28, 2011, 4:05:56 PM11/28/11
to Prototype & script.aculo.us
I'm vary sad - I have to migarte on jQuery (((

Pablo Aravena

unread,
Nov 28, 2011, 3:41:37 PM11/28/11
to prototype-s...@googlegroups.com
Is an object oriented language, and you can combine it with a selector engine like jquery. I think is a good match for a migration, just my point of view.

Regards
Pablo

Victor

unread,
Nov 29, 2011, 8:54:01 AM11/29/11
to prototype-s...@googlegroups.com
Take a look at RightJS - it is very close to Prototype+Scripty, and (still) has very operative support at Google groups

Walter Lee Davis

unread,
Nov 29, 2011, 9:52:52 AM11/29/11
to prototype-s...@googlegroups.com
CoffeeScript is nothing more than a compact and terse programming language to generate JavaScript. Think of it as HAML for JavaScript. When you use CoffeeScript, it gets compiled into JavaScript before it is served to the browser. It's not a framework, although there are some goodies to make certain constructions less painful to write, in the end, those painful constructions are generated in full (I'm looking at you, for loops).

In contrast, Prototype extends the JavaScript language to give it those terse methods that we love, and under the hood, actually writes a whole shed-load of compatibility shims so we don't have to write such defensive code, even when faced with the beast that is IE. There is nothing like that in CoffeeScript.

Walter

Jelks

unread,
Nov 30, 2011, 12:58:13 AM11/30/11
to Prototype & script.aculo.us
Thank you for that Victor, RightJS looks really cool. Just looking at
the docs, it *feels* like Prototype, but it seems to go way further.
I hadn't even heard about it before. Thank you!!!

Jelks


On Nov 29, 8:54 am, Victor <vkhomyac...@gmail.com> wrote:
> Take a look at RightJS <http://rightjs.org/> - it is very close to
> Prototype+Scripty, and (still) has very operative support at Google groups<https://groups.google.com/forum/?hl=ru&pli=1#%21forum/rightjs>

Victor

unread,
Nov 30, 2011, 1:38:49 AM11/30/11
to prototype-s...@googlegroups.com
Also CoffeeScript sometimes generates very ugly code. Example:

CoffeeScript:
SelectParser.select_to_array = (select) ->
  parser = new SelectParser()
  parser.add_node( child ) for child in select.childNodes
  parser.parsed

Generated JavaScript:
  SelectParser.select_to_array = function(select) {
    var child, parser, _i, _len, _ref;
    parser = new SelectParser();
    _ref = select.childNodes;
    for (_i = 0, _len = _ref.length; _i < _len; _i++) {
      child = _ref[_i];
      parser.add_node(child);
    }
    return parser.parsed;
  };

T.J. Crowder

unread,
Nov 30, 2011, 6:52:28 AM11/30/11
to Prototype & script.aculo.us
Other than the unnecessary assignment to `child`, doesn't look that
bad to me... How would you improve it?
--
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software / com

Victor

unread,
Dec 1, 2011, 9:01:19 AM12/1/11
to prototype-s...@googlegroups.com
1. Declaration with value assignment
2. Declare loop variables and cache length inside of for() - this can increase performance - caching length outside of for() is slower in almost all results (all Firefox and Safari, IE9 and some Chrome results)
3. Unnecessary return values

Example can be rewritten as:
  SelectParser.select_to_array = function(select) {

    var parser = new SelectParser(), _ref = select.childNodes;
    for (var _i = 0, _len = _ref.length; _i < _len; _i++) {
      parser.add_node(_ref[_i]);
    }
    return parser.parsed;
  };

yet another real example:

CoffeeScript (with use of Prototype):
class Chosen extends AbstractChosen
... 
  no_results_clear: ->
    nr = null
    nr.remove() while nr = @search_results.down(".no-results")

CoffeeScript translated to JavaScript:
    Chosen.prototype.no_results_clear = function() {
      var nr, _results;
      nr = null;
      _results = [];
      while (nr = this.search_results.down(".no-results")) {
        _results.push(nr.remove());
      }
      return _results;
    };

and pure JavaScript:
var Chosen = Class.create(AbstractChosen, {
...
  no_results_clear: function() {
    this.search_results.select(".no-results").invoke("remove");
  },
...
});

Phil Petree

unread,
Dec 1, 2011, 9:18:48 AM12/1/11
to prototype-s...@googlegroups.com

Hysterical!!!  Thanks for that laugh!!!

--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
Reply all
Reply to author
Forward
0 new messages