SlideShare une entreprise Scribd logo
1  sur  20
Enterprise Node.js Development
Damian Beresford
Twitter: @dberesford
@feedhenry
1
Node.js Dublin April 2014
FeedHenry Platform
Customers
• Customers
• Transport
• Law Enforcement
• Utilities
• Aviation
• Medical
• „Hello world‟ Enterprise Proxy Pattern:
3
FeedHenry Open Source
4
Javascript
5
Node.js Anti Patterns
• Java mind set
• OOP
• Monolithic Systems
6
Anti Anti Patterns
• Data! Functions! Modules!
• Callbacks, async, etc
• Functional Programming
• Underscore
• Start with _each, _map, _filter, _reduce
• Unix/KISS mindset
• Microservices
7
Futurology
• Promises
• Generators
• github.com/visionmedia/co
• Reactive Programming
• Reactive Manifesto
• RxJS
• Bacon.js
8
Testing Stack
• Turbo – test runner
• Istanbul – code coverage
• Proxyquire – mock your require‟s
• Grunt – ties it all together
• See FeedHenry Node.js Cloud Testing Guide
9
Testing Stack - Turbo
• Turbo
• Test runner burn out – tight coupling of test running and code coverage
• No fluff, no nuff, just executes exported functions in your test files
• Per-file and global setUp and tearDown
• Parallel by default – encourages stateless tests
10
Testing - Istanbul
• Code coverage with Istanbul
11
• Jenkins/CI integration
• Express Middleware – dynamic code coverage
Testing - Proxyquire
• Proxyquire: “Proxies nodejs require in order to allow overriding of
dependencies during testing”
12
var request = require('request');
exports.search = function(params, cb) {
request('https://www.google.ie/?q=foo#q=foo', function(err, res, body) {
if (err) return cb(err);
return cb(null, body);
});
};
exports.it_should_test_search = function(finish) {
var mockRequest = function(url, cb) {
console.log("in mock call to request!");
return cb(null, {}, 'Sample data!!');
};
var main = proxyquire('lib/foo.js', {request: mockRequest});
main.search(null, function(err, data) {
assert.ok(!err, 'Unexpected error: ' + util.inspect(err));
console.log("got data from search: ", data);
finish();
});
};
Testing – unit vs acceptance
• Eyes on code!
• unit tests should require no external dependencies, external services should
be mocked out (e.g. internet access, writing to file/database, etc)
• unit tests should be super quick to run
• unit tests should be reliable as no external dependencies
• unit tests should just test your own logic
• acceptance tests can require external dependencies, which do require
setup (which should be well documented!)
• as such they can take longer to run
• acceptance tests are a more 'end to end' philosophy
13
Micro Services
• martinfowler.com/articles/microservices.html
• yobriefca.se/blog/2013/04/29/micro-service-architecture
• slideshare.net/michaelneale/microservices-and-functional-programming
• klangism.tumblr.com/post/80087171446/microservices
• richardrodger.com/monolithic-nodejs
14
Mirco Services
• Mix of Message Bus and API
• API - JSON in JSON out (robustness principal)
• Message Bus – Rabbit MQ
• Not just node.js, DropWizard for Java
• Continuous Integration - Small Production Deploys
• Operations – monitor all the things
• Dedicated Ops and Support teams
15
Mirco Services – complexity
• Not a silver bullet – but does help with complexity
• Still deal with lots of business rules, moving parts, etc
• Easy !== Simple
• Work at simplicity
• Need Master Builders to keep all the balls in the air
• Boxology
16
Misc
• Private NPM Registry: npm delegate (may move to Kappa)
• Docker – container awesomeness
• API Blueprint – readme on steroids
17
API Blueprint
18
API Blueprint
19
Thank you..
• Tanx!
• www.feedhenry.com/ for more…
20

Contenu connexe

Tendances

Middleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeMiddleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeCale Hoopes
 
Automating security with PowerShell
Automating security with PowerShellAutomating security with PowerShell
Automating security with PowerShellJaap Brasser
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With JestBen McCormick
 
Ursula Sarracini - When Old Meets New: Codebases
Ursula Sarracini - When Old Meets New: CodebasesUrsula Sarracini - When Old Meets New: Codebases
Ursula Sarracini - When Old Meets New: CodebasesAnton Caceres
 
