SlideShare a Scribd company logo
1 of 35
Download to read offline
Text Editing & Input Conflicts
Sweet Jesus! Don’t let anyone input anything!
@JesperBylund
In Ye Goode Olden Dayse
2014 - 2019
The Plan
1. Getting stuff from the keyboard

2. Passing it to a server

3. Storing it

4. Profit!
–Famous Last Words
“How hard can it be?”
Pretty Hard
Getting stuff from the keyboard: ContentEditable
The Plan
1. Getting stuff from the keyboard

2. Passing it to a server

3. Storing it

4. Profit!
$.ajax()
The Plan
1. Getting stuff from the keyboard

2. Passing it to a server

3. Storing it

4. Profit!
The Plan
1. Getting stuff from the keyboard

2. Passing it to a server

3. Storing it

4. Profit!
The Plan
1. Getting stuff from the keyboard

2. Passing it to a server

3. Storing it

4. Profit!
Wait?…
The Plan?
1. Getting stuff from the keyboard

2. Passing it to a server

3. Storing it

4. Wait! Mobile users dont keyboard?
https://medium.engineering/why-contenteditable-is-terrible-122d8a40e480

https://ckeditor.com/blog/ContentEditable-The-Good-the-Bad-and-the-Ugly/
<textarea /> & <input />
Draft.js & ProseMirror.js
https://draftjs.org
https://prosemirror.net/
The new Plan?
1. Getting stuff from the keyboard

2. Passing it to a server

3. Storing it

4. Wait! Mobile users don’t keyboard?

5. Wait! Mobile users are offline?
LocalStorage

Redux

Redux Offline

socket.io
http://offlinefirst.org
https://github.com/redux-offline/redux-offline
https://www.npmjs.com/package/vuex-persist
…is there even a plan?
1. Getting stuff from the keyboard

2. Passing it to a server

3. Storing it

4. Wait! Mobile users dont keyboard?

5. Wait! Mobile users are offline?

6. Wait.. Everything is offline?
manifest.json

cache (+busting)

local fonts
https://developers.google.com/web/tools/lighthouse/
Trough of disillusionment
1. Getting stuff from the keyboard

2. Passing it to a server

3. Storing it

4. Wait! Mobile users dont keyboard?

5. Wait! Mobile users are offline?

6. Wait.. Everything is offline?

7. Christ, the server has to handle merging…
Versioning on the server?..
• Just add +1 to each documents version?

• Save every iteration of the document ever?

• Delta updates, save X many?

• Versions based on time?
https://stackoverflow.com/questions/4185105/ways-to-implement-data-versioning-in-mongodb
shit
1. Getting stuff from the keyboard

2. Passing it to a server

3. Storing it

4. Wait! Mobile users dont keyboard?

5. Wait! Mobile users are offline?

6. Wait.. Everything is offline?

7. Christ, the server has to handle merging…

8. Oh god, the client has to handle merging!
Auto merging based on time?
or
Version conflicts handled manually?
Think it works?
What should you do?
lol, idk
UTF-8
duh…
<input />
<textarea />
Draft.js
ProseMirror
HTML
draftin.com
Draft.js
Draft.js
ProseMirror
Avoid offline support by using Sockets
Still support offline
Checklist
• Encode the text right

• Use a font that supports your supported languages

• Handle text as plain text! Alternatively use a library for everything 

(Basic HTML elements have the right APIs, other than that Drafts.js and
ProseMirror are great alternatives.)

• Understand that everything, everything, will have merge conflicts.

Decide how to handle them. Settings might be fine with last in over-rights.
But content needs some structure.

• Use sockets to minimise offline support. Still support offline.
The Final Solution:
Don’t let users input stuff.
Jesper Bylund
@jesperbylund
http://jesperbylund.com/sthlmjs

More Related Content

Similar to Text Editing & Input Conflicts

Deploying Rails Apps with Chef and Capistrano
 Deploying Rails Apps with Chef and Capistrano Deploying Rails Apps with Chef and Capistrano
Deploying Rails Apps with Chef and CapistranoSmartLogic
 
Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...
Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...
Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...Simplilearn
 
HTML5 for mobile - DiGi Challenge for Change
HTML5 for mobile - DiGi Challenge for ChangeHTML5 for mobile - DiGi Challenge for Change
HTML5 for mobile - DiGi Challenge for ChangeJan Jongboom
 
