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
of 43

OW2 Nanoko

Published on: Mar 3, 2016
Published in: Technology      Entertainment & Humor      
Source: www.slideshare.net


Transcripts - OW2 Nanoko

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

Related Documents