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.
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-scriptaculous@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en.
-- 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-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
> 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.
> 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-scriptaculous@googlegroups.com. > > To unsubscribe from this group, send email to > > prototype-scriptaculous+unsubscribe@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/prototype-scriptaculous?hl=en.
-- 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-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
> 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.
> > 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-scriptaculous@googlegroups.com. > > > To unsubscribe from this group, send email to > > > prototype-scriptaculous+unsubscribe@googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/prototype-scriptaculous?hl=en.
-- 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-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
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.
On Mon, Nov 28, 2011 at 11:57 AM, buda <www...@pochta.ru> wrote: > 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.
> > 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-scriptaculous@googlegroups.com. > > > To unsubscribe from this group, send email to > > > prototype-scriptaculous+unsubscribe@googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/prototype-scriptaculous?hl=en.
> -- > 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-scriptaculous@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en.
-- 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-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
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.
> 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
> On Mon, Nov 28, 2011 at 11:57 AM, buda <www...@pochta.ru> wrote: > 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.
> > 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-scriptaculous@googlegroups.com. > > > To unsubscribe from this group, send email to > > > prototype-scriptaculous+unsubscribe@googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/prototype-scriptaculous?hl=en.
> -- > 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-scriptaculous@googlegroups.com. > To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
> -- > 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-scriptaculous@googlegroups.com. > To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
-- 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-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
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:
-- 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-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
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
On Nov 30, 6:38 am, Victor <vkhomyac...@gmail.com> wrote:
-- 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-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
1. Declaration with value assignment 2. Declare loop variables and cache length inside of for() - this can increase performance <http://jsperf.com/caching-array-length/67> - 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"); }, ...
> 1. Declaration with value assignment > 2. Declare loop variables and cache length inside of for() - this can > increase performance <http://jsperf.com/caching-array-length/67> - > 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"); > }, > ... > });
> -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/prototype-scriptaculous/-/FBTDmhOjgWoJ. > To post to this group, send email to > prototype-scriptaculous@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en.
-- 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-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.