osgi web development in action
DESCRIPTION
TRANSCRIPT
![Page 1: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/1.jpg)
OSGi Web Development in ActionChristian Baranowski, SEITENBAU Gmbh
Event 2014
![Page 2: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/2.jpg)
Welcome• Christian Baranowski • Software Developer @ SEITENBAU
• Software Engineering • Custom Software Solutions • E-Government Solutions • Identity Management and SSO Solutions • www.seitenbau.de
![Page 3: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/3.jpg)
BndtoolsEasy, powerful and productive way to develop OSGi applications. Based on bnd and Eclipse.
http://bndtools.org/
![Page 4: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/4.jpg)
enRoute Blog
• OSGi demo project by Peter Kriens https://github.com/osgi/osgi.enroute.blog/
• Step by step tutorial from Peter Kriens https://github.com/osgi/osgi.enroute.blog/blob/master/OSGi-enRoute-blog.pdf?raw=true
• Last OSGi Code Camp was based on this tutorial
![Page 5: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/5.jpg)
Simple Web App
aQute!webserver
HTTPService
Apache Felix HTTP osgi.simple.webapp
Extender����������� ������������������ static/*
aQute!Configurer
Apache Felix!Config Admin
Configuration����������� ������������������ Admin
Extender����������� ������������������ configuration/configuration.json����������� ������������������
![Page 6: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/6.jpg)
X-Rays for OSGiSimple way to debug Services and Dynamic.
http://softwaresimplexity.blogspot.de/2012/05/x-rays-for-osgi.html
![Page 7: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/7.jpg)
Static Web Bundles
aQute!webserver
osgi.simple.webapp
Extender����������� ������������������ static/*
com.google.angularjs
com.twitter.bootstrap
![Page 8: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/8.jpg)
REST Todo Resource (Client)var todoApp = angular.module( 'todoApp', ['ngResource']);
!todoApp.factory( 'todoResource', ['$resource', function($resource) {
return $resource( '/rest/todos/:todoId', { todoId: '@todoId' }, {
archive: {
url: '/rest/archive',
method: 'DELETE',
params: {todoIds: '@todoIds'}
}
});
}]);
http://angularjs.org
![Page 9: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/9.jpg)
REST Todo Resource
osgi.simple.webapp
ResourceManagerHTTPService
Apache Felix HTTP
aQute!rest.srv
Whiteboard����������� ������������������ Pattern
![Page 10: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/10.jpg)
REST Todo Resource (Server)
![Page 11: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/11.jpg)
More Bundles
ResourceManagerHTTPService
Apache Felix HTTP
aQute!rest.srv
Whiteboard����������� ������������������ Pattern
osgi.simple.webapp.staticaQute!webserver
Extender����������� ������������������ static/*
osgi.simple.webapp.domain
osgi.simple.webapp.rest
![Page 12: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/12.jpg)
Bnd Command Line• bnd package web app.bndrun
• bnd run webapp.bndrun
• …
![Page 13: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/13.jpg)
Deploy into Servlet Container
Servlet Container (e.g. Jetty or Tomcat)
8080
HTTP
simple.war
OSGi Framework (e.g. Felix)
http.bridge
ResourceManager
HTTPService
aQute!rest.srv
ProxyServlet
osgi.simple.webapp
![Page 14: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/14.jpg)
More…
• More about simple OSGi based Web development see Peter Kriens enRoute Blog https://github.com/osgi/osgi.enroute.blog/
Testing OSGi Services
JPA and OSGi Web Apps
…
![Page 15: OSGi Web Development in Action](https://reader033.vdocument.in/reader033/viewer/2022042613/54be344d4a79598c1e8b46f2/html5/thumbnails/15.jpg)
Feedback@tux2323