24
“Batteries included”: Advantages of an End-to-end JavaScript Stack Juergen Fesslmeier @chinshr

Batteries included: Advantages of an End-to-end solution

Tags:

Embed Size (px)

DESCRIPTION

Creating Web Applications is challenging. Faced with supporting multiple devices, a patchwork of languages, and various technologies, it requires a team of experts to develop, configure, maintain and run them. In this increasingly complex mix, we’d like to call simplicity to the rescue, so do developers and their clients. In this session we tell the story of what “It just works out of the box.” means for Web and Mobile applications and how “Less lines of code produces better apps.” relates to business. And best, we like to use the same language everywhere: JavaScript.

Citation preview

Page 1: Batteries included: Advantages of an End-to-end solution

“Batteries included”: Advantages of an End-to-end

JavaScript Stack

Juergen Fesslmeier@chinshr

Page 2: Batteries included: Advantages of an End-to-end solution

Challenges

Page 3: Batteries included: Advantages of an End-to-end solution

Web Applicatio

ns

Page 4: Batteries included: Advantages of an End-to-end solution
Page 5: Batteries included: Advantages of an End-to-end solution

Device Fragmentation

Source: http://opensignalmaps.com/reports/fragmentation.php

Page 6: Batteries included: Advantages of an End-to-end solution

