SlideShare a Scribd company logo
1 of 40
JavaScript for
Enterprise
Applications
Piyush Katariya
Software Architect, Red Panda Innovation Labs
● Pune● Mumbai
We are ...
We believe in meaningful iterations such as
...
We rely on ...
Why
( people rant / believe / think )
JavaScript sucks ?
Most like it Static and Strong
● Dynamic :
○ Duck typing (No help from Compiler)
○ Late binding (Runtime is the King)
○ Polymorphism by capability
● Weak :
○ Not agnostic about types while code
execution (Recipe for all disasters)
○ Allow weird operations ( [ ] + { } )
○ Implicit conversions ( “2” * “3” = 6 )
● Static typing does not mean that TDD/BDD
can be ignored
● Productivity due to
○ Duck typing
○ Map/JSON over concrete object
Other Accusations
My reply against Accusation for To reactions by Newbies
Yep it sucks. Use “yield” instead Callbacks WTF ???
Better syntax and error handling but use
“yield” instead
Promises Really ?? WTF ???
Corporate vs Open specification trade off
Are your requirements clear ?
Evaluate case by case basis.
Fragmented community at least
hundred options of libs and
frameworks for given task
What to choose ?
Why to choose ?
Why isn’t there a standard ?
Understand Concurrency vs Parallelism.
Little slower at computation but much
better at memory usage and IO
multiplexing than JVM/CLR.
No synchronization problems. period.
Single threaded and Slow Execution is slow because its
dynamic language !
What ? It does not have
multithreading support???
Atom, Visual Code, ESLint, TypeScript ? IDE, Compiler Basic and Refactoring support ?
Procedural, functional and event driven Multiple Paradigm confusion OO, Prototypal, functional, event ?
Paradigms and Disciplines
● Structured [ Edgar Dijkstra : Go To Statement Considered Harmful ]
○ Avoid “goto” statements
○ Embrace block structures, for/while loops and small functions/subroutines
● Object Oriented [ Simula and Simula-67 language]
○ Avoid pointer to functions
○ Embrace code reuse - Inheritance and (Parametric and Subtype) Polymorphism
● Functional [ John McCarthy : LISP ]
○ Avoid variables, use only constants (Referential Transparency)
○ Avoid mutation or IO side effects (or reduce it by wrapping it inside a Monad)
○ Embrace Higher Order functions, Recursion, Persistent data structures, CT
● Event Driven [CSP, Actor Model]
○ Avoid function/subroutine call by direct reference
○ Embrace communication between isolated components by generating an event
and registering callback function/subroutine
NodeJS Runtime
What they ignore (or less aware of)
➔ Application reload within milliseconds during development and deployment
➔ PM2 process manager for painless deployment and monitoring
➔ V8 engine performance
➔ Serving Tens of thousands of network connections with little memory overhead
➔ ES6 “yield” is here. ES7 “async” and “await” is not necessary
➔ Using Babel (transpiler) to emit ECMAScript 5 code
➔ RamdaJS and date-fp - functional replacement for collection and date API
➔ Programmable Module level polymorphism using CommonJS
➔ Isomorphism - Mobile devices, Browser, Server and NoSql DB query
➔ NodeJS Long Time Support - https://github.com/nodejs/LTS
ES6 Basics and Generators
ECMAScript 6
● No semicolons
● Fat arrows (with bind feature)
● Template strings
● let - control scoping
● const - control assignments
● Destructuring
● Generator
○ Lazy collections
○ Avoid callbacks
○ Avoid promise (use but not creation)
● for-of loop
All features :- http://es6-features.org/
Must Have ESLint and FP plugin
● eslint - Takes care of JS language quirks
● eslint_plugin_fp - JS as pure FP language
fp/no-arguments fp/no-mutating-methods
fp/no-class fp/no-mutation
fp/no-delete fp/no-nil
fp/no-events fp/no-proxy
fp/no-get-set fp/no-rest-parameters
fp/no-let fp/no-this
fp/no-loops fp/no-throw
fp/no-mutating-assign fp/no-unused-expression
no-var fp/no-valueof-field
Communicating
Sequential
Processes
C S P for Dummies
➔ Don't communicate by sharing state, share state by communicating
➔ Communicating
◆ Conversation over channel/queues/distributed queues
◆ Remote procedure calls
➔ Sequential
◆ Execution flow
➔ Processess
◆ Coroutines
◆ Green threads (scheduled by VM)
◆ Real threads (scheduled by OS)
◆ OS Process
◆ Machines
◆ Cluster of Machines
➔ Original Paper - http://usingcsp.com/cspbook.pdf
CSP vs Actor Model
CSP Actor Model
Process Identity Anonymous Concrete
Message Passing Synchronous Asynchronous
Communication Channels/Queues Direct
Composition NA Applicable
Fault Tolerance Easy to built with Distributed
Queue
Hierarchy of Local and
Distributed Supervisors
➔ Hybrid approach is also viable and more practical
RamdaJS
Data - Structure and Types
● Data is all we have
● Data is what we need to transform in order to create a user experience
○ Photoshop without the images is nothing
○ Word is nothing without the characters
● Instructions are data too
● Immutability matters
○ Value - Always Immutable
○ State - Snapshot. Value of something at certain point of time
○ Identity - Stable logical entity associated with a series of different values over time
○ Time - Relative term, not physically measurable
Computation - Function and HOF
● Higher Order Function (does either or both)
○ Accepts a function
○ Returns a function
● Higher order abstraction for
○ Computation
○ Combinators
○ DSL - Composition of computation and combinators
Thinking functionally
● Use function as first class citizen to build abstraction
● Avoid mutation of variable(memory pointer handle) and data (state)
● Chant this mantra every morning, “null is a billion dollar mistake”
● Favour recursion over iteration
● Procure laziness with Streams
● Use expressions over statements
● Composition over inheritance
● Many identical functions for few data structures than few different functions for many
data structures
RamdaJS HOF Abstraction
● Auto Currying
● Abstraction Categories
○ Object
○ Function
○ List
○ Math
○ Logic
○ Relation
○ Type
● Transducers
http://ramdajs.com/docs/
Server Side
Architecture
Software Architecture in a nutshell
“ In most successful software projects, the expert developers working
on that project have a shared understanding of the design.
This shared understanding is called ‘Architecture.’
This understanding includes how the system is divided into
components and how the components interact through interfaces.
These components are usually composed of smaller components, but
the architecture only includes the components and interfaces that
are understood by all the developers ”
- Martin Fowler
Abstraction and Indirection
“ The essence of abstractions is preserving information that is relevant in a given context,
and forgetting information that is irrelevant in that context ”
– John V. Guttag
“ In computer programming, indirection is the ability to reference something using a name,
reference, or container instead of the value itself ”
“ All problems in computer science can be solved by another level of indirection ….”
- David Wheeler
“ ….. except the problem of too many
layers of indirection ”
“ Making something easy to
change makes the overall
system a little more complex,
and making everything easy to
change makes the entire system
very complex.
Complexity is what makes
software hard to change “
Scaling with MicroServices
Architecture decisions starts with
“ Optimism is an occupational hazard of programming;
feedback is the treatment. ”
- Kent Beck
● Initial market research for given Business Domain
● Security
● Transaction capability and boundaries
● Online active users growth - total vs active vs online users
● Data growth
● Testability (and hence modularity)
● External integration points
● Response generation eagerness - sync, or async
Micro Services done right
● It’s more social than technical
● Always start with monolith and scale gradually
● Scaling few business use cases
○ Computational complexity
○ Number of requests and responsiveness
● Scaling a business module
○ Computational complexity
○ Software as a Service
● Scaling a team
○ Programming platform expertise
○ Business Domain expertise
○ Maintenance
● Embrace async flow and Distributed Message Queues
Use DDD iff Domain is Rich and Complex
KoaJS
● By authors which gave us ExpressJS
● ES6 Framework
● Promise continuation based on “co” library
● Modular Architecture
● Composable
● Compatible with NodeJS 4.x and later
● Various community plugins
http://koajs.com/
PM2 Process Manager
● Superior version of “cluster” module
● Load Balancing & Zero second Downtime Reload
● Compatible with almost all major web frameworks
● CPU Process monitors
● Log monitors
http://pm2.keymetrics.io/
Hybrid Apps with Cordova
Cordova Architecture
Cordova Apps
● Written in HTML, CSS and JS
● Single codebase for multiple target platforms
○ Internet Browsers - IE, firefox, Chrome, Safari etc.
○ Mobile devices - Android, iOS, Windows etc.
● Webview - Chrome browser engine
● Fast development cycles compared to Native apps
● HTML5 Canvas for Game Programming
● Modern WebViews are as responsive as Native platform
● Access various device features through cordova plugins
https://cordova.apache.org
Features/Characteristics Hybrid Native
Runs on Chrome browser runtime OS runtime
Additional Runtime Crosswalk for 4.x, Not required for 5.x and later Not required
Approximate Software artefact
download size for say 10 screens
4.5 MB for 4.x, 3 MB for Android 5.x and later 4 MB
Increase in download Size due to
additional runtime
23 MB (one time) for Android 4.x and iOS 7 ZERO
Development HTML, CSS and JS, More widely adopted tools Java for Android, Swift for iOS
Required Tech Skills Anyone who knows web programming specific skill according to platform and
native SDK
Supported Platform Android, iOS, Windows, Symbian etc. only one platform
Relative Development and Debugging
time and responding to frequently
changing business requirements
1x 2x to 3x
Performance
Responsive. can be tuned to minute level of browser runtime
Best in class. Can be tuned to minute
level to OS runtime
Security Issues:
Insecure local data storage
Weak SSL implementation
Unintended data leaks
Reverse Engineering
Code Injection
Can be dealt Can be dealt
Additional features supported Only major features are supported. here is the detailed list
https://cordova.apache.org/docs/en/latest/guide/support/
All of which device is capable of
ClojureScript
ClojureScript
● by Rich Hickey
● Compiles to JS
● LISP - Code is Data is Code
● Macros - Homoiconicity
● Immutable Data Structures - Referential transparency
● Higher Order Functions - Sheer joy of computation
● Google Closure compiler - Lots of goodies including dead code elimination
● Figwheel - Interactive development
● Nice interop with JS and NPM
● Higher learning curve but worth it
https://clojurescript.org/
Reagent
● Based on React
○ Functional
○ Component based architecture
○ Higher order components
● Hiccup (embed HTML)
● reagent-utils
● re-frame
https://reagent-project.github.io
core.async
● CSP implementation for Clojure(Script)
● First class Goroutines support inspired by Go lang
● Being Reactive
○ Responsive - Rapid and consistent response time with reliable upper bounds
○ Resilient - replication, containment, isolation and delegation.
○ Elastic - responsive under varying workload, ability to add
○ Message Driven - loose coupling, isolation and location transparency.
http://www.reactivemanifesto.org/
Thank You
Piyush Katariya
@AhamPiyush

