JsUnconf 2014

E
JsUnconf 2014
JsUnconf 2014
JsUnconf 2014
JAVASCRIPT	

ALTERNATIVEN
JAVASCRIPT	

ALTERNATIVEN
Kompilieren zu JavaScript
JAVASCRIPT	

ALTERNATIVEN
"It's just JavaScript"
Vereinfachung von JavaScript	

Einflüsse von Ruby, Python, Haskell
JAVASCRIPT	

ALTERNATIVEN
math =
root: Math.sqrt
square: square
cube: (x) -> x * square x
!
alert "I knew it!" if elvis?
math = {
root: Math.sqrt,
square: square,
cube: function(x) {
return x * square(x);
}
};
!
if (typeof elvis !== "undefined" && elvis !== null) {
alert("I knew it!");
}
JAVASCRIPT	

ALTERNATIVEN
von Google entwickelt
entwickelt um JavaScript zu ersetzen
native Ausführung oder zu JavaScript kompilieren	

(kann in Chrome nativ ausgeführt werden)
class-based, single inheritance, object-oriented language 	

with C-style syntax
JAVASCRIPT	

ALTERNATIVEN
#import("dart:html");
main() {
// Find an element.
var elem = document.query("#id");
// Handle events.
elem.on.click.add((event) => print('click!'));
// Set an attribute.
elem.attributes['name'] = 'value';
// Add a child element.
elem.elements.add(new Element.tag("p"));
// Add a CSS class to each child element.
elem.elements.forEach((e) => e.classes.add("important"));
}
JAVASCRIPT	

ALTERNATIVEN
import 'dart:math' as math;
class Point {
// Final variables cannot be changed once they are assigned.
final num x, y;
// A constructor, with syntactic sugar for setting instance variables.
Point(this.x, this.y);
// A named constructor with an initializer list.
Point.origin() : x = 0, y = 0;
// A method.
num distanceTo(Point other) {
var dx = x - other.x;
var dy = y - other.y;
return math.sqrt(dx * dx + dy * dy);
}
}
// All Dart programs start with main().
main() {
// Instantiate point objects.
var p1 = new Point(10, 10);
var p2 = new Point.origin();
var distance = p1.distanceTo(p2);
print(distance);
}
JAVASCRIPT	

ALTERNATIVEN
Strict superset of JavaScript
optional strict typing, 	

klassenbasierende, objektorientiert Programmierung
Alle JavaScripte, die strict ausführbar sind, sind valideTypeScripte
Unterstützung von Header-Dateien
JAVASCRIPT	

ALTERNATIVEN
class Person {
private name: string;
private age: number;
private salary: number;
constructor(name: string, age: number, salary: number) {
this.name = name;
this.age = age;
this.salary = salary;
}
toString(): string {
return this.name + " (" + this.age + ")" + "(" + this.salary + ")";
}
}
WEITERE

JAVASCRIPT	

ALTERNATIVEN
asm.js - extraordinarily optimizable, low-level subset of JavaScript	

!
!
Haxe - compiles to several platforms (C++, Flash, JS, Neko, PHP)	

!
!
LiveScript - indirect descendant of CoffeeScript, assist in
functional style programming
JsUnconf 2014
FRAMEWORKS
FRAMEWORKS
“Big 3”
from Google from people with Java background	

!
Für die Entwicklung von Single-Page-Apps gedacht	

!
Opinionated Structure (ähnlich Rails)	

!
wiederverwendbare Komponenten	

!
durch kleine Module gut fürTeams
you have ruined javascript
Online Slides	

mit Beispiel für Bidirektionales Databinding (Two-Way)
first application:

	

 $ install yeoman

	

 $ yo angular
Ähnlich AngularJS - ohne Java Hintergrund	

Mehr JavaScript
Mehr Bibliothek - weniger Framework
FRAMEWORK	

IST NICHT ALLES
Learnings fromTrivago
Clientseitiges Rendering funktioniert nicht:
Framework <!> SEO	

!
Framework <!> Performance	

!
Framework <!> Code Size
Architektur geht auch ohne Framework
- splitted basic js app:	

- modules	

- data objects	

- display / user interaction (views)	

!
- communication using Events / Public APIs	

!
- use AMD (z.B. requireJS)
Fallstricke
"Die meisten Blogposts werden von Leuten
geschrieben die nicht viel (praxis) Erfahrung
haben.”	

