SlideShare une entreprise Scribd logo
1  sur  18
Yann Schwartz - Polom
Pierre Couzy – Microsoft
WebWorkersCamp, 30/10/2010
Yann :
 .Net heretic (@abolibibelot)
Pierre :
 Worked in the Microsoft space for 20 years
 Speaker, trainer, developer, architect, …
 Primarily interested inWeb topics
 Identity, architecture,WS-*, interop, cloud, …
 Recent interop/OSS activity
 Worked on drupal for Sql server project
 Works on automated drupal testing onWindows
 Speaker at major PHP events
▪ DrupalCon, PHP Forum, Symfony live
blog.couzy.com / pierre.couzy@microsoft.com
A little syntactic sugar can help you think along
the right lines
 C# is an imperative language
 Which is nice
 Except for a few things
 Splitting data manipulation between your code
and your data store
 Coding data manipulation
 Applying new manipulation patterns to existing
data
 Express more intent, less implementation
 Easy composition
 Strong typing
 This is subject to hot debate
 .. And out of scope today
 Be as declarative as possible within the limits
imposed by an imperative language
 Lazy evaluation
 If we step into this code, we see LINQ triggers its magic on
demand
 Easy composition
 If we add new clauses after the LINQ expression is built
but before it’s consumed, we simply merge the additions
to the existing expression
 So far, we’ve worked on objects
 Which is how many naive LINQ implementations work :
synchronously pipelining methods calls on collections
 LINQ has a lot more to it
 But this not on our todo today
A lazy,pull-based,composable pattern for data
manipulation
And we get
 Imperative synchronous programming was
hard enough to call for LINQ
 And yet we’ve been doing this for decades
 Event-based (or async) patterns are a
complete mess today
 Unconvinced ? Let’s see…
 We were pulling data from an enumerable
 We will push data from an observable
 We were lazy (doing just in time)
 We will receive data as a stream (just in time)
 We were composable
 We’ll stay that way
 It’s a source
 Our code will subscribe to that source
 Duh, difference with an event handler ?
 Observable sequences are first-class
constructs
 Provide a layer of abstraction
 Much better for testing
 Allows for much more scenarios
 A sequence is more than a list of ..
 It can fail
 It can end
 The observer , when it subscribes, can
subscribe to those three conditions
 Observables allow you to manipulate a
chronology of events as a list.
 And we can apply operators to lists.
 This is called a workflow.
 LINQ describes an iteration workflow (pull-
based), with composition, so that the
implementation does not obfuscate the
intention,
 Rx describes an event-based workflow (push-
based), with composition, so that the
implementation does not obfuscate the
intention.
Reactive programming for javascript
Reactive programming for javascript

Contenu connexe

En vedette (17)

LETRA DA CANCAO QUERO ME MOVER
LETRA DA CANCAO QUERO ME MOVERLETRA DA CANCAO QUERO ME MOVER
LETRA DA CANCAO QUERO ME MOVER
 
Pip service
Pip servicePip service
Pip service
 
Part4
Part4Part4
Part4
 
Technology and education
Technology and educationTechnology and education
Technology and education
 
Biomimicry presentation 29 10-10 arial
Biomimicry presentation 29 10-10 arialBiomimicry presentation 29 10-10 arial
Biomimicry presentation 29 10-10 arial
 
Wissh Graphics
Wissh GraphicsWissh Graphics
Wissh Graphics
 
MARKETING
MARKETINGMARKETING
MARKETING
 
Preterite categories(shuman)
Preterite categories(shuman)Preterite categories(shuman)
Preterite categories(shuman)
 
1
11
1
 
Radiografía de Tórax
Radiografía de TóraxRadiografía de Tórax
Radiografía de Tórax
 
Best practices MaCS Marketing Communcation Services
Best practices MaCS Marketing Communcation ServicesBest practices MaCS Marketing Communcation Services
Best practices MaCS Marketing Communcation Services
 
Northern ireland
Northern irelandNorthern ireland
Northern ireland
 
Independent reading project
Independent reading projectIndependent reading project
Independent reading project
 
CEP
CEPCEP
CEP
 
Correo gmail
Correo gmailCorreo gmail
Correo gmail
 
