SlideShare une entreprise Scribd logo
1  sur  49
Télécharger pour lire hors ligne
I serve to empower WordPress developers.
@hellofromtonya
@KnowTheCodePro
Tonya MorkProgress of JavaScript
Architecture
This talk will cover…
➡ The What - what software architecture is.

➡ The Why - What problems is it seeking to solve.

➡ The How - Look at the different architectures. 

➡ The Effective - Score each.

➡ The Future - Look at what’s next.
My Goals for You…
Develop your architectural mindset
and decision-making process.

Challenge you to think about the
key concepts in your work.
What is
software architecture?
?
Answers that I’ve heard include…
• Filesystem structure of our code

• Structure of the code itself

• Abstract visualization of what we might build
Software architecture is about
making fundamental structural
choices which are costly to
change once implemented.
“
https://en.wikipedia.org/wiki/Software_architecture
Huh?
Code’s Blueprint
Requirements Plan Code
Software architecture is
about making decisions
and defining the blueprint.
Emphasis on
• how all the pieces will interact,
• the role each plays,
• and how it all fits together
• over the entire lifecycle.
It’s the big picture.
Step out of the code.
Think about the building blocks.
The Why
What problems does
it seek to solve?
?
Synchronized Data
#1
Performance
#2
Developer Experience
#3
User Experience
#4
Business of Software
#5
What drives our
thinking and decision-
making?
?
Drives Our Thinking & Decisions:
How all the pieces will interact,
the role each plays,
and how it all fits together
over the entire lifecycle.
Leverage Principles & Design Patterns.
0 Retired
↓ Costs
↓ Risks
↓ Time
↑ Effectiveness
↑ Experience
↑ Performance
Software Lifecycle
What drives our decisions?
How have we solved
these problems?
How effective?
?
Layered Architecture
Presentation Layer
Business Layer
Data Layer
MV* Architectures
MVC
MVP
MVVM
Credit: Learning JavaScript Design Patterns by Adnan Osmani
Synchronized

Performance

Developer Experience

User Experience

Business
MV* + REST have not solved
all of the problems.
Why?
?
Mutability
#1
mutability adjective
Subject to change.
Problems are:

• Synchronized Data

• How reliable is the data?

• How long do we have to wait for reliable data?

• Adds complexity
We want
immutability
Functional Programming
• Pure functions

• input -> output

• side effects

• globals

• data in, data out

• Immutable data
REST Overfetching
#2
User information GET /wp/v2/users/<id>

Event information GET /wp-json/foo/v2/users/<id>/events

Payment information GET /wp-json/foo/v2/users/<id>/payments

…
Overfetching:
Multiple REST endpoints + Extra Unneeded Data
Synchronized

Performance

Developer Experience

User Experience

Business
MV* + REST have not solved
all of the problems.
Component-Based Architectures or Hybrid
Internals
Interface
Internals
Interface
Internals
Interface
Facade
Mediator
• Self-sufficient

• Easy to integrate

• Swappable

• Blackbox
Synchronized

Performance

Developer Experience

User Experience

Business
Engineering old principles in
new ways while innovating
new solutions.
DOM diffing
Virtual DOM
Incremental DOM
Leverages:

• Tree Data Structures

• Diffing - diff algorithms
Synchronized

Performance

Developer Experience

User Experience

Business
Incremental DOM
http://google.github.io/incremental-dom/
Real DOM
Virtual DOM
Diffing
Real DOM
Incremental DOM
Diffing
React’s Virtual DOM
https://reactjs.org/docs/faq-internals.html
Immutability
Data does not change.
Leverages:

• Tree Data Structures

• Structural Sharing
Functional programming
Synchronized

Performance

Developer Experience

User Experience

Business
The last thing you wanted
any programmer to do is
mess with internal state.…
“ Alan Kay, Creator of Smalltalk
The Early History of Smalltalk
1993
We believe that the major contributor
to this complexity in many systems is
the handling of state and the burden
that this adds when trying to analyse
and reason about the system.
“
Ben Moseley and Peter Marks
Out of the Tar Pit
2006
http://curtclifton.net/papers/MoseleyMarks06a.pdf
Immutability
Develop how we think about the state of data,
i.e. as a single occurrence and can’t change.
Immutability
user = {
id: 1,
firstName: 'Tonya',
lastName: 'Mork',
role: 'admin',
twitter: ‘@hellofromtonya’,
github: ‘hellofromtonya’
}
1 ‘Tonya’ ‘Mork’ ‘admin’
‘@hellofr
omtonya’
‘hellofro
mtonya’
‘id’ ‘firstName’ ‘lastName’ ‘role’ ‘twitter’ ‘github’
user
10 ‘Tonya’ ‘Mork’ ‘admin’
‘@hellofr
omtonya’
‘hellofro
mtonya’
‘id’ ‘firstName’ ‘lastName’ ‘role’ ‘twitter’ ‘github’
newUser
Copy don’t change.
Trie + Structural Sharing
1 ‘Tonya’ ‘Mork’ ‘admin’
‘@hellofr
omtonya’
‘hellofro
mtonya’
‘id’ ‘firstName’ ‘lastName’ ‘role’ ‘twitter’ ‘github’
usernewUser
10 ‘Tonya’
‘id’ ‘firstName’
Advantages:

• Less Memory

• More Performant

• Data Persist
Synchronized

Performance

Developer Experience

User Experience

Business
https://www.youtube.com/watch?v=Wo0qiGPSV-s
Immutable Data Structures
Immutable Architecture
Synchronized

Performance

Developer Experience

User Experience

Business
How do we solve the problem
of REST overfetching?
Synchronized

Performance

Developer Experience

User Experience

Business
GraphQL
What are the next
steps forward?
Immutable
Declarative
Executable
Architecture
IDEA Architecture by Lee Byron
https://www.youtube.com/watch?v=oTcDmnAXZ4E
IDEA Architecture
Credit: “Immutable Application Architecture”
by Lee Byron

at React Europe 2018

https://www.youtube.com/watch?v=oTcDmnAXZ4E
Queue
Actions
Views
Components
Models
State
Server
{
Server: (State) => Promise<State>
Optimistic: (State) => State
}
Let’s Review the Key
Take Aways
Key Takeaways:
• Software Architecture is all about making structural
decisions.

• We think about the big picture and break it down into
building blocks.

• Emphasize role, interaction, relationships, etc.

• Decisions are based on synchronizing data, performance,
DX, UX, and business.
We are very close to solving all of
the problems.
Future will be about maximization
and solving tomorrow’s problems.
I serve to empower WordPress developers.
Tonya Mork
@hellofromtonya
https://KnowTheCode.io
Questions?

Contenu connexe

Similaire à Progress of JavaScript Architecture

QCon NYC: Distributed systems in practice, in theory
QCon NYC: Distributed systems in practice, in theoryQCon NYC: Distributed systems in practice, in theory
QCon NYC: Distributed systems in practice, in theoryAysylu Greenberg
 
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...DevSecCon
 
From hello world to goodbye code
From hello world to goodbye codeFrom hello world to goodbye code
From hello world to goodbye codeKim Moir
 
It's Not Just About Code
It's Not Just About CodeIt's Not Just About Code
It's Not Just About CodeDan Pickett
 
PyData Texas 2015 Keynote
PyData Texas 2015 KeynotePyData Texas 2015 Keynote
PyData Texas 2015 KeynotePeter Wang
 
Tips & Tricks for Being a Successful Tech Lead
Tips & Tricks for Being a Successful Tech LeadTips & Tricks for Being a Successful Tech Lead
Tips & Tricks for Being a Successful Tech LeadBen Limmer
 
Illogical engineers
Illogical engineersIllogical engineers
Illogical engineersPawel Szulc
 
Illogical engineers
Illogical engineersIllogical engineers
Illogical engineersPawel Szulc
 
Continuum Analytics and Python
Continuum Analytics and PythonContinuum Analytics and Python
Continuum Analytics and PythonTravis Oliphant
 
Hexagonal Symfony - SymfonyCon Amsterdam 2019
Hexagonal Symfony - SymfonyCon Amsterdam 2019Hexagonal Symfony - SymfonyCon Amsterdam 2019
Hexagonal Symfony - SymfonyCon Amsterdam 2019Matthias Noback
 
Anaconda and PyData Solutions
Anaconda and PyData SolutionsAnaconda and PyData Solutions
Anaconda and PyData SolutionsTravis Oliphant
 
How To Become A Blockchain Engineer
How To Become A Blockchain EngineerHow To Become A Blockchain Engineer
How To Become A Blockchain Engineer101 Blockchains
 
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - PanoraysHacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - PanoraysDemi Ben-Ari
 
XPDays Ukraine: Legacy
XPDays Ukraine: LegacyXPDays Ukraine: Legacy
XPDays Ukraine: LegacyVictor_Cr
 
DevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation SlidesDevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation SlidesFab L
 
Software engineering the genesis
Software engineering  the genesisSoftware engineering  the genesis
Software engineering the genesisPawel Szulc
 
Keynote: The Phoenix Project: Lessons Learned - PuppetConf 2014
Keynote: The Phoenix Project: Lessons Learned - PuppetConf 2014Keynote: The Phoenix Project: Lessons Learned - PuppetConf 2014
Keynote: The Phoenix Project: Lessons Learned - PuppetConf 2014Puppet
 