How do we drive tech changes
How do we drive tech changesHow do we drive tech changes
How do we drive tech changesJaewoo Ahn
 
[EclipseCon France 2017] Language Server Protocol in action
[EclipseCon France 2017] Language Server Protocol in action[EclipseCon France 2017] Language Server Protocol in action
[EclipseCon France 2017] Language Server Protocol in actionMickael Istria
 
NUS SOC Print
NUS SOC PrintNUS SOC Print
NUS SOC Printyeokm1
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/awaitC4Media
 
Gears of Perforce: AAA Game Development Challenges
Gears of Perforce: AAA Game Development ChallengesGears of Perforce: AAA Game Development Challenges
Gears of Perforce: AAA Game Development ChallengesPerforce
 
Software that eats the world! - PerformDay Brussels
Software that eats the world! - PerformDay BrusselsSoftware that eats the world! - PerformDay Brussels
Software that eats the world! - PerformDay BrusselsKlaus Enzenhofer
 
FEC2017-Introduction-to-programming
FEC2017-Introduction-to-programmingFEC2017-Introduction-to-programming
FEC2017-Introduction-to-programmingHenrikki Tenkanen
 
Easy way to learn Core java full material
Easy way to learn Core java full materialEasy way to learn Core java full material
Easy way to learn Core java full materialSivannarayana Chimata
 
Debugging and Tuning Mobile Web Sites with Modern Web Browsers
Debugging and Tuning Mobile Web Sites with Modern Web BrowsersDebugging and Tuning Mobile Web Sites with Modern Web Browsers
Debugging and Tuning Mobile Web Sites with Modern Web BrowsersTroy Miles
 
The Ring programming language version 1.5.1 book - Part 4 of 180
The Ring programming language version 1.5.1 book - Part 4 of 180The Ring programming language version 1.5.1 book - Part 4 of 180
The Ring programming language version 1.5.1 book - Part 4 of 180Mahmoud Samir Fayed
 
Deep Dive into FME Server 2017.0
Deep Dive into FME Server 2017.0Deep Dive into FME Server 2017.0
Deep Dive into FME Server 2017.0Safe Software
 
Offline of web applications
Offline of web applicationsOffline of web applications
Offline of web applicationsFDConf
 
Offline for web - Frontend Dev Conf Minsk 2014
Offline for web - Frontend Dev Conf Minsk 2014Offline for web - Frontend Dev Conf Minsk 2014
Offline for web - Frontend Dev Conf Minsk 2014Jan Jongboom
 
Modern javascript localization with c-3po and the good old gettext
Modern javascript localization with c-3po and the good old gettextModern javascript localization with c-3po and the good old gettext
Modern javascript localization with c-3po and the good old gettextAlexander Mostovenko
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python ProgrammingAkhil Kaushik
 
Pharo IoT Installation Improvements and Continuous Integration
Pharo IoT Installation Improvements and Continuous IntegrationPharo IoT Installation Improvements and Continuous Integration
Pharo IoT Installation Improvements and Continuous IntegrationAllex Oliveira
 

Similar to Text Editing & Input Conflicts (20)

Deploying Rails Apps with Chef and Capistrano
 Deploying Rails Apps with Chef and Capistrano Deploying Rails Apps with Chef and Capistrano
Deploying Rails Apps with Chef and Capistrano
 
Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...
Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...
Pig Tutorial | Apache Pig Tutorial | What Is Pig In Hadoop? | Apache Pig Arch...
 
HTML5 for mobile - DiGi Challenge for Change
HTML5 for mobile - DiGi Challenge for ChangeHTML5 for mobile - DiGi Challenge for Change
HTML5 for mobile - DiGi Challenge for Change
 
How do we drive tech changes
How do we drive tech changesHow do we drive tech changes
How do we drive tech changes
 
[EclipseCon France 2017] Language Server Protocol in action
[EclipseCon France 2017] Language Server Protocol in action[EclipseCon France 2017] Language Server Protocol in action
[EclipseCon France 2017] Language Server Protocol in action
 
NUS SOC Print
NUS SOC PrintNUS SOC Print
NUS SOC Print
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Gears of Perforce: AAA Game Development Challenges
Gears of Perforce: AAA Game Development ChallengesGears of Perforce: AAA Game Development Challenges
Gears of Perforce: AAA Game Development Challenges
 