A#, .NET, A#, (Axiom), A-0, System, A+, A++, ABAP, ABC, ABC, ALGOL, ABLE, ABSET, ABSYS, Abundance, ACC, Accent, Ace, DASL, ACT-III, Action!, ActionScript, Ada, Adenine, Agda, Agora, AIMMS, Alef, ALF, ALGOL, 58, ALGOL, 60, ALGOL, 68, Alice, Alma-0, AmbientTalk, Amiga, E, AMOS, AMPL, APL, AppleScript, Arc, Arden, Syntax[1], ARexx, Argus, AspectJ, Assembly, language, ATS, Ateji, PX, AutoHotkey, Autocoder, AutoIt, AutoLISP, Visual, LISP, Averest, AWK, Axum, Babbage, Bash, BASIC, bc, BCPL, BeanShell, Bertrand, BETA, Bigwig, Bistro, BitC, BLISS, Blue, Bon, Boo, Boomerang, Bourne, shell, (including, bash, and, ksh), BREW, BPEL, BUGSYS, BuildProfessional, C, C--, C++, C#, C/AL, ObjectScript, C, Shell, Caml, Candle, Cayenne, CDuce, Cecil, Cel, Cesil, Ceylon, CFML, Cg, Chapel, CHAIN, Charity, Charm, Chef, CHILL, CHIP-8, chomski, Chrome, (now, Oxygene), ChucK, CICS, Cilk, CL, (IBM), Claire, Clarion, Clean, Clipper, CLIST, Clojure, CLU, CMS-2, COBOL, CobolScript, Cobra, CODE, CoffeeScript, Cola, ColdC, ColdFusion, Cool, COMAL, Combined, Programming, Language, (CPL), Common, Intermediate, Language, (CIL), Common, Lisp, (also, known, as, CL), COMPASS, Component, Pascal, COMIT, Constraint, Handling, Rules, (CHR), Converge, Coral, 66, Corn, CorVision, Coq, COWSEL, CPL, csh, CSP, Csound, Curl, Curry, Cyclone, Cython, DASL, (Datapoint's, Advanced, Systems, Language), DASL, Dart, DataFlex, Datalog, DATATRIEVE, dBase, dc, DCL, Deesel, (formerly, G), Delphi, DinkC, DIBOL, DL/I, Draco, Dylan, DYNAMO, E#, Ease, EASY, Easy, PL/I, EASYTRIEVE, PLUS, ECMAScript, Edinburgh, IMP, EGL, Eiffel, ELAN, Emacs, Lisp, Emerald, Epigram, Erlang, Escapade, Escher, ESPOL, Esterel, Etoys, Euclid, Euler, Euphoria, EusLisp, Robot, Programming, Language, CMS, EXEC, EXEC, 2, F#, Factor, Falcon, Fancy, Fantom, FAUST, Felix, Ferite, FFP, Fjölnir, FL, Flavors, Flex, FLOW-MATIC, FOCAL, FOCUS, FOIL, FORMAC, @Formula, Forth, Fortran, Fortress, FoxBase, FoxPro, FP, FPr, Franz, Lisp, Frink, F-Script, Fuxi, Game, Maker, Language, GameMonkey, Script, GAMS, GAP, G-code, Genie, GDL, Gibiane, GJ, GLSL, GNU, E, GM, Go, Go!, GOAL, Gödel, Godiva, GOM, (Good, Old, Mad), Goo, GOTRAN, GPSS, GraphTalk, GRASS, Groovy, HAL/S, Hamilton, C, shell, Harbour, Haskell, HaXe, High, Level, Assembly, HLSL, Hop, Hope, Hugo, Hume, HyperTalk, IBM, Basic, assembly, language, IBM, HAScript, IBM, Informix-4GL, IBM, RPG, ICI, Icon, Id, IDL, IMP, Inform, Io, Ioke, IPL, IPTSCRAE, ISLISP, ISPF, ISWIM, J#, J++, JADE, Jako, JAL, Janus, JASS, Java, JavaScript, Javascript#, JCL, JEAN, Join, Java, JOSS, Joule, JOVIAL, Joy, Julia, JScript, JavaFX, Script, Kaleidoscope, Karel, Karel++, Kaya, KEE, KIF, KRC, KRL, KRL, KUKA, Robot, Languageå, KRYPTON, ksh, L#, .NET, LabVIEW, Ladder, Lagoona, LANSA, Lasso, LaTeX, Lava, LC-3, Leadwerks, Script, Leda, Legoscript, LIL, LilyPond, Limbo, Limnor, LINC, Lingo, Linoleum, LIS, LISA, Lisaac, Lisp, -, ISO/IEC, Lite-C, Lithe, Little, b, Logo, Logtalk, LPC, LSE, LSL, Lua, Lucid, Lustre, LYaPAS, Lynx, M2001, M4, Machine, code, MAD, (Michigan, Algorithm, Decoder), MAD/I, Magik, Magma, make, Maple, MAPPER, MARK-IV, Mary, MASM, Microsoft, Assembly, x86, Mathematica, MATLAB, Maxima, (see, also, Macsyma), Max, (Max, Msp, Graphical, Programming, Environment), MaxScript, internal, language, 3D, Studio, Max, Maya, (MEL), MDL, Mercury, Mesa, Metacard, Metafont, MetaL, Microcode, MicroScript, MIIS, MillScript, MIMIC, Mirah, Miranda, MIVA, Script, ML, Moby, Model, 204, Modelica, Modula, Modula-2, Modula-3, Mohol, MOO, Mortran, Mouse, MPD, MSIL, CIL, MSL, MUMPS, Napier88, NASM, NATURAL, Neko, Nemerle, NESL, Net.Data, NetLogo, NetRexx, NewLISP, NEWP, Newspeak, NewtonScript, NGL, Nial, Nice, Nickle, NPL, Not, eXactly, C, (NXC), Not, Quite, C, (NQC), Nu, NSIS, o:XML, Oak, Oberon, Obix, OBJ2, Object, Lisp, ObjectLOGO, Object, REXX, Object, Pascal, Objective-C, Objective-J, Obliq, Obol, OCaml, occam, occam-π, Octave, OmniMark, Onyx, Opa, Opal, OpenEdge, ABL, OPL, OPS5, OptimJ, Orc, ORCA/Modula-2, Oriel, Orwell, Oxygene, Oz, P#, PARI/GP, Pascal, -, ISO, 7185, Pawn, PCASTL, PCF, PEARL, PeopleCode, Perl, PDL, PHP, Phrogram, Pico, Pict, Pike, PIKT, PILOT, Pizza, PL-11, PL/0, PL/B, PL/C, PL/I, -, ISO, 6160, PL/M, PL/P, PL/SQL, PL360, PLANC, Plankalkül, PLEX, PLEXIL, Plus, POP-11, PostScript, PortablE, Powerhouse, PowerBuilder, PPL, Processing, Prograph, PROIV, Prolog, Visual, Prolog, Promela, PROTEL, ProvideX, Pro*C, Pure, Python, Q, Qi, QtScript, QuakeC, QPL, R++, Racket, RAPID, Rapira, Ratfiv, Ratfor, rc, REBOL, Redcode, REFAL, Reia, Revolution, rex, REXX, Rlab, ROOP, RPG, RPL, RSL, RTL/2, Ruby, Rust, S, S2, S3, S-Lang, S-PLUS, SA-C, SabreTalk, SAIL, SALSA, SAM76, SAS, SASL, Sather, Sawzall, SBL, Scala, Scheme, Scilab, Scratch, Script.NET, Sed, Self, SenseTalk, SETL, Shift, Script, SiMPLE, SIMPOL, SIMSCRIPT, Simula, Simulink, SISAL, SLIP, SMALL, Smalltalk, Small, Basic, SML, SNOBOL(SPITBOL), Snowball, SOL, Span, SPARK, SPIN, SP/k, SPS, Squeak, Squirrel, SR, S/SL, Strand, STATA, Stateflow, Subtext, Suneido, SuperCollider, SuperTalk, SYMPL, SyncCharts, SystemVerilog, T, TACL, TACPOL, TADS, TAL, Tcl, Tea, TECO, TELCOMP, TeX, TEX, TIE, Timber, Tom, TOM, Topspeed, TPU, Trac, T-SQL, TTCN, Turing, TUTOR, TXL, Ubercode, UCSD, Pascal, Unicon, Uniface, UNITY, Unix, shell, UnrealScript, Vala, VBA, VBScript, Verilog, VHDL, Visual, Basic, Visual, Basic, .NET, Visual, C#, Visual, DataFlex, Visual, DialogScript, Visual, FoxPro, Visual, J++, Visual, J#, Visual, Objects, VSXu, Vvvv, WATFIV, WATFOR, WebDNA, WebQL, Winbatch, X++, X10, XBL, XC, xHarbour, XL, XOTcl, XPL, XPL0, XQuery, XSB, XSLT, -, See, XPath, Yorick, YQL, Yoix, Z, notation, Zeno, ZOPL, ZPL