More Related Content

What's hot

Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0Ganesh Kondal
 
Stockholm JAM September 2018
Stockholm JAM September 2018Stockholm JAM September 2018
Stockholm JAM September 2018Andrey Devyatkin
 
'How to build your first micro frontend in a matter of minutes' by Vladlen Fe...
'How to build your first micro frontend in a matter of minutes' by Vladlen Fe...'How to build your first micro frontend in a matter of minutes' by Vladlen Fe...
'How to build your first micro frontend in a matter of minutes' by Vladlen Fe...OdessaJS Conf
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Ganesh Kondal
 
Perl6 DBDI YAPC::EU 201008
Perl6 DBDI YAPC::EU 201008Perl6 DBDI YAPC::EU 201008
Perl6 DBDI YAPC::EU 201008Tim Bunce
 
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Movel
 
Building Massive AngularJS Apps
Building Massive AngularJS AppsBuilding Massive AngularJS Apps
Building Massive AngularJS AppsGordon Bockus
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Ganesh Kondal
 
'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020
'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020
'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020OdessaJS Conf
 
Sprint Boot & Kotlin - Meetup.pdf
Sprint Boot & Kotlin - Meetup.pdfSprint Boot & Kotlin - Meetup.pdf
Sprint Boot & Kotlin - Meetup.pdfChristian Zellot
 
