http://www.opitz-consulting.com/go/3-4-11
JavaScript-Clients sind ein wichtiger Bestandteil des Mobile Computings, die wart- und testbare Entwicklung ist aber eine Herausforderung. Data Binding erleichtet das Unterfangen durch die klare Trennung von Anwendungscode und UI.
OPITZ CONSULTING Solution Architect Stefan Scheidt präsentierte diesen Vortrag am 27. März 2012 auf der Mobile Tech Conference MTC Spring 2012 in München.
--
Sie möchten mobile Geschäftslösungen in Ihrem Unternehmen nutzen? Wir beraten Sie gerne. Lesen Sie hier mehr zu unseren Leistungen in diesem Bereich und informieren Sie sich zu unserem Workshop für die professionelle Web-App-Entwicklung mit JavaScript: http://www.opitz-consulting.com/go/3-4-898
44. jQuery Mobile und AngularJS
Das Problem:
Die DOM-Manipulationen von
jQuery Mobile und AngularJS
müssen koordiniert werden!
45. jQuery Mobile und AngularJS
Die Lösung:
jQuery Mobile Angular Adapter
46. jQuery Mobile Angular Adapter
Koordination von jQuery Mobile und AngularJS
Erweiterungen für mobile Web-Apps
Open Source unter
https://github.com/tigbro/
jquery-mobile-angular-adapter
48. Dependency Injection ist ein Entwurfsmuster
und dient dazu, die Abhängigkeiten zwischen
Komponenten zu minimieren.
Es überträgt die Verantwortung für das
Erzeugen und die Verknüpfung von Objekten an
ein extern konfigurierbares Framework
http://de.wikipedia.org/wiki/Dependency_Injection
49. Dependency Injection ist ein Entwurfsmuster
und dient dazu, die Abhängigkeiten zwischen
Komponenten zu minimieren.
Es überträgt die Verantwortung für das
Erzeugen und die Verknüpfung von Objekten an
ein extern konfigurierbares Framework
http://de.wikipedia.org/wiki/Dependency_Injection
52. Beispiel: Backend-Anbindung
var readUrl = 'https://secure.openkeyval.org/';
function read(key, success) {
var url = readUrl + key;
waitdialog.show();
jsonp(url, function(data) {
success(data);
waitdialog.hide();
});
}
53. Beispiel: Backend-Anbindung
var readUrl = 'https://secure.openkeyval.org/';
function read(key, success) {
var url = readUrl + key;
waitdialog.show();
jsonp(url, function(data) {
success(data);
waitdialog.hide();
});
}
54. Beispiel: Backend-Anbindung
var readUrl = 'https://secure.openkeyval.org/';
function read(key, success) {
var url = readUrl + key;
waitdialog.show();
jsonp(url, function(data) {
success(data);
waitdialog.hide();
});
}
55. Beispiel: Backend-Anbindung
waitDialog
todoStore key value
todoController key value ... ...
key value read ...
todoStore waitDialog
jsonp jsonp
key value
... ...
created created by
with "new" Factories
56. Beispiel: Backend-Anbindung
waitDialog
key value
todoController todoStore ... ...
key value key value
todoStore waitDialog
jsonp jsonp
key value
... ...
created by
Dependency Injection
57. Services und DI mit Angular
angular.service('jsonp', jsonpFactory);
angular.service('waitdialog', waitdialogFactory);
58. Services und DI mit Angular
angular.service('jsonp', jsonpFactory);
angular.service('waitdialog', waitdialogFactory);
function todoStoreFactory() {
function read(key, success) { ... }
// ...
return {
read: read
// ...
}
}
59. Services und DI mit Angular
angular.service('jsonp', jsonpFactory);
angular.service('waitdialog', waitdialogFactory);
function todoStoreFactory(jsonp, waitdialog) {
function read(key, success) { ... }
// ...
return {
read: read,
// ...
}
}
todoStoreFactory.$inject = ['jsonp', 'waitdialog'];
60. Services und DI mit Angular
angular.service('jsonp', jsonpFactory);
angular.service('waitdialog', waitdialogFactory);
function todoStoreFactory(jsonp, waitdialog) {
function read(key, success) { ... }
// ...
return {
read: read
// ...
}
}
todoStoreFactory.$inject = ['jsonp', 'waitdialog'];
angular.service('todoStore', todoStoreFactory);
62. DI für Controller
// ...
angular.service('todoStore', ...);
function TodoController(todoStore) {
// do something with todoStore ...
}
TodoController.$inject = ['todoStore'];
63. jQuery Mobile Angular Adapter
Koordination von jQuery Mobile und AngularJS
Erweiterungen für mobile Web-Apps
Open Source unter
https://github.com/tigbro/
jquery-mobile-angular-adapter
79. Sencha Touch Angular Adapter
Koordination von Sencha Touch und Angular JS
Erweiterungen für mobile Web-Apps
semantisches HTML Markup!
Open Source unter
https://github.com/tigbro/
sencha-touch-angular-adapter
80. Sencha Touch Angular Adapter
Koordination von Sencha Touch und Angular JS
Erweiterungen für mobile Web-Apps
semantisches HTML Markup!
Open Source unter
https://github.com/tigbro/
sencha-touch-angular-adapter
86. In the hive 11: nectar and pollen
by Max xx, http://www.flickr.com/photos/max_westby/4567762490
Books
By Rodrigo Galindez, http://www.flickr.com/photos/rodrigogalindez/4637637337/
IMG_1300-Edit
by Susan E Adams, http://www.flickr.com/photos/susanad813/3912914836/
Doble Via
by amslerPIX, http://www.flickr.com/photos/amslerpix/6242266697/
MacBook Pro Keyboard
by superstrikertwo, http://www.flickr.com/photos/superstrikertwo/4989727256/
Stubborn Last Drop
by RogueSun Media, http://www.flickr.com/photos/shuttercat7/627798443/