Software that eats the world! - PerformDay Brussels
Software that eats the world! - PerformDay BrusselsSoftware that eats the world! - PerformDay Brussels
Software that eats the world! - PerformDay Brussels
 
FEC2017-Introduction-to-programming
FEC2017-Introduction-to-programmingFEC2017-Introduction-to-programming
FEC2017-Introduction-to-programming
 
Easy way to learn Core java full material
Easy way to learn Core java full materialEasy way to learn Core java full material
Easy way to learn Core java full material
 
Corejava ratan
Corejava ratanCorejava ratan
Corejava ratan
 
Debugging and Tuning Mobile Web Sites with Modern Web Browsers
Debugging and Tuning Mobile Web Sites with Modern Web BrowsersDebugging and Tuning Mobile Web Sites with Modern Web Browsers
Debugging and Tuning Mobile Web Sites with Modern Web Browsers
 
The Ring programming language version 1.5.1 book - Part 4 of 180
The Ring programming language version 1.5.1 book - Part 4 of 180The Ring programming language version 1.5.1 book - Part 4 of 180
The Ring programming language version 1.5.1 book - Part 4 of 180
 
Deep Dive into FME Server 2017.0
Deep Dive into FME Server 2017.0Deep Dive into FME Server 2017.0
Deep Dive into FME Server 2017.0
 
Offline of web applications
Offline of web applicationsOffline of web applications
Offline of web applications
 
Offline for web - Frontend Dev Conf Minsk 2014
Offline for web - Frontend Dev Conf Minsk 2014Offline for web - Frontend Dev Conf Minsk 2014
Offline for web - Frontend Dev Conf Minsk 2014
 
Modern javascript localization with c-3po and the good old gettext
Modern javascript localization with c-3po and the good old gettextModern javascript localization with c-3po and the good old gettext
Modern javascript localization with c-3po and the good old gettext
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
Pharo IoT Installation Improvements and Continuous Integration
Pharo IoT Installation Improvements and Continuous IntegrationPharo IoT Installation Improvements and Continuous Integration
Pharo IoT Installation Improvements and Continuous Integration
 

More from Jesper Bylund

What happens after react? (second edition)
What happens after react? (second edition)What happens after react? (second edition)
What happens after react? (second edition)Jesper Bylund
 
What happens after react?
What happens after react?What happens after react?
What happens after react?Jesper Bylund
 
What is so Ethical about Design?
What is so Ethical about Design?What is so Ethical about Design?
What is so Ethical about Design?Jesper Bylund
 
Ethics in design (8 feb 2018)
Ethics in design (8 feb 2018)Ethics in design (8 feb 2018)
Ethics in design (8 feb 2018)Jesper Bylund
 
Wordpress & Backbone: The Dawn of Web Apps
Wordpress & Backbone: The Dawn of Web AppsWordpress & Backbone: The Dawn of Web Apps
Wordpress & Backbone: The Dawn of Web AppsJesper Bylund
 
WordPress och den responsiva webben
WordPress och den responsiva webbenWordPress och den responsiva webben
WordPress och den responsiva webbenJesper Bylund
 
How to improve learning
How to improve learningHow to improve learning
How to improve learningJesper Bylund
 

More from Jesper Bylund (7)

What happens after react? (second edition)
What happens after react? (second edition)What happens after react? (second edition)
What happens after react? (second edition)
 
What happens after react?
What happens after react?What happens after react?
What happens after react?
 
What is so Ethical about Design?
What is so Ethical about Design?What is so Ethical about Design?
What is so Ethical about Design?
 
Ethics in design (8 feb 2018)
Ethics in design (8 feb 2018)Ethics in design (8 feb 2018)
Ethics in design (8 feb 2018)
 
Wordpress & Backbone: The Dawn of Web Apps
Wordpress & Backbone: The Dawn of Web AppsWordpress & Backbone: The Dawn of Web Apps
Wordpress & Backbone: The Dawn of Web Apps
 
WordPress och den responsiva webben
WordPress och den responsiva webbenWordPress och den responsiva webben
WordPress och den responsiva webben
 
How to improve learning
How to improve learningHow to improve learning
How to improve learning
 

Recently uploaded

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 

Recently uploaded (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 

Text Editing & Input Conflicts