Testing Storm components with Groovy and Spock
Testing Storm components with Groovy and SpockTesting Storm components with Groovy and Spock
Testing Storm components with Groovy and SpockEugene Dvorkin
 
Adopting language server for apache camel feedback from a java/Eclipse plugi...
Adopting language server for apache camel  feedback from a java/Eclipse plugi...Adopting language server for apache camel  feedback from a java/Eclipse plugi...
Adopting language server for apache camel feedback from a java/Eclipse plugi...Aurélien Pupier
 
Kotlin - A Programming Language
Kotlin - A Programming Language Kotlin - A Programming Language
Kotlin - A Programming Language Mobio Solutions
 
Simple Pure Java
Simple Pure JavaSimple Pure Java
Simple Pure JavaAnton Keks
 
Yet Another Continuous Integration Story
Yet Another Continuous Integration StoryYet Another Continuous Integration Story
Yet Another Continuous Integration StoryAnton Serdyuk
 
The modern view on implementation of classic design patterns in Java
The modern view on implementation of classic design patterns in JavaThe modern view on implementation of classic design patterns in Java
The modern view on implementation of classic design patterns in JavaMikalai Alimenkou
 

What's hot (20)

Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0
 
Stockholm JAM September 2018
Stockholm JAM September 2018Stockholm JAM September 2018
Stockholm JAM September 2018
 
