Object Models in – Ruby – Javascript



Object Models in – Ruby – Javascript

0 0


rubyjs_objmodels_pres

presentation comparing and contrasting the object models in ruby and javascript with the intention of explaining the difference in the maturity of each language's application design patterns

On Github ashleygwilliams / rubyjs_objmodels_pres

Object Models in

Ruby

Javascript

Ashley Williams, @ag_dubs

Goals

Javascript Objects

reveal.js is a framework for easily creating beautiful presentations using HTML. You'll need a browser with support for CSS 3D transforms to see it in its full glory.

Ruby Objects

Slides can be nested inside of other slides, try pressing down.

Ruby Classes

Press down or up to navigate.

Data Encapsulation

Cornify

Summary

Creating Objects

Not a coder? No problem. There's a fully-featured visual editor for authoring these, try it out at http://slid.es.

Creating Objects

Press ESC to enter the slide overview.

Classes are Objects

Press ESC to enter the slide overview.

Summary

Try it out! You can swipe through the slides and pinch your way to the overview.

Object.create

  • No order here
  • Or here
  • Or here
  • Or here

Eigenclasses

One is smaller than... Two is smaller than... Three!

Summary

Questions

  • Did the lack of native data encapsulation features retard the adoption of javascript as a language for large applications?
  • What strengths does the prototypal inheritence pattern afford? In what sorts of situations is it preferable to classical inheritence?
  • What specific benefits did the more naive object model afford javascript? Do we lose anything with the more expressive, opinionated model we gain in ES6?