How we tested our code "Google way"
How we tested our code "Google way"How we tested our code "Google way"
How we tested our code "Google way"Oleksiy Rezchykov
 
All about that reactive ui
All about that reactive uiAll about that reactive ui
All about that reactive uiPaul van Zyl
 

Similaire à Progress of JavaScript Architecture (20)

QCon NYC: Distributed systems in practice, in theory
QCon NYC: Distributed systems in practice, in theoryQCon NYC: Distributed systems in practice, in theory
QCon NYC: Distributed systems in practice, in theory
 
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
 
From hello world to goodbye code
From hello world to goodbye codeFrom hello world to goodbye code
From hello world to goodbye code
 
It's Not Just About Code
It's Not Just About CodeIt's Not Just About Code
It's Not Just About Code
 
PyData Texas 2015 Keynote
PyData Texas 2015 KeynotePyData Texas 2015 Keynote
PyData Texas 2015 Keynote
 
Tips & Tricks for Being a Successful Tech Lead
Tips & Tricks for Being a Successful Tech LeadTips & Tricks for Being a Successful Tech Lead
Tips & Tricks for Being a Successful Tech Lead
 
Illogical engineers
Illogical engineersIllogical engineers
Illogical engineers
 
Illogical engineers
Illogical engineersIllogical engineers
Illogical engineers
 
Continuum Analytics and Python
Continuum Analytics and PythonContinuum Analytics and Python
Continuum Analytics and Python
 
Hexagonal Symfony - SymfonyCon Amsterdam 2019
Hexagonal Symfony - SymfonyCon Amsterdam 2019Hexagonal Symfony - SymfonyCon Amsterdam 2019
Hexagonal Symfony - SymfonyCon Amsterdam 2019
 
Anaconda and PyData Solutions
Anaconda and PyData SolutionsAnaconda and PyData Solutions
Anaconda and PyData Solutions
 
How To Become A Blockchain Engineer
How To Become A Blockchain EngineerHow To Become A Blockchain Engineer
How To Become A Blockchain Engineer
 
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - PanoraysHacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
 
XPDays Ukraine: Legacy
XPDays Ukraine: LegacyXPDays Ukraine: Legacy
XPDays Ukraine: Legacy
 
DevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation SlidesDevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation Slides
 
Software engineering the genesis
Software engineering  the genesisSoftware engineering  the genesis
Software engineering the genesis
 
Keynote: The Phoenix Project: Lessons Learned - PuppetConf 2014
Keynote: The Phoenix Project: Lessons Learned - PuppetConf 2014Keynote: The Phoenix Project: Lessons Learned - PuppetConf 2014
Keynote: The Phoenix Project: Lessons Learned - PuppetConf 2014
 
How we tested our code "Google way"
How we tested our code "Google way"How we tested our code "Google way"
How we tested our code "Google way"
 
All about that reactive ui
All about that reactive uiAll about that reactive ui
All about that reactive ui
 
Micro services
Micro servicesMicro services
Micro services
 

Dernier

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Dernier (20)

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 