'How to build your first micro frontend in a matter of minutes' by Vladlen Fe...
'How to build your first micro frontend in a matter of minutes' by Vladlen Fe...'How to build your first micro frontend in a matter of minutes' by Vladlen Fe...
'How to build your first micro frontend in a matter of minutes' by Vladlen Fe...
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6
 
Perl6 DBDI YAPC::EU 201008
Perl6 DBDI YAPC::EU 201008Perl6 DBDI YAPC::EU 201008
Perl6 DBDI YAPC::EU 201008
 
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
 
Building Massive AngularJS Apps
Building Massive AngularJS AppsBuilding Massive AngularJS Apps
Building Massive AngularJS Apps
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
 
Clojure presentation
Clojure presentationClojure presentation
Clojure presentation
 
'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020
'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020
'Architecture of modern frontend apps' by YURIY DOBRYANSKYY at OdessaJS'2020
 
Workflow Yapceu2010
Workflow Yapceu2010Workflow Yapceu2010
Workflow Yapceu2010
 
Sprint Boot & Kotlin - Meetup.pdf
Sprint Boot & Kotlin - Meetup.pdfSprint Boot & Kotlin - Meetup.pdf
Sprint Boot & Kotlin - Meetup.pdf
 
Testing Storm components with Groovy and Spock
Testing Storm components with Groovy and SpockTesting Storm components with Groovy and Spock
Testing Storm components with Groovy and Spock
 
Adopting language server for apache camel feedback from a java/Eclipse plugi...
Adopting language server for apache camel  feedback from a java/Eclipse plugi...Adopting language server for apache camel  feedback from a java/Eclipse plugi...
Adopting language server for apache camel feedback from a java/Eclipse plugi...
 
Assembly thy Web
Assembly thy WebAssembly thy Web
Assembly thy Web
 
Kotlin - A Programming Language
Kotlin - A Programming Language Kotlin - A Programming Language
Kotlin - A Programming Language
 
Simple Pure Java
Simple Pure JavaSimple Pure Java
Simple Pure Java
 
Java 8 parallel stream
Java 8 parallel streamJava 8 parallel stream
Java 8 parallel stream
 
Yet Another Continuous Integration Story
Yet Another Continuous Integration StoryYet Another Continuous Integration Story
Yet Another Continuous Integration Story
 
The modern view on implementation of classic design patterns in Java
The modern view on implementation of classic design patterns in JavaThe modern view on implementation of classic design patterns in Java
The modern view on implementation of classic design patterns in Java
 

Viewers also liked

JavaScript (without DOM)
JavaScript (without DOM)JavaScript (without DOM)
JavaScript (without DOM)Piyush Katariya
 
Javascript Libraries & Frameworks | Connor Goddard
Javascript Libraries & Frameworks | Connor GoddardJavascript Libraries & Frameworks | Connor Goddard
Javascript Libraries & Frameworks | Connor GoddardConnor Goddard
 
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...Amazon Web Services
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureSimon Willison
 
Java vs javascript (XPages)
Java vs javascript (XPages)Java vs javascript (XPages)
Java vs javascript (XPages)Andrew Barickman
 
JavaOne 2014: Java vs JavaScript
JavaOne 2014:   Java vs JavaScriptJavaOne 2014:   Java vs JavaScript
JavaOne 2014: Java vs JavaScriptChris Bailey
 
Java vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJava vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJAXLondon_Conference
 
Book review firms of endearment how world class companies profit from passion...
Book review firms of endearment how world class companies profit from passion...Book review firms of endearment how world class companies profit from passion...
Book review firms of endearment how world class companies profit from passion...abhishek rane
 
Choosing Javascript Libraries to Adopt for Development
Choosing Javascript Libraries to Adopt for DevelopmentChoosing Javascript Libraries to Adopt for Development
Choosing Javascript Libraries to Adopt for DevelopmentEdward Apostol
 
Hybrid Mobile Development
Hybrid Mobile DevelopmentHybrid Mobile Development
Hybrid Mobile DevelopmentShai Raiten
 
10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScriptGeertjan Wielenga
 
Webinar AWS 201 Delivering apps without servers
Webinar AWS 201 Delivering apps without serversWebinar AWS 201 Delivering apps without servers
Webinar AWS 201 Delivering apps without serversAmazon Web Services
 
Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)Addy Osmani
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksFITC
 
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersMicroservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersDanilo Poccia
 
Scalable JavaScript Application Architecture
Scalable JavaScript Application ArchitectureScalable JavaScript Application Architecture
Scalable JavaScript Application ArchitectureNicholas Zakas
 