Ppt Superchains Final
Ppt Superchains FinalPpt Superchains Final
Ppt Superchains Final
 
Power point
Power pointPower point
Power point
 

Similaire à Reactive programming for javascript

Hadoop at Meebo: Lessons in the Real World
Hadoop at Meebo: Lessons in the Real WorldHadoop at Meebo: Lessons in the Real World
Hadoop at Meebo: Lessons in the Real World
voberoi
 
Synchronous Reads Asynchronous Writes RubyConf 2009
Synchronous Reads Asynchronous Writes RubyConf 2009Synchronous Reads Asynchronous Writes RubyConf 2009
Synchronous Reads Asynchronous Writes RubyConf 2009
pauldix
 
refORM: Death to ORMs in .NET
refORM: Death to ORMs in .NETrefORM: Death to ORMs in .NET
refORM: Death to ORMs in .NET
James Hughes
 

Similaire à Reactive programming for javascript (20)

Microservices: moving parts around
Microservices: moving parts aroundMicroservices: moving parts around
Microservices: moving parts around
 
What linq is about
What linq is aboutWhat linq is about
What linq is about
 
Melbourne Microservices Meetup: Agenda for a new Architecture
Melbourne Microservices Meetup: Agenda for a new ArchitectureMelbourne Microservices Meetup: Agenda for a new Architecture
Melbourne Microservices Meetup: Agenda for a new Architecture
 
UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015
 
Hadoop at Meebo: Lessons in the Real World
Hadoop at Meebo: Lessons in the Real WorldHadoop at Meebo: Lessons in the Real World
Hadoop at Meebo: Lessons in the Real World
 
Synchronous Reads Asynchronous Writes RubyConf 2009
Synchronous Reads Asynchronous Writes RubyConf 2009Synchronous Reads Asynchronous Writes RubyConf 2009
Synchronous Reads Asynchronous Writes RubyConf 2009
 
Micro services
Micro servicesMicro services
Micro services
 
Herding cats in the Cloud
Herding cats in the CloudHerding cats in the Cloud
Herding cats in the Cloud
 
Devops down-under
Devops down-underDevops down-under
Devops down-under
 
Splunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageSplunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the message
 
Clustered PHP - DC PHP 2009
Clustered PHP - DC PHP 2009Clustered PHP - DC PHP 2009
Clustered PHP - DC PHP 2009
 
"Hints" talk at Walchand College Sangli, March 2017
"Hints" talk at Walchand College Sangli, March 2017"Hints" talk at Walchand College Sangli, March 2017
"Hints" talk at Walchand College Sangli, March 2017
 
Would Mr. Spok choose Open Source
Would Mr. Spok choose Open SourceWould Mr. Spok choose Open Source
Would Mr. Spok choose Open Source
 
A Linux Enthusiast's Perspective on Microsoft OSS & Azure
A Linux Enthusiast's Perspective on Microsoft OSS & AzureA Linux Enthusiast's Perspective on Microsoft OSS & Azure
A Linux Enthusiast's Perspective on Microsoft OSS & Azure
 
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
Lotusphere 2007 AD507 Leveraging the Power of Object Oriented Programming in ...
 
refORM: Death to ORMs in .NET
refORM: Death to ORMs in .NETrefORM: Death to ORMs in .NET
refORM: Death to ORMs in .NET
 
Dean4j@Njug5
Dean4j@Njug5Dean4j@Njug5
Dean4j@Njug5
 
Above the cloud joarder kamal
Above the cloud   joarder kamalAbove the cloud   joarder kamal
Above the cloud joarder kamal
 
Future platform for internet of things
Future platform for internet of thingsFuture platform for internet of things
Future platform for internet of things
 
Ad507
Ad507Ad507
Ad507
 

Plus de LeTesteur (13)

EventMachine
EventMachineEventMachine
EventMachine
 
RxJs - Reactive Extensions for JavaScript
RxJs - Reactive Extensions for JavaScriptRxJs - Reactive Extensions for JavaScript
RxJs - Reactive Extensions for JavaScript
 
Drupal en environnement microsoft
Drupal en environnement microsoftDrupal en environnement microsoft
Drupal en environnement microsoft
 