Progress of JavaScript Architecture

  • 1. I serve to empower WordPress developers. @hellofromtonya @KnowTheCodePro Tonya MorkProgress of JavaScript Architecture
  • 2. This talk will cover… ➡ The What - what software architecture is. ➡ The Why - What problems is it seeking to solve. ➡ The How - Look at the different architectures. ➡ The Effective - Score each. ➡ The Future - Look at what’s next.
  • 3. My Goals for You… Develop your architectural mindset and decision-making process. Challenge you to think about the key concepts in your work.
  • 5. Answers that I’ve heard include… • Filesystem structure of our code • Structure of the code itself • Abstract visualization of what we might build
  • 6. Software architecture is about making fundamental structural choices which are costly to change once implemented. “ https://en.wikipedia.org/wiki/Software_architecture
  • 9. Software architecture is about making decisions and defining the blueprint. Emphasis on • how all the pieces will interact, • the role each plays, • and how it all fits together • over the entire lifecycle.
  • 10. It’s the big picture. Step out of the code. Think about the building blocks.
  • 11. The Why What problems does it seek to solve? ?
  • 17. What drives our thinking and decision- making? ?
  • 18. Drives Our Thinking & Decisions: How all the pieces will interact, the role each plays, and how it all fits together over the entire lifecycle. Leverage Principles & Design Patterns.
  • 19. 0 Retired ↓ Costs ↓ Risks ↓ Time ↑ Effectiveness ↑ Experience ↑ Performance Software Lifecycle What drives our decisions?
  • 20. How have we solved these problems? How effective? ?
  • 22. MV* Architectures MVC MVP MVVM Credit: Learning JavaScript Design Patterns by Adnan Osmani Synchronized Performance Developer Experience User Experience Business
  • 23. MV* + REST have not solved all of the problems. Why? ?
  • 25. mutability adjective Subject to change. Problems are: • Synchronized Data • How reliable is the data? • How long do we have to wait for reliable data? • Adds complexity We want immutability
  • 26. Functional Programming • Pure functions • input -> output • side effects • globals • data in, data out • Immutable data
  • 28. User information GET /wp/v2/users/<id> Event information GET /wp-json/foo/v2/users/<id>/events Payment information GET /wp-json/foo/v2/users/<id>/payments … Overfetching: Multiple REST endpoints + Extra Unneeded Data Synchronized Performance Developer Experience User Experience Business
  • 29. MV* + REST have not solved all of the problems.
  • 30. Component-Based Architectures or Hybrid Internals Interface Internals Interface Internals Interface Facade Mediator • Self-sufficient • Easy to integrate • Swappable • Blackbox Synchronized Performance Developer Experience User Experience Business
  • 31. Engineering old principles in new ways while innovating new solutions.
  • 32. DOM diffing Virtual DOM Incremental DOM Leverages: • Tree Data Structures • Diffing - diff algorithms Synchronized Performance Developer Experience User Experience Business
  • 33. Incremental DOM http://google.github.io/incremental-dom/ Real DOM Virtual DOM Diffing Real DOM Incremental DOM Diffing React’s Virtual DOM https://reactjs.org/docs/faq-internals.html
  • 34. Immutability Data does not change. Leverages: • Tree Data Structures • Structural Sharing Functional programming Synchronized Performance Developer Experience User Experience Business
  • 35. The last thing you wanted any programmer to do is mess with internal state.… “ Alan Kay, Creator of Smalltalk The Early History of Smalltalk 1993
  • 36. We believe that the major contributor to this complexity in many systems is the handling of state and the burden that this adds when trying to analyse and reason about the system. “ Ben Moseley and Peter Marks Out of the Tar Pit 2006 http://curtclifton.net/papers/MoseleyMarks06a.pdf
  • 37. Immutability Develop how we think about the state of data, i.e. as a single occurrence and can’t change.
  • 38. Immutability user = { id: 1, firstName: 'Tonya', lastName: 'Mork', role: 'admin', twitter: ‘@hellofromtonya’, github: ‘hellofromtonya’ } 1 ‘Tonya’ ‘Mork’ ‘admin’ ‘@hellofr omtonya’ ‘hellofro mtonya’ ‘id’ ‘firstName’ ‘lastName’ ‘role’ ‘twitter’ ‘github’ user 10 ‘Tonya’ ‘Mork’ ‘admin’ ‘@hellofr omtonya’ ‘hellofro mtonya’ ‘id’ ‘firstName’ ‘lastName’ ‘role’ ‘twitter’ ‘github’ newUser Copy don’t change.
  • 39. Trie + Structural Sharing 1 ‘Tonya’ ‘Mork’ ‘admin’ ‘@hellofr omtonya’ ‘hellofro mtonya’ ‘id’ ‘firstName’ ‘lastName’ ‘role’ ‘twitter’ ‘github’ usernewUser 10 ‘Tonya’ ‘id’ ‘firstName’ Advantages: • Less Memory • More Performant • Data Persist Synchronized Performance Developer Experience User Experience Business https://www.youtube.com/watch?v=Wo0qiGPSV-s
  • 42. How do we solve the problem of REST overfetching? Synchronized Performance Developer Experience User Experience Business GraphQL
  • 43. What are the next steps forward?
  • 44. Immutable Declarative Executable Architecture IDEA Architecture by Lee Byron https://www.youtube.com/watch?v=oTcDmnAXZ4E
  • 45. IDEA Architecture Credit: “Immutable Application Architecture” by Lee Byron at React Europe 2018 https://www.youtube.com/watch?v=oTcDmnAXZ4E Queue Actions Views Components Models State Server { Server: (State) => Promise<State> Optimistic: (State) => State }
  • 46. Let’s Review the Key Take Aways
  • 47. Key Takeaways: • Software Architecture is all about making structural decisions. • We think about the big picture and break it down into building blocks. • Emphasize role, interaction, relationships, etc. • Decisions are based on synchronizing data, performance, DX, UX, and business.
  • 48. We are very close to solving all of the problems. Future will be about maximization and solving tomorrow’s problems.
  • 49. I serve to empower WordPress developers. Tonya Mork @hellofromtonya https://KnowTheCode.io Questions?