AWS Architecture Case Study: Real-Time Bidding
AWS Architecture Case Study: Real-Time BiddingAWS Architecture Case Study: Real-Time Bidding
AWS Architecture Case Study: Real-Time BiddingAmazon Web Services
 

Viewers also liked (18)

JavaScript (without DOM)
JavaScript (without DOM)JavaScript (without DOM)
JavaScript (without DOM)
 
Javascript Libraries & Frameworks | Connor Goddard
Javascript Libraries & Frameworks | Connor GoddardJavascript Libraries & Frameworks | Connor Goddard
Javascript Libraries & Frameworks | Connor Goddard
 
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big Picture
 
Java vs javascript (XPages)
Java vs javascript (XPages)Java vs javascript (XPages)
Java vs javascript (XPages)
 
JavaOne 2014: Java vs JavaScript
JavaOne 2014:   Java vs JavaScriptJavaOne 2014:   Java vs JavaScript
JavaOne 2014: Java vs JavaScript
 
Javascript libraries
Javascript librariesJavascript libraries
Javascript libraries
 
Java vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJava vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris Bailey
 
Book review firms of endearment how world class companies profit from passion...
Book review firms of endearment how world class companies profit from passion...Book review firms of endearment how world class companies profit from passion...
Book review firms of endearment how world class companies profit from passion...
 
Choosing Javascript Libraries to Adopt for Development
Choosing Javascript Libraries to Adopt for DevelopmentChoosing Javascript Libraries to Adopt for Development
Choosing Javascript Libraries to Adopt for Development
 
Hybrid Mobile Development
Hybrid Mobile DevelopmentHybrid Mobile Development
Hybrid Mobile Development
 
10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript
 
Webinar AWS 201 Delivering apps without servers
Webinar AWS 201 Delivering apps without serversWebinar AWS 201 Delivering apps without servers
Webinar AWS 201 Delivering apps without servers
 
Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersMicroservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker Containers
 
Scalable JavaScript Application Architecture
Scalable JavaScript Application ArchitectureScalable JavaScript Application Architecture
Scalable JavaScript Application Architecture
 
AWS Architecture Case Study: Real-Time Bidding
AWS Architecture Case Study: Real-Time BiddingAWS Architecture Case Study: Real-Time Bidding
AWS Architecture Case Study: Real-Time Bidding
 

Similar to JavaScript for Enterprise Applications

Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Fwdays
 
Migrate to Microservices Judiciously!
Migrate to Microservices Judiciously!Migrate to Microservices Judiciously!
Migrate to Microservices Judiciously!pflueras
 
Deconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven DesignDeconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven DesignVMware Tanzu
 
Microservices as an evolutionary architecture: lessons learned
Microservices as an evolutionary architecture: lessons learnedMicroservices as an evolutionary architecture: lessons learned
Microservices as an evolutionary architecture: lessons learnedLuram Archanjo
 
Cpp In Soa
Cpp In SoaCpp In Soa
Cpp In SoaWSO2
 
From class to architecture
From class to architectureFrom class to architecture
From class to architectureMarcin Hawraniak
 
Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture Andrew Blades
 
Building multi tenancy enterprise applications - quick
Building multi tenancy enterprise applications - quickBuilding multi tenancy enterprise applications - quick
Building multi tenancy enterprise applications - quickuEngine Solutions
 
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Binary Studio
 
introduction to micro services
introduction to micro servicesintroduction to micro services
introduction to micro servicesSpyros Lambrinidis
 
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020OdessaJS Conf
 
Public Cloud Workshop
Public Cloud WorkshopPublic Cloud Workshop
Public Cloud WorkshopAmer Ather
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice frameworkFabrice Sznajderman
 
Rapid app building with loopback framework
Rapid app building with loopback frameworkRapid app building with loopback framework
Rapid app building with loopback frameworkThomas Papaspiros
 
Clean architecture
Clean architectureClean architecture
Clean architecture.NET Crowd
 
BISSA: Empowering Web gadget Communication with Tuple Spaces
BISSA: Empowering Web gadget Communication with Tuple SpacesBISSA: Empowering Web gadget Communication with Tuple Spaces
BISSA: Empowering Web gadget Communication with Tuple SpacesSrinath Perera
 
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...Haggai Philip Zagury
 
Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture corehard_by
 

Similar to JavaScript for Enterprise Applications (20)

Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
Migrate to Microservices Judiciously!
Migrate to Microservices Judiciously!Migrate to Microservices Judiciously!
Migrate to Microservices Judiciously!
 
Deconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven DesignDeconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven Design
 