Développer et déployer WordPress en environnement microsoft
Développer et déployer WordPress en environnement microsoftDévelopper et déployer WordPress en environnement microsoft
Développer et déployer WordPress en environnement microsoft
 
Développer et déployer une application php maintenable
Développer et déployer une application php maintenableDévelopper et déployer une application php maintenable
Développer et déployer une application php maintenable
 
Web dev open door
Web dev   open doorWeb dev   open door
Web dev open door
 
Joomla Days 2011 Lyon
Joomla Days 2011 LyonJoomla Days 2011 Lyon
Joomla Days 2011 Lyon
 
Drupal in the cloud with Windows Azure
Drupal in the cloud with Windows AzureDrupal in the cloud with Windows Azure
Drupal in the cloud with Windows Azure
 
Php sous Windows - webcamps Paris
Php sous Windows - webcamps ParisPhp sous Windows - webcamps Paris
Php sous Windows - webcamps Paris
 
Web Matrix (Microsoft WebCamps Paris)
Web Matrix (Microsoft WebCamps Paris)Web Matrix (Microsoft WebCamps Paris)
Web Matrix (Microsoft WebCamps Paris)
 
PHP Forum 2010 : Php et microsoft
PHP Forum 2010 : Php et microsoftPHP Forum 2010 : Php et microsoft
PHP Forum 2010 : Php et microsoft
 
Eclipse day paris
Eclipse day parisEclipse day paris
Eclipse day paris
 
Comment approcherlecloud
Comment approcherlecloudComment approcherlecloud
Comment approcherlecloud
 

Reactive programming for javascript

  • 1. Yann Schwartz - Polom Pierre Couzy – Microsoft WebWorkersCamp, 30/10/2010
  • 2. Yann :  .Net heretic (@abolibibelot)
  • 3. Pierre :  Worked in the Microsoft space for 20 years  Speaker, trainer, developer, architect, …  Primarily interested inWeb topics  Identity, architecture,WS-*, interop, cloud, …  Recent interop/OSS activity  Worked on drupal for Sql server project  Works on automated drupal testing onWindows  Speaker at major PHP events ▪ DrupalCon, PHP Forum, Symfony live blog.couzy.com / pierre.couzy@microsoft.com
  • 4. A little syntactic sugar can help you think along the right lines
  • 5.  C# is an imperative language  Which is nice  Except for a few things  Splitting data manipulation between your code and your data store  Coding data manipulation  Applying new manipulation patterns to existing data
  • 6.
  • 7.  Express more intent, less implementation  Easy composition  Strong typing  This is subject to hot debate  .. And out of scope today  Be as declarative as possible within the limits imposed by an imperative language
  • 8.
  • 9.  Lazy evaluation  If we step into this code, we see LINQ triggers its magic on demand  Easy composition  If we add new clauses after the LINQ expression is built but before it’s consumed, we simply merge the additions to the existing expression  So far, we’ve worked on objects  Which is how many naive LINQ implementations work : synchronously pipelining methods calls on collections  LINQ has a lot more to it  But this not on our todo today
  • 10. A lazy,pull-based,composable pattern for data manipulation And we get
  • 11.  Imperative synchronous programming was hard enough to call for LINQ  And yet we’ve been doing this for decades  Event-based (or async) patterns are a complete mess today  Unconvinced ? Let’s see…
  • 12.  We were pulling data from an enumerable  We will push data from an observable  We were lazy (doing just in time)  We will receive data as a stream (just in time)  We were composable  We’ll stay that way
  • 13.  It’s a source  Our code will subscribe to that source  Duh, difference with an event handler ?  Observable sequences are first-class constructs  Provide a layer of abstraction  Much better for testing  Allows for much more scenarios
  • 14.  A sequence is more than a list of ..  It can fail  It can end  The observer , when it subscribes, can subscribe to those three conditions
  • 15.  Observables allow you to manipulate a chronology of events as a list.  And we can apply operators to lists.  This is called a workflow.
  • 16.  LINQ describes an iteration workflow (pull- based), with composition, so that the implementation does not obfuscate the intention,  Rx describes an event-based workflow (push- based), with composition, so that the implementation does not obfuscate the intention.