Download pdf - Ext Js On Rails

Transcript
Page 1: Ext Js On Rails

ExtJS on RailsMichael Siebert

Page 2: Ext Js On Rails

Michael Siebert

• Freelancer Ruby / Rails / JavaScript / PHP

• www.siebert-wd.de

[email protected]

Page 3: Ext Js On Rails

Buzzword-Bingo!

Page 4: Ext Js On Rails

Rich Internet Applications

Page 5: Ext Js On Rails

Rich Internet Applications

Wikipedia:

„Der Begriff Rich Internet Application (RIA, deutsch: reichhaltige Internet Anwendung) beschreibt eine Anwendung, die Internet-Techniken benutzt und eine intuitive Benutzeroberfläche bietet.“

Page 6: Ext Js On Rails

(c) amrufm http://flickr.com/photos/amrufm/2195019023/

Page 7: Ext Js On Rails
Page 8: Ext Js On Rails
Page 9: Ext Js On Rails

Rich Internet Applications

Page 10: Ext Js On Rails

Rich Internet Applications

• Anspruchsvolles UI

Page 11: Ext Js On Rails

Rich Internet Applications

• Anspruchsvolles UI

• Tastenkürzel

Page 12: Ext Js On Rails

Rich Internet Applications

• Anspruchsvolles UI

• Tastenkürzel

• Drag‘n‘Drop

Page 13: Ext Js On Rails

Rich Internet Applications

• Anspruchsvolles UI

• Tastenkürzel

• Drag‘n‘Drop

• Clientseitige Berechnungen

Page 14: Ext Js On Rails

Rich Internet Applications

• Anspruchsvolles UI

• Tastenkürzel

• Drag‘n‘Drop

• Clientseitige Berechnungen

• Geschwindigkeit

Page 15: Ext Js On Rails

Javascript + HTML + CSS + Backend

Page 16: Ext Js On Rails

Javascript + HTML + CSS + Backend

Page 17: Ext Js On Rails

Javascript + HTML + CSS + Backend

Page 18: Ext Js On Rails

Javascript + HTML + CSS + Backend

Page 19: Ext Js On Rails

Javascript + HTML + CSS + Backend

Framework?

Page 20: Ext Js On Rails

Javascript + HTML + CSS + Backend

+Framework?

Page 21: Ext Js On Rails

Javascript + HTML + CSS + Backend

+Framework?

Page 22: Ext Js On Rails

Javascript + HTML + CSS + Backend

+Framework?

Page 23: Ext Js On Rails

Javascript + HTML + CSS + Backend

+Framework?

Page 24: Ext Js On Rails

Javascript + HTML + CSS + Backend

Framework?

Page 25: Ext Js On Rails

Javascript + HTML + CSS + Backend

Framework?

Page 26: Ext Js On Rails

Javascript + HTML + CSS + Backend

Framework?

Page 27: Ext Js On Rails

Javascript + HTML + CSS + Backend

Framework?

Page 28: Ext Js On Rails

ExtJS?

Page 29: Ext Js On Rails

ExtJS?

• JavaScript Framework

Page 30: Ext Js On Rails

ExtJS?

• JavaScript Framework

• Cross-Browser, Cross-Platform

Page 31: Ext Js On Rails

ExtJS?

• JavaScript Framework

• Cross-Browser, Cross-Platform

• GPLv3 und kommerzielle Lizenz

Page 32: Ext Js On Rails

ExtJS?

• JavaScript Framework

• Cross-Browser, Cross-Platform

• GPLv3 und kommerzielle Lizenz

• Rich Internet Applications

Page 33: Ext Js On Rails

ExtJS?

• JavaScript Framework

• Cross-Browser, Cross-Platform

• GPLv3 und kommerzielle Lizenz

• Rich Internet Applications

• Adobe AIR Integration (optional)

Page 34: Ext Js On Rails

ExtJS?

• JavaScript Framework

• Cross-Browser, Cross-Platform

• GPLv3 und kommerzielle Lizenz

• Rich Internet Applications

• Adobe AIR Integration (optional)

• Modularer Aufbau

Page 35: Ext Js On Rails

Demo

Page 36: Ext Js On Rails

Frameworks

Page 37: Ext Js On Rails

Frameworks

• Adapter für

Page 38: Ext Js On Rails