!
&	

!
Die meisten Beispiele sind zu einfach für grosse,
skalierende Applikationen
The Way
Basis: Backbone.js	

!
Keine Backbone-Views, hauptsächlich
clientseitiges Rendering (SEO)	

!
Nutzung von Marionette.js	

!
Langsamer Umstieg (von jQuery) durch
Nutzung von Self Contained Modules
JsUnconf 2014
JsUnconf 2014
• JavaScript + Datenbank > Offline first	

• Daten werden im local storage gespeichert	

• wenn online werden Daten synchronisiert	

• jQuery like API + Angular JS, EmberJS, Backbone	

• Document-based Storage mit CouchDB
// This will store a task in this new user's store
!
var hoodie = new Hoodie();
!
var type = 'task';
var attributes = { title: 'Try out hoodie today’ };
!
hoodie.store.add(type, attributes)
.done(function (newObject) {
console.log(‘data saved!’);
});
// This load store tasks from user's store
!
var hoodie = new Hoodie();
!
var type = 'task';
hoodie.store.findAll(type)
.done(function (tasks) {
console.log(‘Tasks:‘);
console.log(tasks);
});
JsUnconf 2014
DESKTOP APPLIKATIONEN	

MIT JAVASCRIPT
DESKTOP APPLIKATIONEN	

MIT JAVASCRIPT
node-webkit	

!
Basierend auf node.js & Webkit	

!
MacOS,Windows & Linux	

!
Durch mitgelieferten Webkit-Browser 	

nicht vom installierten Browser abhängig
DESKTOP APPLIKATIONEN	

MIT JAVASCRIPT
node-webkit	

!
Applikation mit HTML5, CSS3, JS & WebGL 	

!
Direkter Zugriff auf Dateisystem	

!
Keine Sandbox / same origin Beschränkungen
JsUnconf 2014
EVERYDAY	

TOOLS
• Paketmanager für’s Web	

• Installieren von Bibliotheken + Abhängigkeiten	

Bower
$ npm install -g bower
$ bower install marionette
!
marionette#1.8.5 app/bower_components/marionette
├── backbone#1.1.2
├── backbone.babysitter#0.1.4
├── backbone.wreqr#1.3.1
├── jquery#2.1.0
└── underscore#1.6.0
• JavaScriptTask Manager
Grunt
• Scaffolding fuer Webapplikationen (HTML5, JS, CSS)	

• Baut auf Bower & Grunt auf	

• jQuery,Angular, Ember, Backbone, Bootstrap, …	

$ npm install -g yo
$ npm install -g generator-angular

$ yo angular
JsUnconf 2014
JavaScript != jQuery
JsUnconf 2014
JsUnconf 2014
Talk Slides
80s Game Programming	

Introduction to React	

the secrets of the git ninjas	

Running Node.js apps in production (Resources and links)	

Your first steps with Clojurescript and Om	

Intro to WebRTC	

Angular PerformanceTuning for large Apps	

Hoodie + AngularJS = <3	

Math Fun: Procedural Music with JavaScript	

Decentralise ALLTHETHINGS!!!	

ITTAKES AVILLAGETO MAKE A PROGRAMMER	

Stop storing your users' data! An introduction to unhosted web apps and remoteStorage
HTML enhanced for web apps - Introduction to AngularJS withYeoman	

Desktop Applications with Javascript and node-webkit	

AngularJS and i18n	

Digital self defense - Mitigate Clickjacking and XSS attacks with HTTP Headers	

Animated UI Changes: Sidebar Fly Animation and Reorder Animation	

Hypermedia APIs	

Testing CSS support with JavaScript	

Beyond theTo-Do List	

Grunt vs Gulp
1 von 43

Recomendados

node.js von
node.jsnode.js
node.jsMatthias Gutjahr
1.2K views12 Folien
Javascript auf Client und Server mit node.js - webtech 2010 von
Javascript auf Client und Server mit node.js - webtech 2010Javascript auf Client und Server mit node.js - webtech 2010
Javascript auf Client und Server mit node.js - webtech 2010Dirk Ginader
20.5K views39 Folien
Node.js von
Node.jsNode.js
Node.jsSebastian Springer
681 views60 Folien
JavaScript Performance von
JavaScript PerformanceJavaScript Performance
JavaScript PerformanceSebastian Springer
1.5K views73 Folien
jQuery & CouchDB - Die zukünftige Webentwicklung? von
jQuery & CouchDB - Die zukünftige Webentwicklung?jQuery & CouchDB - Die zukünftige Webentwicklung?
jQuery & CouchDB - Die zukünftige Webentwicklung?openForce Information Technology GesmbH
10.4K views29 Folien
JavaScript Performance von
JavaScript PerformanceJavaScript Performance
JavaScript PerformanceSebastian Springer
884 views72 Folien

Más contenido relacionado

Was ist angesagt?

Varnish PHP Unconference Hamburg 2012 von
Varnish PHP Unconference Hamburg 2012Varnish PHP Unconference Hamburg 2012
Varnish PHP Unconference Hamburg 2012Florian Holzhauer
1.3K views40 Folien
Einführung in React von
Einführung in ReactEinführung in React
Einführung in ReactSebastian Springer
1.3K views63 Folien
Hdc2012 cordova-präsi von
Hdc2012 cordova-präsiHdc2012 cordova-präsi
Hdc2012 cordova-präsiDeveloperConference
575 views32 Folien
Wordpress im docker von
Wordpress im dockerWordpress im docker
Wordpress im dockerPhilipp Kropp
169 views14 Folien
Production-ready Infrastruktur in 3 Wochen von
Production-ready Infrastruktur in 3 WochenProduction-ready Infrastruktur in 3 Wochen
Production-ready Infrastruktur in 3 WochenAndré Goliath
70 views34 Folien
Pimcore von
PimcorePimcore
Pimcoretimglabisch
3.3K views64 Folien

Was ist angesagt?(7)

Similar a JsUnconf 2014

Testing tools von
Testing toolsTesting tools
Testing toolsSebastian Springer
1.1K views78 Folien
Backend-Services mit Rust von
Backend-Services mit RustBackend-Services mit Rust
Backend-Services mit RustJens Siebert
21 views23 Folien
Node.js für Webapplikationen von
Node.js für WebapplikationenNode.js für Webapplikationen
Node.js für WebapplikationenSebastian Springer
2.2K views52 Folien
Microservices mit Rust von
Microservices mit RustMicroservices mit Rust
Microservices mit RustJens Siebert
19 views35 Folien
Webapplikationen mit Node.js von
Webapplikationen mit Node.jsWebapplikationen mit Node.js
Webapplikationen mit Node.jsSebastian Springer
2K views68 Folien
Die Zukunft der Webstandards - Webinale 31.05.2010 von
Die Zukunft der Webstandards - Webinale 31.05.2010Die Zukunft der Webstandards - Webinale 31.05.2010
Die Zukunft der Webstandards - Webinale 31.05.2010Patrick Lauke
1.2K views73 Folien

Similar a JsUnconf 2014(20)

Backend-Services mit Rust von Jens Siebert
Backend-Services mit RustBackend-Services mit Rust
Backend-Services mit Rust
Jens Siebert21 views
Die Zukunft der Webstandards - Webinale 31.05.2010 von Patrick Lauke
Die Zukunft der Webstandards - Webinale 31.05.2010Die Zukunft der Webstandards - Webinale 31.05.2010
Die Zukunft der Webstandards - Webinale 31.05.2010
Patrick Lauke1.2K views
Integration von Security-Checks in die CI-Pipeline von OPEN KNOWLEDGE GmbH
Integration von Security-Checks in die CI-PipelineIntegration von Security-Checks in die CI-Pipeline
Integration von Security-Checks in die CI-Pipeline
Einfuehrung in Elasticsearch von Florian Hopf
Einfuehrung in ElasticsearchEinfuehrung in Elasticsearch
Einfuehrung in Elasticsearch
Florian Hopf1.2K views
Ajax hands on - Refactoring Google Suggest von Bastian Feder
Ajax hands on - Refactoring Google SuggestAjax hands on - Refactoring Google Suggest
Ajax hands on - Refactoring Google Suggest
Bastian Feder1.2K views
Andy bosch-jsf-javascript von Andy Bosch
Andy bosch-jsf-javascriptAndy bosch-jsf-javascript
Andy bosch-jsf-javascript
Andy Bosch1.3K views
Java und Go im Vergleich von QAware GmbH
Java und Go im VergleichJava und Go im Vergleich
Java und Go im Vergleich
QAware GmbH905 views
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich... von GFU Cyrus AG
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
GFU Cyrus AG3.2K views
Creasoft - Windows powershell von Creasoft AG
Creasoft - Windows powershellCreasoft - Windows powershell
Creasoft - Windows powershell
Creasoft AG1.7K views
PHP Sucks?! von ICANS GmbH
PHP Sucks?!PHP Sucks?!
PHP Sucks?!
ICANS GmbH5.9K views
Einführung in Elasticsearch von Florian Hopf
Einführung in ElasticsearchEinführung in Elasticsearch
Einführung in Elasticsearch
Florian Hopf1K views
Einführung in Puppet und Vagrant von s0enke
Einführung in Puppet und VagrantEinführung in Puppet und Vagrant
Einführung in Puppet und Vagrant
s0enke6.6K views
Grails 0.3-SNAPSHOT Presentation WJAX 2006 von Sven Haiges
Grails 0.3-SNAPSHOT Presentation WJAX 2006Grails 0.3-SNAPSHOT Presentation WJAX 2006
Grails 0.3-SNAPSHOT Presentation WJAX 2006
Sven Haiges972 views
Einfacher bauen von johofer
Einfacher bauenEinfacher bauen
Einfacher bauen
johofer1K views
Docker und Kubernetes Patterns & Anti-Patterns von Josef Adersberger
Docker und Kubernetes Patterns & Anti-PatternsDocker und Kubernetes Patterns & Anti-Patterns
Docker und Kubernetes Patterns & Anti-Patterns
Josef Adersberger682 views

JsUnconf 2014

  • 6. JAVASCRIPT ALTERNATIVEN "It's just JavaScript" Vereinfachung von JavaScript Einflüsse von Ruby, Python, Haskell
  • 7. JAVASCRIPT ALTERNATIVEN math = root: Math.sqrt square: square cube: (x) -> x * square x ! alert "I knew it!" if elvis? math = { root: Math.sqrt, square: square, cube: function(x) { return x * square(x); } }; ! if (typeof elvis !== "undefined" && elvis !== null) { alert("I knew it!"); }
  • 8. JAVASCRIPT ALTERNATIVEN von Google entwickelt entwickelt um JavaScript zu ersetzen native Ausführung oder zu JavaScript kompilieren (kann in Chrome nativ ausgeführt werden) class-based, single inheritance, object-oriented language with C-style syntax
  • 9. JAVASCRIPT ALTERNATIVEN #import("dart:html"); main() { // Find an element. var elem = document.query("#id"); // Handle events. elem.on.click.add((event) => print('click!')); // Set an attribute. elem.attributes['name'] = 'value'; // Add a child element. elem.elements.add(new Element.tag("p")); // Add a CSS class to each child element. elem.elements.forEach((e) => e.classes.add("important")); }
  • 10. JAVASCRIPT ALTERNATIVEN import 'dart:math' as math; class Point { // Final variables cannot be changed once they are assigned. final num x, y; // A constructor, with syntactic sugar for setting instance variables. Point(this.x, this.y); // A named constructor with an initializer list. Point.origin() : x = 0, y = 0; // A method. num distanceTo(Point other) { var dx = x - other.x; var dy = y - other.y; return math.sqrt(dx * dx + dy * dy); } } // All Dart programs start with main(). main() { // Instantiate point objects. var p1 = new Point(10, 10); var p2 = new Point.origin(); var distance = p1.distanceTo(p2); print(distance); }
  • 11. JAVASCRIPT ALTERNATIVEN Strict superset of JavaScript optional strict typing, klassenbasierende, objektorientiert Programmierung Alle JavaScripte, die strict ausführbar sind, sind valideTypeScripte Unterstützung von Header-Dateien
  • 12. JAVASCRIPT ALTERNATIVEN class Person { private name: string; private age: number; private salary: number; constructor(name: string, age: number, salary: number) { this.name = name; this.age = age; this.salary = salary; } toString(): string { return this.name + " (" + this.age + ")" + "(" + this.salary + ")"; } }
  • 13. WEITERE
 JAVASCRIPT ALTERNATIVEN asm.js - extraordinarily optimizable, low-level subset of JavaScript ! ! Haxe - compiles to several platforms (C++, Flash, JS, Neko, PHP) ! ! LiveScript - indirect descendant of CoffeeScript, assist in functional style programming
  • 17. from Google from people with Java background ! Für die Entwicklung von Single-Page-Apps gedacht ! Opinionated Structure (ähnlich Rails) ! wiederverwendbare Komponenten ! durch kleine Module gut fürTeams
  • 18. you have ruined javascript Online Slides mit Beispiel für Bidirektionales Databinding (Two-Way) first application:
 $ install yeoman
 $ yo angular
  • 19. Ähnlich AngularJS - ohne Java Hintergrund Mehr JavaScript
  • 20. Mehr Bibliothek - weniger Framework
  • 22. Clientseitiges Rendering funktioniert nicht: Framework <!> SEO ! Framework <!> Performance ! Framework <!> Code Size
  • 23. Architektur geht auch ohne Framework - splitted basic js app: - modules - data objects - display / user interaction (views) ! - communication using Events / Public APIs ! - use AMD (z.B. requireJS)
  • 24. Fallstricke "Die meisten Blogposts werden von Leuten geschrieben die nicht viel (praxis) Erfahrung haben.” ! & ! Die meisten Beispiele sind zu einfach für grosse, skalierende Applikationen
  • 25. The Way Basis: Backbone.js ! Keine Backbone-Views, hauptsächlich clientseitiges Rendering (SEO) ! Nutzung von Marionette.js ! Langsamer Umstieg (von jQuery) durch Nutzung von Self Contained Modules
  • 28. • JavaScript + Datenbank > Offline first • Daten werden im local storage gespeichert • wenn online werden Daten synchronisiert • jQuery like API + Angular JS, EmberJS, Backbone • Document-based Storage mit CouchDB
  • 29. // This will store a task in this new user's store ! var hoodie = new Hoodie(); ! var type = 'task'; var attributes = { title: 'Try out hoodie today’ }; ! hoodie.store.add(type, attributes) .done(function (newObject) { console.log(‘data saved!’); }); // This load store tasks from user's store ! var hoodie = new Hoodie(); ! var type = 'task'; hoodie.store.findAll(type) .done(function (tasks) { console.log(‘Tasks:‘); console.log(tasks); });
  • 32. DESKTOP APPLIKATIONEN MIT JAVASCRIPT node-webkit ! Basierend auf node.js & Webkit ! MacOS,Windows & Linux ! Durch mitgelieferten Webkit-Browser nicht vom installierten Browser abhängig
  • 33. DESKTOP APPLIKATIONEN MIT JAVASCRIPT node-webkit ! Applikation mit HTML5, CSS3, JS & WebGL ! Direkter Zugriff auf Dateisystem ! Keine Sandbox / same origin Beschränkungen
  • 36. • Paketmanager für’s Web • Installieren von Bibliotheken + Abhängigkeiten Bower $ npm install -g bower $ bower install marionette ! marionette#1.8.5 app/bower_components/marionette ├── backbone#1.1.2 ├── backbone.babysitter#0.1.4 ├── backbone.wreqr#1.3.1 ├── jquery#2.1.0 └── underscore#1.6.0
  • 38. • Scaffolding fuer Webapplikationen (HTML5, JS, CSS) • Baut auf Bower & Grunt auf • jQuery,Angular, Ember, Backbone, Bootstrap, … $ npm install -g yo $ npm install -g generator-angular
 $ yo angular
  • 43. Talk Slides 80s Game Programming Introduction to React the secrets of the git ninjas Running Node.js apps in production (Resources and links) Your first steps with Clojurescript and Om Intro to WebRTC Angular PerformanceTuning for large Apps Hoodie + AngularJS = <3 Math Fun: Procedural Music with JavaScript Decentralise ALLTHETHINGS!!! ITTAKES AVILLAGETO MAKE A PROGRAMMER Stop storing your users' data! An introduction to unhosted web apps and remoteStorage HTML enhanced for web apps - Introduction to AngularJS withYeoman Desktop Applications with Javascript and node-webkit AngularJS and i18n Digital self defense - Mitigate Clickjacking and XSS attacks with HTTP Headers Animated UI Changes: Sidebar Fly Animation and Reorder Animation Hypermedia APIs Testing CSS support with JavaScript Beyond theTo-Do List Grunt vs Gulp