Доклад Михаила Егорова на PHDays
Доклад Михаила Егорова на PHDaysДоклад Михаила Егорова на PHDays
Доклад Михаила Егорова на PHDaysru_Parallels
 
Harnessing The Power of CDNs
Harnessing The Power of CDNsHarnessing The Power of CDNs
Harnessing The Power of CDNsGurpreet Luthra
 
Hibernate performance tuning
Hibernate performance tuningHibernate performance tuning
Hibernate performance tuningMikalai Alimenkou
 
Entity framework core v3 from sql to no sql
Entity framework core v3 from sql to no sqlEntity framework core v3 from sql to no sql
Entity framework core v3 from sql to no sqlAndrea Tosato
 
Code review and security audit in private cloud - Arief Karfianto
Code review and security audit in private cloud - Arief KarfiantoCode review and security audit in private cloud - Arief Karfianto
Code review and security audit in private cloud - Arief Karfiantoidsecconf
 
Chat automation in a Modern IT environment
Chat automation in a Modern IT environmentChat automation in a Modern IT environment
Chat automation in a Modern IT environmentJaap Brasser
 
Azure DevOps Overview [Arabic]
Azure DevOps Overview [Arabic]Azure DevOps Overview [Arabic]
Azure DevOps Overview [Arabic]ahmadezzeir
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Shivam Bharadwaj
 
How to make your functional tests really quick
How to make your functional tests really quickHow to make your functional tests really quick
How to make your functional tests really quickMikalai Alimenkou
 
Managing changes to eZPublish Database
Managing changes to eZPublish DatabaseManaging changes to eZPublish Database
Managing changes to eZPublish DatabaseGaetano Giunta
 
Building autonomous components with OWIN, PSake, NuGet, GitVersion and Swagger
Building autonomous components with OWIN, PSake, NuGet, GitVersion and SwaggerBuilding autonomous components with OWIN, PSake, NuGet, GitVersion and Swagger
Building autonomous components with OWIN, PSake, NuGet, GitVersion and SwaggerDennis Doomen
 
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...Sencha
 

Tendances (20)

Hello world - intro to node js
Hello world - intro to node jsHello world - intro to node js
Hello world - intro to node js
 
Middleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeMiddleware in Golang: InVision's Rye
Middleware in Golang: InVision's Rye
 
Automating security with PowerShell
Automating security with PowerShellAutomating security with PowerShell
Automating security with PowerShell
 
Power shell v3 session1
Power shell v3   session1Power shell v3   session1
Power shell v3 session1
 
Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With Jest
 
Ursula Sarracini - When Old Meets New: Codebases
Ursula Sarracini - When Old Meets New: CodebasesUrsula Sarracini - When Old Meets New: Codebases
Ursula Sarracini - When Old Meets New: Codebases
 
Доклад Михаила Егорова на PHDays
Доклад Михаила Егорова на PHDaysДоклад Михаила Егорова на PHDays
Доклад Михаила Егорова на PHDays
 
Harnessing The Power of CDNs
Harnessing The Power of CDNsHarnessing The Power of CDNs
Harnessing The Power of CDNs
 
Hibernate performance tuning
Hibernate performance tuningHibernate performance tuning
Hibernate performance tuning
 
Entity framework core v3 from sql to no sql
Entity framework core v3 from sql to no sqlEntity framework core v3 from sql to no sql
Entity framework core v3 from sql to no sql
 
Code review and security audit in private cloud - Arief Karfianto
Code review and security audit in private cloud - Arief KarfiantoCode review and security audit in private cloud - Arief Karfianto
Code review and security audit in private cloud - Arief Karfianto
 
Chat automation in a Modern IT environment
Chat automation in a Modern IT environmentChat automation in a Modern IT environment
Chat automation in a Modern IT environment
 
Azure DevOps Overview [Arabic]
Azure DevOps Overview [Arabic]Azure DevOps Overview [Arabic]
Azure DevOps Overview [Arabic]
 
The busy developers guide to Docker
The busy developers guide to DockerThe busy developers guide to Docker
The busy developers guide to Docker
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?
 