Source: http://en.wikipedia.org/wiki/List_of_programming_languages

Page 7: Batteries included: Advantages of an End-to-end solution

HTTP

Framework/ Middleware

DB

Page 8: Batteries included: Advantages of an End-to-end solution

Managing Package Dependencies

/* node v0.6.15 -- package.json */{ "name": "Application", "version": "0.0.1", "private": true, "dependencies": { "express": "2.5.1", "jade": ">= 0.0.1", "redis": "~0.7.1", "hiredis": "~0.1.14", "coffee-script": "~1.2.0", "connect-redis": "~1.2.0", "express-namespace": "0.0.4", "connect-assets": "~2.1.8", "socket.io": "~0.9.2", "underscore": "~1.3.1", "stylus": "~0.24.0" }}

Page 9: Batteries included: Advantages of an End-to-end solution
Page 10: Batteries included: Advantages of an End-to-end solution

Rocket Science

Develop, configure, run and maintain.

Page 11: Batteries included: Advantages of an End-to-end solution

Web Apps for the rest of us.

Page 12: Batteries included: Advantages of an End-to-end solution

Full-stack

Page 13: Batteries included: Advantages of an End-to-end solution

JS App Server JS C/S Library

Development Environment

End-to-end JavaScript stack

Page 14: Batteries included: Advantages of an End-to-end solution
Page 15: Batteries included: Advantages of an End-to-end solution
Page 16: Batteries included: Advantages of an End-to-end solution
Page 17: Batteries included: Advantages of an End-to-end solution

Simplicity is the love child of two of the most powerful forces in business: Brains and Common

Sense.Insanely Simple, Ken Segall

Page 18: Batteries included: Advantages of an End-to-end solution

KISS and DRY

Page 19: Batteries included: Advantages of an End-to-end solution

JavaScript and CoffeeScript

/* JavaScript */

Scope.prototype.find =

function(name, options) {

if (this.check(name, options)) {

return true;

}

this.add(name, 'var');

return false;

}

/* CoffeeScript */

Scope::find = (name, options) ->

return true if @check(name, options)

@add name, "var"

false

Source: http://js2coffee.org/

Page 20: Batteries included: Advantages of an End-to-end solution

/* collection of employees documents */

[{name: "Duncan", manager: ObjectId("…d730")}, {name: "Moneo", manager: ObjectId("…d730")}, {name: "Smith", manager: ObjectId("…d729")}]

/* Smith’s employees */

var manager = db.employees.find({manager: ObjectId(”…d731”));

How MongoDB does it

Page 21: Batteries included: Advantages of an End-to-end solution

How Wakanda does it

class Employee extends DS::DataClass

field "name", type: "String"

belongsTo "manager", type: "Employee"

hasMany "employees", type: "Employee"

Page 22: Batteries included: Advantages of an End-to-end solution

/* Smith’s employees */

ds.Employee.query("name = ‘Smith’”).employees

/* Smith’s manager’s manager’s employees */

ds.Employee.query("name = :1", "Smith").manager.manager.employees

Object-relations

Page 23: Batteries included: Advantages of an End-to-end solution

“Batteries included”: Advantages of an End-to-end

JavaScript Stack

wakanda.orghttp://github.com/wakanda

@[email protected]

Page 24: Batteries included: Advantages of an End-to-end solution

Resources

• Rugby – http://www.flickr.com/photos/blind_beholder/5491105857/• Device Fragmentation – http://opensignalmaps.com/reports/fragmentation.php• Rocket Science – http://www.flickr.com/photos/nasahqphoto/6400675145/• Batteries Included – http://www.flickr.com/photos/78566961@N00/6569887495/