Frameworks

• Adapter für

• Prototype & Script.aculo.us

Page 39: Ext Js On Rails

Frameworks

• Adapter für

• Prototype & Script.aculo.us

• jQuery

Page 40: Ext Js On Rails

Frameworks

• Adapter für

• Prototype & Script.aculo.us

• jQuery

• YUI

Page 41: Ext Js On Rails

Frameworks

• Adapter für

• Prototype & Script.aculo.us

• jQuery

• YUI

• oder nur ExtJS

Page 42: Ext Js On Rails

(c) Simon Greig http://flickr.com/photos/xrrr/2321685873/

Page 43: Ext Js On Rails

(c) SpAvAAi http://flickr.com/photos/spavaai/2536426227/

Page 44: Ext Js On Rails

Rails?

Page 45: Ext Js On Rails

Rails?

• „Normale“ Rails-Anwendung

• Views in HTML

• vereinzelt ExtJS nutzen

Page 46: Ext Js On Rails

Rails?

• „Normale“ Rails-Anwendung

• Views in HTML

• vereinzelt ExtJS nutzen

• „Ganzheitlicher Ansatz“

• Anwendung komplett mit ExtJS

• Rails nur Datenlieferant

Page 47: Ext Js On Rails

Kommunikation

Page 48: Ext Js On Rails

Kommunikation

• XML

• Rails: collection.to_xml

• ExtJS: Ext.data.XMLReader

Page 49: Ext Js On Rails

Kommunikation

• XML

• Rails: collection.to_xml

• ExtJS: Ext.data.XMLReader

• JSON

• Rails: collection.to_json

• ExtJS: Ext.data.JSONReader

Page 50: Ext Js On Rails

REST!

Page 51: Ext Js On Rails

Datenformate

Page 52: Ext Js On Rails

DatenformateRails via to_json ExtJS erwartet

[{ "title": "Rails scales"},{ "title": "Ruby scales"}]

{ "results": 2, "root": [{ "title": "Rails scales" },{ "title": "Ruby scales" }]}

Page 53: Ext Js On Rails

DatenformateRails via to_json ExtJS erwartet

[{ "title": "Rails scales"},{ "title": "Ruby scales"}]

{ "results": 2, "root": [{ "title": "Rails scales" },{ "title": "Ruby scales" }]}

Page 54: Ext Js On Rails

DatenformateRails via to_json ExtJS erwartet

[{ "title": "Rails scales"},{ "title": "Ruby scales"}]

{ "results": 2, "root": [{ "title": "Rails scales" },{ "title": "Ruby scales" }]}

render :json => { :root => @posts, :results => @posts.size }

Page 55: Ext Js On Rails

Demo

Page 56: Ext Js On Rails

Plugins

Page 57: Ext Js On Rails

ext_scaffold

• Scaffold Generator von Martin Rehfeld

• http://tinyurl.com/2pu4pl

Page 58: Ext Js On Rails

ext_js_with_rails

Page 59: Ext Js On Rails

ext_js_with_rails

• Sammlung von Helferlein

Page 60: Ext Js On Rails

ext_js_with_rails

• Sammlung von Helferlein

• script/js_autobuild

Page 61: Ext Js On Rails

ext_js_with_rails

• Sammlung von Helferlein

• script/js_autobuild

• JSLint Integration

Page 62: Ext Js On Rails

ext_js_with_rails

• Sammlung von Helferlein

• script/js_autobuild

• JSLint Integration

• YUICompressor

Page 63: Ext Js On Rails

ext_js_with_rails

• Sammlung von Helferlein

• script/js_autobuild

• JSLint Integration

• YUICompressor

• div. Controller und Model-Erweiterungen

Page 64: Ext Js On Rails

ext_js_with_rails

• Sammlung von Helferlein

• script/js_autobuild

• JSLint Integration

• YUICompressor

• div. Controller und Model-Erweiterungen

• ...

Page 65: Ext Js On Rails

ext_js_with_rails

Page 66: Ext Js On Rails

ext_js_with_rails

• (noch) kein Release

Page 67: Ext Js On Rails

ext_js_with_rails

• (noch) kein Release

• http://github.com/siebertm/ext_js_with_rails/

Page 68: Ext Js On Rails
Page 69: Ext Js On Rails

Fragen?