Test-Driven Sitecore
Test-Driven SitecoreTest-Driven Sitecore
Test-Driven Sitecore
 
How to make your functional tests really quick
How to make your functional tests really quickHow to make your functional tests really quick
How to make your functional tests really quick
 
Managing changes to eZPublish Database
Managing changes to eZPublish DatabaseManaging changes to eZPublish Database
Managing changes to eZPublish Database
 
Building autonomous components with OWIN, PSake, NuGet, GitVersion and Swagger
Building autonomous components with OWIN, PSake, NuGet, GitVersion and SwaggerBuilding autonomous components with OWIN, PSake, NuGet, GitVersion and Swagger
Building autonomous components with OWIN, PSake, NuGet, GitVersion and Swagger
 
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
SenchaCon 2016: Turbocharge your Ext JS App - Per Minborg, Anselm McClain, Jo...
 

En vedette

Enterprise Mobile Development
Enterprise Mobile DevelopmentEnterprise Mobile Development
Enterprise Mobile DevelopmentDamian Beresford
 
Webinar october 27
Webinar october 27Webinar october 27
Webinar october 27grupohit
 
Palmer, Pollard, Verzuh - Slavery & Constitution
Palmer, Pollard, Verzuh - Slavery & ConstitutionPalmer, Pollard, Verzuh - Slavery & Constitution
Palmer, Pollard, Verzuh - Slavery & Constitutiondan_verzuh
 
Webinar october 27
Webinar october 27Webinar october 27
Webinar october 27grupohit
 
50 comandos de windows
50 comandos de windows50 comandos de windows
50 comandos de windowselkin1119
 
SIP Trunking for VoIP Service Providers
SIP Trunking for VoIP Service ProvidersSIP Trunking for VoIP Service Providers
SIP Trunking for VoIP Service ProvidersIPsmarx Technology
 
Everything You Need to Know About the IPsmarx SIP Trunking Solution
Everything You Need to Know About the IPsmarx SIP Trunking SolutionEverything You Need to Know About the IPsmarx SIP Trunking Solution
Everything You Need to Know About the IPsmarx SIP Trunking SolutionIPsmarx Technology
 

En vedette (11)

Enterprise Mobile Development
Enterprise Mobile DevelopmentEnterprise Mobile Development
Enterprise Mobile Development
 
Sindikalni povjerenik
Sindikalni povjerenikSindikalni povjerenik
Sindikalni povjerenik
 
Slideshare
SlideshareSlideshare
Slideshare
 
Test
TestTest
Test
 
Webinar october 27
Webinar october 27Webinar october 27
Webinar october 27
 
Palmer, Pollard, Verzuh - Slavery & Constitution
Palmer, Pollard, Verzuh - Slavery & ConstitutionPalmer, Pollard, Verzuh - Slavery & Constitution
Palmer, Pollard, Verzuh - Slavery & Constitution
 
Webinar october 27
Webinar october 27Webinar october 27
Webinar october 27
 
Great Sex Guarantee Keynote
Great Sex Guarantee Keynote Great Sex Guarantee Keynote
Great Sex Guarantee Keynote
 
50 comandos de windows
50 comandos de windows50 comandos de windows
50 comandos de windows
 
SIP Trunking for VoIP Service Providers
SIP Trunking for VoIP Service ProvidersSIP Trunking for VoIP Service Providers
SIP Trunking for VoIP Service Providers
 
Everything You Need to Know About the IPsmarx SIP Trunking Solution
Everything You Need to Know About the IPsmarx SIP Trunking SolutionEverything You Need to Know About the IPsmarx SIP Trunking Solution
Everything You Need to Know About the IPsmarx SIP Trunking Solution
 

Similaire à Node.js Dublin Meetup April 2014

Surrogate dependencies (in node js) v1.0
Surrogate dependencies  (in node js)  v1.0Surrogate dependencies  (in node js)  v1.0
Surrogate dependencies (in node js) v1.0Dinis Cruz
 
Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...Bert Jan Schrijver
 
