SlideShare a Scribd company logo
MVC 2.0
A Breakthrough
MVC 2.0 - A Breakthrough
Part 1. The Facts (The MVC History)
MVC diagram (first draft in 1978)
1979 - Models - Views - Controllers by Trygve Reenskaug
Whatโ€™s a Thing in Thing-Model-View-Editor?
โ€œSomething that is of interest to the user
โ€ฆ. like a house or an integrated circuit โ€ฆ.
like a new idea or opinions about a
paper or like a computer โ€ฆ. like a circuit
element.โ€
Poor Analogies
MVC Diagram (second draft 1988)
Which is which?
Part 2. Dispelling the Advertised Benefits
Interwoven Boundaries = No Real Separation of Concerns
Redundant Processing / Handling / Storing = Duplication
Data Handling Everywhere = Inconsistency & Madness
No Autonomy
MVC + OOP = Reusability is Futile
Linear Design Pattern = No Parallel Development
A simple example
Part 3. A New Postulate for MVC
Demands from Real-Time Data
1. High Velocity Views (>100 times / s)
2. Building Ad-Hoc Views
3. Minimal data processing & conversion
4. High Stability
5. No Corrosion
6. Push & Pull compatible
7. Intelligent Caching
8. Multiprocess / Multithreaded by default
9. Complete System Predictability
10. Engineered to be Streamlined
Demands from Microservices
1. Truly Decoupled Components
2. A Universal & Coherent Way to Accessing / Modeling /
Sharing Data
3. Small footprint
4. Frictionless Parallelization
5. Testability
6. Decentralized Governance
7. Simple Database Segregation
8. Simple Infrastructure Automation
9. Fault Tolerant & Antifragility
Demands from Reactive Systems
1. Simply express dynamic data
2. Asynchronous & Concurrent by default
3. Never store data in code
4. Pure & Streamlined processing
5. Modeling Time and Data together
6. Responding to events in a predictable fashion
7. Clear entry and exit points
Part 4. Quick Prep-up Before MVC 2.0
Essential State
Derived State
MVC 2.0 - A Breakthrough
JSON Data & JSON Schema
{
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"pattern": "^S+@S+$"
}
},
"required": [
"name",
"email"
]
}
},
"required": [
"user"
]
}
{
"user": {
"name": "John Doe",
"email": "john@doe.com"
}
}
... YAML works too!
type: object,
properties:
user:
type: object
properties:
name:
type: string
email:
type: string,
pattern: โ€œ^S+@S+$"
required:
- name
- email
required
- user
user:
name: John Doe
email: john@doe.com
JSON Patch & JSON Pointer
[
{"op": "replace", "path": "/user/name", "value": "Jane Roe"},
{"op": "add", "path": "/user/address", "value": "51 Street"},
{"op": "test", "path": "/user/id", "value": 23}
]
{ "user": { "name": "John Doe", "id": 23 } }
{ "user": { "name": "Jane Roe", "address": "51 Street", "id": 23 } }
A simple JSON Pointer
"/bam": node(["/foo/bar/baz"], cb)
Letโ€™s work on some examples #1
foo: 123
// get('/foo') -> '123'
#2
foo: 123
bar: node(['/foo'], function (data) {
return data
})
// get('/foo') -> '123'
// get('/bar') -> '123'
#3
name: Foo
surname: Bar
fullName: node(['/surname', '/name'], function(surname, name) {
return surname + name
})
// get('/fullName') -> โ€˜Bar Foo'
#3 - continued
user:
name: Foo
surname: Bar
fullName: node(['/user/surname', '/user/name'], function(surname, name) {
return surname + name
})
// get('/user/fullName') -> โ€˜Bar Foo'
#4
session:
token: xyz
createdAt: 1467199000000
expiresIn: 60000
currentTime: 146720000000
// get('/session/isValid') -> false
#4 - continued
session: {
token: xyz
createdAt: 1467199000000
expiresIn: 60000
isValid: node(['/session/createdAt', '/session/expiresIn', '/currentTime'],
function (createdAt, expiresIn, now) {
return createdAt + expiresIn > now
})
currentTime: 146720000000
// get('/session/isValid') -> false
#5
ajax:
createdAt: 1467199000000
sentAt: 1467199000100
timeoutAfter: 60000
method: POST
url: http://foo.bar
data:
sample: baz
receivedAt: null
currentTime: 1467200000
// get('/ajax/isPending) -> true
#5 - continued
ajax:
...
isPending: node(['/ajax/sentAt', '/ajax/timeoutAfter', '/ajax/receivedAt', '/currentTime'],
function (sentAt, timeout, receivedAt, now) {
return receivedAt === null && sentAt + timeout < now
})
currentTime: 1467200000
// get('/ajax/isPending) -> true
Part 5. MVC 2.0
MVC 2.0 - A Breakthrough
View
Role. Outputs data in a certain format
Purpose. Gives meaning to data by exporting it to the world
Notes. The only true essential component. An application can
work just fine with only a View component and a Data Tree.
Name. Through it the World views the data, sees what it
needs to see in a manner suitable to the World - hence the
name View.
Controller
Role. Inputs data in the JSON patch format (essential data)
Purpose. Creating movement / momentum / triggers
transformations / etc
Notes. All actions are correlated to existing data or lack
of data. Every action is traceable from an initial state.
Name. It exerts control over what data is added / replaced
and controls the outside world - hence the name Controller.
Model
Role. Combines and derives data
Purpose. From simple / uninteresting data it creates
sophisticated / complex representations
Notes. All โ€œif statementsโ€ are data. Derived data is never
stored / only cached. Models define the diversity of data.
Name. Treats data as a maleable material and shapes it in
new and interesting forms. It Models it.
Demo Time
References
https://www.kilim.com/images/content/kilim_weaving_technique_9.jpg
http://karinsebelin.com/wp-content/uploads/2015/10/Marionette-Abh%C3%A4ngigleit.jpg
http://pre03.deviantart.net/3a90/th/pre/f/2013/205/6/e/crowded_beach_by_samiatay-d6ew2um.jpg
http://media.istockphoto.com/photos/square-peg-in-a-round-hole-picture-id173230047?k=6&m=173230047&s=170667a&
w=0&h=vrjQtexdKNNX_bTF27tyJwiAOKM-kWIhySBWSa2gzcM=
http://worldartsme.com/images/cartoon-person-taking-clipart-1.jpg
http://images.clipartpanda.com/box-clipart-aie7gkzi4.png
http://previews.123rf.com/images/gnurf/gnurf1106/gnurf110600003/9926108-Confused-cartoon-guy-scratching-his-h
ead-Stock-Vector.jpg
http://www.clipartkid.com/images/243/small-house-icon-png-clipart-image-iconbug-com-8VpCSX-clipart.png
http://sr.photos1.fotosearch.com/bthumb/CSP/CSP990/k11301571.jpg
http://cdn.xl.thumbs.canstockphoto.com/canstock7934222.jpg
http://www.collaborationobjects.com/wp-content/uploads/2015/01/Great_Alaskan_Lumberjack_Show_crosscut_saw.jpg
http://webframeworks.kr/tutorials/react/imgs/complex_mvc.png
Thank you!
Constantin Dumitrescu, find me as @dumconstantin on
Ask me about: JS, FP, Docker, Automating things, Development
Tools, Radical Management
Presentations:
The Philosophy and Practice of the Pure Function / The JSON
Architecture 1 & 2 / RamdaJS - An Epic Tale

More Related Content

PDF
ajax_pdf
PPT
Diving in the Flex Data Binding Waters
PPTX
Web technology javascript
PPT
Air Drag And Drop
PPT
Flex data binding pitfalls: 10 common misuses and mistakes
PPTX
mediator
PPTX
JSON and XML
PPTX
Jquery beltranhomewrok
ajax_pdf
Diving in the Flex Data Binding Waters
Web technology javascript
Air Drag And Drop
Flex data binding pitfalls: 10 common misuses and mistakes
mediator
JSON and XML
Jquery beltranhomewrok

What's hot (16)

TXT
Vb database connections
PDF
jQuery -Chapter 2 - Selectors and Events
PDF
Javascript and DOM
PPTX
mediator
PDF
Flex3 data binding
PPT
JavaScript Libraries
PDF
Java Svet - Communication Between Android App Components
PDF
Data binding w Androidzie
PPTX
Web Development Introduction to jQuery
DOCX
Ktifkan dulu microsoft visual basic
PDF
Data Binding in Silverlight
PDF
Video WebChat Conference Tool
KEY
Knockout.js presentation
PPS
CS101- Introduction to Computing- Lecture 32
DOCX
MVC Application using EntityFramework Code-First approach Part4
PPT
Xml http request
Vb database connections
jQuery -Chapter 2 - Selectors and Events
Javascript and DOM
mediator
Flex3 data binding
JavaScript Libraries
Java Svet - Communication Between Android App Components
Data binding w Androidzie
Web Development Introduction to jQuery
Ktifkan dulu microsoft visual basic
Data Binding in Silverlight
Video WebChat Conference Tool
Knockout.js presentation
CS101- Introduction to Computing- Lecture 32
MVC Application using EntityFramework Code-First approach Part4
Xml http request
Ad

Similar to MVC 2.0 - A Breakthrough (20)

PDF
Mvc4 crud operations.-kemuning senja
PPTX
Adding a modern twist to legacy web applications
PPTX
BackboneJS + ReactJS
PDF
ajax_pdf
DOCX
Learning MVC Part 3 Creating MVC Application with EntityFramework
PDF
Modern frontend development with VueJs
PPTX
Fundaments of Knockout js
PPT
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
PDF
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
PDF
MVC on the Server and on the Client: How to Integrate Spring MVC and Backbone...
ย 
PPTX
Adding a modern twist to legacy web applications
KEY
MVC on the server and on the client
PDF
Reduxing UI: Borrowing the Best of Web to Make Android Better
PDF
Lean React - Patterns for High Performance [ploneconf2017]
PDF
Data access
PPT
Ajax tutorial by bally chohan
PPTX
Asp.NET MVC
PPTX
Knockout.js
PDF
Green dao
PDF
Apache Wicket Web Framework
Mvc4 crud operations.-kemuning senja
Adding a modern twist to legacy web applications
BackboneJS + ReactJS
ajax_pdf
Learning MVC Part 3 Creating MVC Application with EntityFramework
Modern frontend development with VueJs
Fundaments of Knockout js
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
MVC on the Server and on the Client: How to Integrate Spring MVC and Backbone...
ย 
Adding a modern twist to legacy web applications
MVC on the server and on the client
Reduxing UI: Borrowing the Best of Web to Make Android Better
Lean React - Patterns for High Performance [ploneconf2017]
Data access
Ajax tutorial by bally chohan
Asp.NET MVC
Knockout.js
Green dao
Apache Wicket Web Framework
Ad

Recently uploaded (20)

PPTX
QR Codes Qr codecodecodecodecocodedecodecode
PDF
Sims 4 Historia para lo sims 4 para jugar
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PDF
๐Ÿ’ฐ ๐”๐Š๐“๐ˆ ๐Š๐„๐Œ๐„๐๐€๐๐†๐€๐ ๐Š๐ˆ๐๐„๐‘๐Ÿ’๐ƒ ๐‡๐€๐‘๐ˆ ๐ˆ๐๐ˆ ๐Ÿ๐ŸŽ๐Ÿ๐Ÿ“ ๐Ÿ’ฐ
ย 
PPTX
presentation_pfe-universite-molay-seltan.pptx
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
innovation process that make everything different.pptx
PDF
โ€œGoogle Algorithm Updates in 2025 Guideโ€
PPTX
CSharp_Syntax_Basics.pptxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PDF
The Internet -By the Numbers, Sri Lanka Edition
ย 
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PDF
LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPTX
international classification of diseases ICD-10 review PPT.pptx
PPTX
durere- in cancer tu ttresjjnklj gfrrjnrs mhugyfrd
PDF
Testing WebRTC applications at scale.pdf
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
ย 
QR Codes Qr codecodecodecodecocodedecodecode
Sims 4 Historia para lo sims 4 para jugar
Introuction about WHO-FIC in ICD-10.pptx
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
๐Ÿ’ฐ ๐”๐Š๐“๐ˆ ๐Š๐„๐Œ๐„๐๐€๐๐†๐€๐ ๐Š๐ˆ๐๐„๐‘๐Ÿ’๐ƒ ๐‡๐€๐‘๐ˆ ๐ˆ๐๐ˆ ๐Ÿ๐ŸŽ๐Ÿ๐Ÿ“ ๐Ÿ’ฐ
ย 
presentation_pfe-universite-molay-seltan.pptx
Tenda Login Guide: Access Your Router in 5 Easy Steps
Introuction about ICD -10 and ICD-11 PPT.pptx
innovation process that make everything different.pptx
โ€œGoogle Algorithm Updates in 2025 Guideโ€
CSharp_Syntax_Basics.pptxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The Internet -By the Numbers, Sri Lanka Edition
ย 
WebRTC in SignalWire - troubleshooting media negotiation
LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1
Decoding a Decade: 10 Years of Applied CTI Discipline
international classification of diseases ICD-10 review PPT.pptx
durere- in cancer tu ttresjjnklj gfrrjnrs mhugyfrd
Testing WebRTC applications at scale.pdf
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
ย 

MVC 2.0 - A Breakthrough