Inheritance

a side project (at a train ride)

WHO AM I?

github.com/johannesboyne
twitter.com/johannesboyne
about.me/johannesboyne
xing.com/profile/Johannes_Boyne
linkedin.com/in/johannesboyne

What this talk is about

  • The little story behind a side project
  • Why you should do side projects
  • What I wanted to talk about
    • JS INHERITANCE

The little story behind a side project


"MoR is coming and I could tell sth. about JS inheritance"
"Well, I'm on a train, I could use the time!"

My 'Problem'

I need an interactive, online JS Shell... a nice one please!

One I can  iframe  inside this presentation!

MY Soltion

online   JS Runner

atm.: http://onlinejsrunner.nodejitsu.com

  • online, interactive JS shell
  • vanilla JS code is executed insight Node.js' VM
    • sandboxed
  • Technology
    • Node.js
    • Ace Editor
    • => that's about it!

Why you should do side projects

fun
creativity

Famous "Side Projects"

Elon Musk's "Hyperloop"
Some of Google's Services
Einstein's  photoelectric effect, Brownian motion and special relativity papers

Incubation

Inspired by Distraction

Why using Inheritance?

  • "OOP"
  • Easier Developing => better collaboration
  • Easier Testing
  • JS != class-based
    • it's not Java nor  C++
  • Instances (objects) all the way down
  • var a1 = new A()
    // 1. create (in memory) a1
    // 2. copy A.prototype into a1.[[Prototype]]
    //   a1.[[Prototype]] = A.prototype
    
    // calling a1.someProperty
    //   I)  check if someProperty exists on a1
    //   II) check if it exists on a1.[[Prototype]]
  • mdn/[...]/JavaScript/Guide/Inheritance_Revisited
  • http://javascript.crockford.com/inheritance.html

Give me an example


But, how about performance?






 NEXT TIME IS GO TIME!
package main

import "fmt"

func main() {
   fmt.Println("Hello, MoR!")
}

 Inheritance

By johannesboyne

 Inheritance

  • 2,308