Dublin JUG February 2018 - Microservices in action at the Dutch National Police
Dublin JUG February 2018 - Microservices in action at the Dutch National PoliceDublin JUG February 2018 - Microservices in action at the Dutch National Police
Dublin JUG February 2018 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National PoliceiSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Microservices in action at the Dutch National Police
Microservices in action at the Dutch National PoliceMicroservices in action at the Dutch National Police
Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
OpenValue meetup October 2017 - Microservices in action at the Dutch National...
OpenValue meetup October 2017 - Microservices in action at the Dutch National...OpenValue meetup October 2017 - Microservices in action at the Dutch National...
OpenValue meetup October 2017 - Microservices in action at the Dutch National...Bert Jan Schrijver
 
JavaZone 2017 - Microservices in action at the Dutch National Police
JavaZone 2017 - Microservices in action at the Dutch National PoliceJavaZone 2017 - Microservices in action at the Dutch National Police
JavaZone 2017 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Devoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National PoliceDevoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Dev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsDev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsMahesh Arali
 
Architecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering CultureArchitecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering CultureSARCCOM
 
Architecting for Hyper Growth and Great Engineering Culture
Architecting for Hyper Growth and Great Engineering CultureArchitecting for Hyper Growth and Great Engineering Culture
Architecting for Hyper Growth and Great Engineering Cultureifnu bima
 
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Denim Group
 
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National PoliceCodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...Codemotion
 
GeekOut 2017 - Microservices in action at the Dutch National Police
GeekOut 2017 -  Microservices in action at the Dutch National PoliceGeekOut 2017 -  Microservices in action at the Dutch National Police
GeekOut 2017 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Operating a High Velocity Large Organization with Spring Cloud Microservices
Operating a High Velocity Large Organization with Spring Cloud MicroservicesOperating a High Velocity Large Organization with Spring Cloud Microservices
Operating a High Velocity Large Organization with Spring Cloud MicroservicesNoriaki Tatsumi
 
Testing Below the Application
Testing Below the ApplicationTesting Below the Application
Testing Below the ApplicationAsh Winter
 
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native CompanionJakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native CompanionJakarta_EE
 

Similaire à Node.js Dublin Meetup April 2014 (20)

Node.js
Node.jsNode.js
Node.js
 
Surrogate dependencies (in node js) v1.0
Surrogate dependencies  (in node js)  v1.0Surrogate dependencies  (in node js)  v1.0
Surrogate dependencies (in node js) v1.0
 
Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...
 
Dublin JUG February 2018 - Microservices in action at the Dutch National Police
Dublin JUG February 2018 - Microservices in action at the Dutch National PoliceDublin JUG February 2018 - Microservices in action at the Dutch National Police
Dublin JUG February 2018 - Microservices in action at the Dutch National Police
 
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National PoliceiSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
 
Microservices in action at the Dutch National Police
Microservices in action at the Dutch National PoliceMicroservices in action at the Dutch National Police
Microservices in action at the Dutch National Police
 
OpenValue meetup October 2017 - Microservices in action at the Dutch National...
OpenValue meetup October 2017 - Microservices in action at the Dutch National...OpenValue meetup October 2017 - Microservices in action at the Dutch National...
OpenValue meetup October 2017 - Microservices in action at the Dutch National...
 
JavaZone 2017 - Microservices in action at the Dutch National Police
JavaZone 2017 - Microservices in action at the Dutch National PoliceJavaZone 2017 - Microservices in action at the Dutch National Police
JavaZone 2017 - Microservices in action at the Dutch National Police
 
Devoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National PoliceDevoxx PL 2018 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National Police
 
Dev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsDev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teams
 
Architecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering CultureArchitecting for Huper Growth and Great Engineering Culture
Architecting for Huper Growth and Great Engineering Culture
 
Architecting for Hyper Growth and Great Engineering Culture
Architecting for Hyper Growth and Great Engineering CultureArchitecting for Hyper Growth and Great Engineering Culture
Architecting for Hyper Growth and Great Engineering Culture
 
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
 
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National PoliceCodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
 
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...
 
GeekOut 2017 - Microservices in action at the Dutch National Police
GeekOut 2017 -  Microservices in action at the Dutch National PoliceGeekOut 2017 -  Microservices in action at the Dutch National Police
GeekOut 2017 - Microservices in action at the Dutch National Police
 
Apereo OAE - Bootcamp
Apereo OAE - BootcampApereo OAE - Bootcamp
Apereo OAE - Bootcamp
 
