Your SlideShare is downloading. ×
NanokoDesign – Deliver - DriveClement EscoffierThomas Leveque
Web?
Write once, Run everywhere
How do we do thatwith OSGi™?
Modules
Components
Services
DependencyInjection
Robust buildprocesses
Unit / IntegrationTests
What do we havein JavaScript ?
Module Patterns+ -Fix visibility A bit complexNo interfaces
Module loaders+ -Avoid <script>TransitiveReuseHard-codeddependencies
MVC / MVVM+ -CodeorganizationUI BindingsPushingthe limits
Well, so what’sNanoko ?
It’s an openstack
BuildRunAdapt
BuildMavencoffee-millplay2
Runh-ubuCordobaplay2, grails
AdaptPlatformEnvironment
Something close toOSGi™ : h-ubu
Service-basedInjectionFramework
hub
components
var component = {configure : function(hub, conf) { },getComponentName : function() { },start : function() { },stop : funct...
contracts
var myService= {doSomething : function() {}}
services
servicesServiceRegistry1 - Publication2 – Lookup,Service Listener 3 - Binding
Why services ?SubstitutabilityLoose-couplingTestableDynamic
var provider = {configure : function(hub, conf) {hub.provideService({component: this,contract: myService});},getComponentN...
var consumer = {configure : function(hub, conf) {hub.requireService({component: this,contract: myService,field: "svc"});},...
var consumer = {configure : function(hub, conf) {hub.requireService({component: this,contract: myService,field: "svc"});},...
events
var publisher = {configure : function(hub, conf) {}getComponentName : function() { },start : function() {},stop : function...
var receiver = {configure : function(hub, conf) {hub.subscribe(this, "my/(.)*?",this.receive);},getComponentName : functio...
Modularize yourJavaScriptrequire.js/node.jsCompositionStandaloneConfigurability
http://nano-project.github.com/h-ubu/snapshot/h buStop hacking,Start composing
NanokoDesign – Deliver - Drivehttp://nanoko.org
OW2 Nanoko
OW2 Nanoko
OW2 Nanoko
OW2 Nanoko
Upcoming SlideShare
Loading in...5
×

OW2 Nanoko

309

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
309
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "OW2 Nanoko"

  1. 1. NanokoDesign – Deliver - DriveClement EscoffierThomas Leveque
  2. 2. Web?
  3. 3. Write once, Run everywhere
  4. 4. How do we do thatwith OSGi™?
  5. 5. Modules
  6. 6. Components
  7. 7. Services
  8. 8. DependencyInjection
  9. 9. Robust buildprocesses
  10. 10. Unit / IntegrationTests
  11. 11. What do we havein JavaScript ?
  12. 12. Module Patterns+ -Fix visibility A bit complexNo interfaces
  13. 13. Module loaders+ -Avoid <script>TransitiveReuseHard-codeddependencies
  14. 14. MVC / MVVM+ -CodeorganizationUI BindingsPushingthe limits
  15. 15. Well, so what’sNanoko ?
  16. 16. It’s an openstack
  17. 17. BuildRunAdapt
  18. 18. BuildMavencoffee-millplay2
  19. 19. Runh-ubuCordobaplay2, grails
  20. 20. AdaptPlatformEnvironment
  21. 21. Something close toOSGi™ : h-ubu
  22. 22. Service-basedInjectionFramework
  23. 23. hub
  24. 24. components
  25. 25. var component = {configure : function(hub, conf) { },getComponentName : function() { },start : function() { },stop : function() {}};hub.registerComponent(component).start()
  26. 26. contracts
  27. 27. var myService= {doSomething : function() {}}
  28. 28. services
  29. 29. servicesServiceRegistry1 - Publication2 – Lookup,Service Listener 3 - Binding
  30. 30. Why services ?SubstitutabilityLoose-couplingTestableDynamic
  31. 31. var provider = {configure : function(hub, conf) {hub.provideService({component: this,contract: myService});},getComponentName : function() { },start : function() { },stop : function() {},doSomething : function() { … }}
  32. 32. var consumer = {configure : function(hub, conf) {hub.requireService({component: this,contract: myService,field: "svc"});},getComponentName : function() { },start : function() {},stop : function() {},work : function() {this.svc.doSomething();}}
  33. 33. var consumer = {configure : function(hub, conf) {hub.requireService({component: this,contract: myService,field: "svc"});},getComponentName : function() { },start : function() {},stop : function() {},work : function() {this.svc.doSomething();}}Proxy
  34. 34. events
  35. 35. var publisher = {configure : function(hub, conf) {}getComponentName : function() { },start : function() {},stop : function() {},work : function() {this.hub.publish(this, "my/topic",event);}}
  36. 36. var receiver = {configure : function(hub, conf) {hub.subscribe(this, "my/(.)*?",this.receive);},getComponentName : function() { },start : function() {},stop : function() {},receive: function(event) { }}
  37. 37. Modularize yourJavaScriptrequire.js/node.jsCompositionStandaloneConfigurability
  38. 38. http://nano-project.github.com/h-ubu/snapshot/h buStop hacking,Start composing
  39. 39. NanokoDesign – Deliver - Drivehttp://nanoko.org

×