Microservices as an evolutionary architecture: lessons learned
Microservices as an evolutionary architecture: lessons learnedMicroservices as an evolutionary architecture: lessons learned
Microservices as an evolutionary architecture: lessons learned
 
Cpp In Soa
Cpp In SoaCpp In Soa
Cpp In Soa
 
From class to architecture
From class to architectureFrom class to architecture
From class to architecture
 
Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture Pragmatic Approach to Microservices and Cell-based Architecture
Pragmatic Approach to Microservices and Cell-based Architecture
 
Microservice
MicroserviceMicroservice
Microservice
 
Building multi tenancy enterprise applications - quick
Building multi tenancy enterprise applications - quickBuilding multi tenancy enterprise applications - quick
Building multi tenancy enterprise applications - quick
 
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
 
introduction to micro services
introduction to micro servicesintroduction to micro services
introduction to micro services
 
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
 
Public Cloud Workshop
Public Cloud WorkshopPublic Cloud Workshop
Public Cloud Workshop
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice framework
 
Rapid app building with loopback framework
Rapid app building with loopback frameworkRapid app building with loopback framework
Rapid app building with loopback framework
 
Bff and GraphQL
Bff and GraphQLBff and GraphQL
Bff and GraphQL
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
BISSA: Empowering Web gadget Communication with Tuple Spaces
BISSA: Empowering Web gadget Communication with Tuple SpacesBISSA: Empowering Web gadget Communication with Tuple Spaces
BISSA: Empowering Web gadget Communication with Tuple Spaces
 
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
 
Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture
 

More from Piyush Katariya

Concurrency, Parallelism And IO
Concurrency,  Parallelism And IOConcurrency,  Parallelism And IO
Concurrency, Parallelism And IOPiyush Katariya
 
Handling the growth of data
Handling the growth of dataHandling the growth of data
Handling the growth of dataPiyush Katariya
 
My inspirations and learned lessons
My inspirations and learned lessonsMy inspirations and learned lessons
My inspirations and learned lessonsPiyush Katariya
 
Rise of the Single Page Application
Rise of the Single Page ApplicationRise of the Single Page Application
Rise of the Single Page ApplicationPiyush Katariya
 
Introduction to Web Application Clustering
Introduction to Web Application ClusteringIntroduction to Web Application Clustering
Introduction to Web Application ClusteringPiyush Katariya
 

More from Piyush Katariya (6)

Concurrency, Parallelism And IO
Concurrency,  Parallelism And IOConcurrency,  Parallelism And IO
Concurrency, Parallelism And IO
 
Handling the growth of data
Handling the growth of dataHandling the growth of data
Handling the growth of data
 
Expression problem
Expression problemExpression problem
Expression problem
 
My inspirations and learned lessons
My inspirations and learned lessonsMy inspirations and learned lessons
My inspirations and learned lessons
 
Rise of the Single Page Application
Rise of the Single Page ApplicationRise of the Single Page Application
Rise of the Single Page Application
 
Introduction to Web Application Clustering
Introduction to Web Application ClusteringIntroduction to Web Application Clustering
Introduction to Web Application Clustering
 

Recently uploaded

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