Operating a High Velocity Large Organization with Spring Cloud Microservices
Operating a High Velocity Large Organization with Spring Cloud MicroservicesOperating a High Velocity Large Organization with Spring Cloud Microservices
Operating a High Velocity Large Organization with Spring Cloud Microservices
 
Testing Below the Application
Testing Below the ApplicationTesting Below the Application
Testing Below the Application
 
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native CompanionJakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
JakartaOne Livestream CN4J: Eclipse MicroProfile - Your Cloud-Native Companion
 

Dernier

Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 

Dernier (20)

Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 

Node.js Dublin Meetup April 2014

  • 1. Enterprise Node.js Development Damian Beresford Twitter: @dberesford @feedhenry 1 Node.js Dublin April 2014
  • 3. Customers • Customers • Transport • Law Enforcement • Utilities • Aviation • Medical • „Hello world‟ Enterprise Proxy Pattern: 3
  • 6. Node.js Anti Patterns • Java mind set • OOP • Monolithic Systems 6
  • 7. Anti Anti Patterns • Data! Functions! Modules! • Callbacks, async, etc • Functional Programming • Underscore • Start with _each, _map, _filter, _reduce • Unix/KISS mindset • Microservices 7
  • 8. Futurology • Promises • Generators • github.com/visionmedia/co • Reactive Programming • Reactive Manifesto • RxJS • Bacon.js 8
  • 9. Testing Stack • Turbo – test runner • Istanbul – code coverage • Proxyquire – mock your require‟s • Grunt – ties it all together • See FeedHenry Node.js Cloud Testing Guide 9
  • 10. Testing Stack - Turbo • Turbo • Test runner burn out – tight coupling of test running and code coverage • No fluff, no nuff, just executes exported functions in your test files • Per-file and global setUp and tearDown • Parallel by default – encourages stateless tests 10
  • 11. Testing - Istanbul • Code coverage with Istanbul 11 • Jenkins/CI integration • Express Middleware – dynamic code coverage
  • 12. Testing - Proxyquire • Proxyquire: “Proxies nodejs require in order to allow overriding of dependencies during testing” 12 var request = require('request'); exports.search = function(params, cb) { request('https://www.google.ie/?q=foo#q=foo', function(err, res, body) { if (err) return cb(err); return cb(null, body); }); }; exports.it_should_test_search = function(finish) { var mockRequest = function(url, cb) { console.log("in mock call to request!"); return cb(null, {}, 'Sample data!!'); }; var main = proxyquire('lib/foo.js', {request: mockRequest}); main.search(null, function(err, data) { assert.ok(!err, 'Unexpected error: ' + util.inspect(err)); console.log("got data from search: ", data); finish(); }); };
  • 13. Testing – unit vs acceptance • Eyes on code! • unit tests should require no external dependencies, external services should be mocked out (e.g. internet access, writing to file/database, etc) • unit tests should be super quick to run • unit tests should be reliable as no external dependencies • unit tests should just test your own logic • acceptance tests can require external dependencies, which do require setup (which should be well documented!) • as such they can take longer to run • acceptance tests are a more 'end to end' philosophy 13
  • 14. Micro Services • martinfowler.com/articles/microservices.html • yobriefca.se/blog/2013/04/29/micro-service-architecture • slideshare.net/michaelneale/microservices-and-functional-programming • klangism.tumblr.com/post/80087171446/microservices • richardrodger.com/monolithic-nodejs 14
  • 15. Mirco Services • Mix of Message Bus and API • API - JSON in JSON out (robustness principal) • Message Bus – Rabbit MQ • Not just node.js, DropWizard for Java • Continuous Integration - Small Production Deploys • Operations – monitor all the things • Dedicated Ops and Support teams 15
  • 16. Mirco Services – complexity • Not a silver bullet – but does help with complexity • Still deal with lots of business rules, moving parts, etc • Easy !== Simple • Work at simplicity • Need Master Builders to keep all the balls in the air • Boxology 16
  • 17. Misc • Private NPM Registry: npm delegate (may move to Kappa) • Docker – container awesomeness • API Blueprint – readme on steroids 17
  • 20. Thank you.. • Tanx! • www.feedhenry.com/ for more… 20