JavaScript for Enterprise Applications

  • 3. We believe in meaningful iterations such as ...
  • 5. Why ( people rant / believe / think ) JavaScript sucks ?
  • 6. Most like it Static and Strong ● Dynamic : ○ Duck typing (No help from Compiler) ○ Late binding (Runtime is the King) ○ Polymorphism by capability ● Weak : ○ Not agnostic about types while code execution (Recipe for all disasters) ○ Allow weird operations ( [ ] + { } ) ○ Implicit conversions ( “2” * “3” = 6 ) ● Static typing does not mean that TDD/BDD can be ignored ● Productivity due to ○ Duck typing ○ Map/JSON over concrete object
  • 7. Other Accusations My reply against Accusation for To reactions by Newbies Yep it sucks. Use “yield” instead Callbacks WTF ??? Better syntax and error handling but use “yield” instead Promises Really ?? WTF ??? Corporate vs Open specification trade off Are your requirements clear ? Evaluate case by case basis. Fragmented community at least hundred options of libs and frameworks for given task What to choose ? Why to choose ? Why isn’t there a standard ? Understand Concurrency vs Parallelism. Little slower at computation but much better at memory usage and IO multiplexing than JVM/CLR. No synchronization problems. period. Single threaded and Slow Execution is slow because its dynamic language ! What ? It does not have multithreading support??? Atom, Visual Code, ESLint, TypeScript ? IDE, Compiler Basic and Refactoring support ? Procedural, functional and event driven Multiple Paradigm confusion OO, Prototypal, functional, event ?
  • 8. Paradigms and Disciplines ● Structured [ Edgar Dijkstra : Go To Statement Considered Harmful ] ○ Avoid “goto” statements ○ Embrace block structures, for/while loops and small functions/subroutines ● Object Oriented [ Simula and Simula-67 language] ○ Avoid pointer to functions ○ Embrace code reuse - Inheritance and (Parametric and Subtype) Polymorphism ● Functional [ John McCarthy : LISP ] ○ Avoid variables, use only constants (Referential Transparency) ○ Avoid mutation or IO side effects (or reduce it by wrapping it inside a Monad) ○ Embrace Higher Order functions, Recursion, Persistent data structures, CT ● Event Driven [CSP, Actor Model] ○ Avoid function/subroutine call by direct reference ○ Embrace communication between isolated components by generating an event and registering callback function/subroutine
  • 10. What they ignore (or less aware of) ➔ Application reload within milliseconds during development and deployment ➔ PM2 process manager for painless deployment and monitoring ➔ V8 engine performance ➔ Serving Tens of thousands of network connections with little memory overhead ➔ ES6 “yield” is here. ES7 “async” and “await” is not necessary ➔ Using Babel (transpiler) to emit ECMAScript 5 code ➔ RamdaJS and date-fp - functional replacement for collection and date API ➔ Programmable Module level polymorphism using CommonJS ➔ Isomorphism - Mobile devices, Browser, Server and NoSql DB query ➔ NodeJS Long Time Support - https://github.com/nodejs/LTS
  • 11. ES6 Basics and Generators
  • 12. ECMAScript 6 ● No semicolons ● Fat arrows (with bind feature) ● Template strings ● let - control scoping ● const - control assignments ● Destructuring ● Generator ○ Lazy collections ○ Avoid callbacks ○ Avoid promise (use but not creation) ● for-of loop All features :- http://es6-features.org/
  • 13. Must Have ESLint and FP plugin ● eslint - Takes care of JS language quirks ● eslint_plugin_fp - JS as pure FP language fp/no-arguments fp/no-mutating-methods fp/no-class fp/no-mutation fp/no-delete fp/no-nil fp/no-events fp/no-proxy fp/no-get-set fp/no-rest-parameters fp/no-let fp/no-this fp/no-loops fp/no-throw fp/no-mutating-assign fp/no-unused-expression no-var fp/no-valueof-field
  • 15. C S P for Dummies ➔ Don't communicate by sharing state, share state by communicating ➔ Communicating ◆ Conversation over channel/queues/distributed queues ◆ Remote procedure calls ➔ Sequential ◆ Execution flow ➔ Processess ◆ Coroutines ◆ Green threads (scheduled by VM) ◆ Real threads (scheduled by OS) ◆ OS Process ◆ Machines ◆ Cluster of Machines ➔ Original Paper - http://usingcsp.com/cspbook.pdf
  • 16. CSP vs Actor Model CSP Actor Model Process Identity Anonymous Concrete Message Passing Synchronous Asynchronous Communication Channels/Queues Direct Composition NA Applicable Fault Tolerance Easy to built with Distributed Queue Hierarchy of Local and Distributed Supervisors ➔ Hybrid approach is also viable and more practical
  • 18. Data - Structure and Types ● Data is all we have ● Data is what we need to transform in order to create a user experience ○ Photoshop without the images is nothing ○ Word is nothing without the characters ● Instructions are data too ● Immutability matters ○ Value - Always Immutable ○ State - Snapshot. Value of something at certain point of time ○ Identity - Stable logical entity associated with a series of different values over time ○ Time - Relative term, not physically measurable
  • 19. Computation - Function and HOF ● Higher Order Function (does either or both) ○ Accepts a function ○ Returns a function ● Higher order abstraction for ○ Computation ○ Combinators ○ DSL - Composition of computation and combinators
  • 20. Thinking functionally ● Use function as first class citizen to build abstraction ● Avoid mutation of variable(memory pointer handle) and data (state) ● Chant this mantra every morning, “null is a billion dollar mistake” ● Favour recursion over iteration ● Procure laziness with Streams ● Use expressions over statements ● Composition over inheritance ● Many identical functions for few data structures than few different functions for many data structures
  • 21. RamdaJS HOF Abstraction ● Auto Currying ● Abstraction Categories ○ Object ○ Function ○ List ○ Math ○ Logic ○ Relation ○ Type ● Transducers http://ramdajs.com/docs/
  • 23. Software Architecture in a nutshell “ In most successful software projects, the expert developers working on that project have a shared understanding of the design. This shared understanding is called ‘Architecture.’ This understanding includes how the system is divided into components and how the components interact through interfaces. These components are usually composed of smaller components, but the architecture only includes the components and interfaces that are understood by all the developers ” - Martin Fowler
  • 24. Abstraction and Indirection “ The essence of abstractions is preserving information that is relevant in a given context, and forgetting information that is irrelevant in that context ” – John V. Guttag “ In computer programming, indirection is the ability to reference something using a name, reference, or container instead of the value itself ” “ All problems in computer science can be solved by another level of indirection ….” - David Wheeler
  • 25. “ ….. except the problem of too many layers of indirection ” “ Making something easy to change makes the overall system a little more complex, and making everything easy to change makes the entire system very complex. Complexity is what makes software hard to change “
  • 27. Architecture decisions starts with “ Optimism is an occupational hazard of programming; feedback is the treatment. ” - Kent Beck ● Initial market research for given Business Domain ● Security ● Transaction capability and boundaries ● Online active users growth - total vs active vs online users ● Data growth ● Testability (and hence modularity) ● External integration points ● Response generation eagerness - sync, or async
  • 28. Micro Services done right ● It’s more social than technical ● Always start with monolith and scale gradually ● Scaling few business use cases ○ Computational complexity ○ Number of requests and responsiveness ● Scaling a business module ○ Computational complexity ○ Software as a Service ● Scaling a team ○ Programming platform expertise ○ Business Domain expertise ○ Maintenance ● Embrace async flow and Distributed Message Queues
  • 29. Use DDD iff Domain is Rich and Complex
  • 30. KoaJS ● By authors which gave us ExpressJS ● ES6 Framework ● Promise continuation based on “co” library ● Modular Architecture ● Composable ● Compatible with NodeJS 4.x and later ● Various community plugins http://koajs.com/
  • 31. PM2 Process Manager ● Superior version of “cluster” module ● Load Balancing & Zero second Downtime Reload ● Compatible with almost all major web frameworks ● CPU Process monitors ● Log monitors http://pm2.keymetrics.io/
  • 32. Hybrid Apps with Cordova
  • 34. Cordova Apps ● Written in HTML, CSS and JS ● Single codebase for multiple target platforms ○ Internet Browsers - IE, firefox, Chrome, Safari etc. ○ Mobile devices - Android, iOS, Windows etc. ● Webview - Chrome browser engine ● Fast development cycles compared to Native apps ● HTML5 Canvas for Game Programming ● Modern WebViews are as responsive as Native platform ● Access various device features through cordova plugins https://cordova.apache.org
  • 35. Features/Characteristics Hybrid Native Runs on Chrome browser runtime OS runtime Additional Runtime Crosswalk for 4.x, Not required for 5.x and later Not required Approximate Software artefact download size for say 10 screens 4.5 MB for 4.x, 3 MB for Android 5.x and later 4 MB Increase in download Size due to additional runtime 23 MB (one time) for Android 4.x and iOS 7 ZERO Development HTML, CSS and JS, More widely adopted tools Java for Android, Swift for iOS Required Tech Skills Anyone who knows web programming specific skill according to platform and native SDK Supported Platform Android, iOS, Windows, Symbian etc. only one platform Relative Development and Debugging time and responding to frequently changing business requirements 1x 2x to 3x Performance Responsive. can be tuned to minute level of browser runtime Best in class. Can be tuned to minute level to OS runtime Security Issues: Insecure local data storage Weak SSL implementation Unintended data leaks Reverse Engineering Code Injection Can be dealt Can be dealt Additional features supported Only major features are supported. here is the detailed list https://cordova.apache.org/docs/en/latest/guide/support/ All of which device is capable of
  • 37. ClojureScript ● by Rich Hickey ● Compiles to JS ● LISP - Code is Data is Code ● Macros - Homoiconicity ● Immutable Data Structures - Referential transparency ● Higher Order Functions - Sheer joy of computation ● Google Closure compiler - Lots of goodies including dead code elimination ● Figwheel - Interactive development ● Nice interop with JS and NPM ● Higher learning curve but worth it https://clojurescript.org/
  • 38. Reagent ● Based on React ○ Functional ○ Component based architecture ○ Higher order components ● Hiccup (embed HTML) ● reagent-utils ● re-frame https://reagent-project.github.io
  • 39. core.async ● CSP implementation for Clojure(Script) ● First class Goroutines support inspired by Go lang ● Being Reactive ○ Responsive - Rapid and consistent response time with reliable upper bounds ○ Resilient - replication, containment, isolation and delegation. ○ Elastic - responsive under varying workload, ability to add ○ Message Driven - loose coupling, isolation and location transparency. http://www.reactivemanifesto.org/