SlideShare ist ein Scribd-Unternehmen logo
1 von 29
The transparent web
 Bridging the chasm in web development
“The best way to predict the
   future is to invent it.”
                     -Alan Kay
How did we get here?

• Shout-out to TBL!

•Web: 21 years and 12 days old!

•Was: Pages

•Nowadays: Applications...
What do I mean by “transparent
             web?”

• You know you are designing for two different platforms:

• Server-side

•Client-side
•“Transparent web” - you shouldn’t have to!
How?
•It’s early and techniques vary, but there are some themes:
 • [Purely] functional

 •Strongly typed
 •Automatic generation of client/server communication
 •Explicit syntax for DB/HTML (or a DSL)
 •Functional reactive code for UI
Why?

• Three main problems of webapps:

• Security

• Tons of sometimes-conflicting languages

•You’re often also the sysadmin
Security

• Injection attacts:

 •Often a confusion of type: string vs. SQL vs. JavaScript

 •Fix with types:

         <html>foo</html> != “<html>foo</html>”
Tons of languages

• Tower of Babel...

•Languages or markup needed by the working web
  developer (there are more + var. frameworks):

 • Markup (HTML), application code (Ruby), client-side
   (JavaScript), javascript abstraction layer (jQuery &etc.),
   style (CSS), DB (SQL)
Sysadminery
•Configuring hosts files
•Setting up:

 •RDBMSs
 •Web servers
 •Deployment
•This is all vitally important, but it’s not programming
It’s going to ruin my code

•It is common to have that feeling:

1. “That C code is going to produce crap compared to what I
   could write in assembly” - J. Random Hacker

2. “Garbage collection means that my program is going to be
   slow and crappy.” - J. Random Hacker, Jr.
It’s going to ruin my code
•But, history has chosen:
  1. Assembly vs. C (or other HLL) is settled:
     high-level languages.

  2. Manual vs. automatic memory management perhaps settled:
     automatic (garbage collection).

• Programmer productivity & the elimination of certain kinds of
  errors is usually a big win
It’s going to ruin my code
•I have seen the future and
it is:

•Separate client/server
    apps & programmer-
    managed distribution vs.
    unified app & automatic
    distribution:
    unified & automatic
What’s the alternative?

• For the first time, some are starting to show up!

•Opa

•Ur/Web

•Meteor.js ran out of time :(
Our first examples

•Let’s do “Hello world!”... <sigh>
•But it gets you past the “how the !@#&^$ do I even compile
  this?” phase (or at least for me)

• And they fit on slides :)
Opa: Hello world!
helloworld.opa
function main() {
    <h1>Hello, world!</h1>
}

Server.start(Server.http,
             {title: "Hello, world!", page: main})
*cough* node.js *cough*

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello Worldn');
}).listen(1337, '127.0.0.1');
Opa: Hello world!


...compile, run:
$ opa helloworld.opa
$ ./helloworld.js
http://localhost:8080
Opa: Hello world!

•main returns an xhtml fragment, the compiler knows that this
  is XHTML and not a string

•   notice lack of: “ “

•the server then sets us up with a page
Ur/Web: Hello world!
  helloworld.ur
  fun main () = return <xml>
    <head>
      <title>Hello world!</title>
    </head>

    <body>
      <h1>Hello world!</h1>
    </body>
  </xml>
Ur/Web: Hello world!
  helloworld.urp
  helloworld

  helloworld.urs
  val main : unit -> transaction page


  ...compile, run:
  $ urweb helloworld
  $ ./urweb.exe
  http://localhost:8080/Helloworld/main
Ur/Web: Hello world!



•
The <xml> is a type that the compiler knows about
Another Example

• Let’s storycard this: I’d like to be able to...

• Fill in name, comment, email, click “comment” and

•Show past comments (implies persistent storage)
Opa: Comments



•
Source...
Opa: Comments


•
To compile and run:
opa comments.opa
./comments.js
[...creates mongodb datastore...]
Ur/Web: Comments

• Sources...

• comments.urs

• comments.urp

•comments.ur
Ur/Web: Comments
•To compile:
  urweb urweb -dbms mysql comments

• Create database table (MySQL in my case):
  mysql -u root -p1234 < comments.sql

• Run!
  ./comments.exe
Thanks!
• I’m Chris Wilson:

•chris@bendyworks.com
• @twopoint718

•Normally, I hack Rails for Bendyworks

• ...and thanks to them for letting me use some 20% time for
   this :)
Questions



•
I’ll do my best :)
Resources
1. http://opalang.org/

 1.1.http://www.mongodb.org/

 1.2.http://nodejs.org/

2. http://www.impredicative.com/ur/

 2.1.http://www.expdev.net/urtutorial/

Weitere ähnliche Inhalte

Was ist angesagt?

The no-framework Scala Dependency Injection Framework
The no-framework Scala Dependency Injection FrameworkThe no-framework Scala Dependency Injection Framework
The no-framework Scala Dependency Injection FrameworkAdam Warski
 
Brownbag on basics of web components
Brownbag on basics of web componentsBrownbag on basics of web components
Brownbag on basics of web componentsJason Park
 
Front End Development Automation with Grunt
Front End Development Automation with GruntFront End Development Automation with Grunt
Front End Development Automation with GruntLadies Who Code
 
Re-Introduction to Third-party Scripting
Re-Introduction to Third-party ScriptingRe-Introduction to Third-party Scripting
Re-Introduction to Third-party Scriptingbenvinegar
 
HTTP cache: keeping it fresh
HTTP cache: keeping it freshHTTP cache: keeping it fresh
HTTP cache: keeping it freshDavid de Boer
 
The ideal module system and the harsh reality
The ideal module system and the harsh realityThe ideal module system and the harsh reality
The ideal module system and the harsh realityAdam Warski
 
Front End Development - Beyond Javascript (Robin Cannon)
Front End Development - Beyond Javascript (Robin Cannon)Front End Development - Beyond Javascript (Robin Cannon)
Front End Development - Beyond Javascript (Robin Cannon)Future Insights
 
HTML5 Dev Conf - Sass, Compass & the new Webdev tools
HTML5 Dev Conf - Sass, Compass &  the new Webdev toolsHTML5 Dev Conf - Sass, Compass &  the new Webdev tools
HTML5 Dev Conf - Sass, Compass & the new Webdev toolsDirk Ginader
 
Advanced WordPress Development Environments
Advanced WordPress Development EnvironmentsAdvanced WordPress Development Environments
Advanced WordPress Development EnvironmentsBeau Lebens
 
Put a little Backbone in your WordPress
Put a little Backbone in your WordPressPut a little Backbone in your WordPress
Put a little Backbone in your WordPressadamsilverstein
 
Ruby On Rails Basics
Ruby On Rails BasicsRuby On Rails Basics
Ruby On Rails BasicsAmit Solanki
 
Fighting Ruby code smell
Fighting Ruby code smellFighting Ruby code smell
Fighting Ruby code smellolegshpynov
 
A modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianA modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianMagnolia
 
Custom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealCustom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealJoey Kudish
 
Becoming a better WordPress Developer
Becoming a better WordPress DeveloperBecoming a better WordPress Developer
Becoming a better WordPress DeveloperJoey Kudish
 
Block the System - building blocks in Gutenberg
Block the System - building blocks in GutenbergBlock the System - building blocks in Gutenberg
Block the System - building blocks in GutenbergLuc Princen
 
RoR (Ruby on Rails)
RoR (Ruby on Rails)RoR (Ruby on Rails)
RoR (Ruby on Rails)scandiweb
 
C# Powershell and an Azure Function Walk Into a Bar...
C# Powershell and an Azure Function Walk Into a Bar... C# Powershell and an Azure Function Walk Into a Bar...
C# Powershell and an Azure Function Walk Into a Bar... Obilogic
 
WordPress as the Backbone(.js)
WordPress as the Backbone(.js)WordPress as the Backbone(.js)
WordPress as the Backbone(.js)Beau Lebens
 
Lua web development and Sailor @conc_at 2015
Lua web development and Sailor @conc_at 2015Lua web development and Sailor @conc_at 2015
Lua web development and Sailor @conc_at 2015Etiene Dalcol
 

Was ist angesagt? (20)

The no-framework Scala Dependency Injection Framework
The no-framework Scala Dependency Injection FrameworkThe no-framework Scala Dependency Injection Framework
The no-framework Scala Dependency Injection Framework
 
Brownbag on basics of web components
Brownbag on basics of web componentsBrownbag on basics of web components
Brownbag on basics of web components
 
Front End Development Automation with Grunt
Front End Development Automation with GruntFront End Development Automation with Grunt
Front End Development Automation with Grunt
 
Re-Introduction to Third-party Scripting
Re-Introduction to Third-party ScriptingRe-Introduction to Third-party Scripting
Re-Introduction to Third-party Scripting
 
HTTP cache: keeping it fresh
HTTP cache: keeping it freshHTTP cache: keeping it fresh
HTTP cache: keeping it fresh
 
The ideal module system and the harsh reality
The ideal module system and the harsh realityThe ideal module system and the harsh reality
The ideal module system and the harsh reality
 
Front End Development - Beyond Javascript (Robin Cannon)
Front End Development - Beyond Javascript (Robin Cannon)Front End Development - Beyond Javascript (Robin Cannon)
Front End Development - Beyond Javascript (Robin Cannon)
 
HTML5 Dev Conf - Sass, Compass & the new Webdev tools
HTML5 Dev Conf - Sass, Compass &  the new Webdev toolsHTML5 Dev Conf - Sass, Compass &  the new Webdev tools
HTML5 Dev Conf - Sass, Compass & the new Webdev tools
 
Advanced WordPress Development Environments
Advanced WordPress Development EnvironmentsAdvanced WordPress Development Environments
Advanced WordPress Development Environments
 
Put a little Backbone in your WordPress
Put a little Backbone in your WordPressPut a little Backbone in your WordPress
Put a little Backbone in your WordPress
 
Ruby On Rails Basics
Ruby On Rails BasicsRuby On Rails Basics
Ruby On Rails Basics
 
Fighting Ruby code smell
Fighting Ruby code smellFighting Ruby code smell
Fighting Ruby code smell
 
A modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianA modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at Atlassian
 
Custom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp MontrealCustom Post Types in Depth at WordCamp Montreal
Custom Post Types in Depth at WordCamp Montreal
 
Becoming a better WordPress Developer
Becoming a better WordPress DeveloperBecoming a better WordPress Developer
Becoming a better WordPress Developer
 
Block the System - building blocks in Gutenberg
Block the System - building blocks in GutenbergBlock the System - building blocks in Gutenberg
Block the System - building blocks in Gutenberg
 
RoR (Ruby on Rails)
RoR (Ruby on Rails)RoR (Ruby on Rails)
RoR (Ruby on Rails)
 
C# Powershell and an Azure Function Walk Into a Bar...
C# Powershell and an Azure Function Walk Into a Bar... C# Powershell and an Azure Function Walk Into a Bar...
C# Powershell and an Azure Function Walk Into a Bar...
 
WordPress as the Backbone(.js)
WordPress as the Backbone(.js)WordPress as the Backbone(.js)
WordPress as the Backbone(.js)
 
Lua web development and Sailor @conc_at 2015
Lua web development and Sailor @conc_at 2015Lua web development and Sailor @conc_at 2015
Lua web development and Sailor @conc_at 2015
 

Andere mochten auch

Rc - The Plan 9 Shell
Rc - The Plan 9 ShellRc - The Plan 9 Shell
Rc - The Plan 9 Shelltwopoint718
 
Information Technology Particle Accelerator
Information Technology Particle AcceleratorInformation Technology Particle Accelerator
Information Technology Particle AcceleratorDror Bukai
 
Let's Build A Particle Accelerator
Let's Build A Particle AcceleratorLet's Build A Particle Accelerator
Let's Build A Particle Acceleratortwopoint718
 
SafePeak @ large telco - Sharepoint benchmark
SafePeak @ large telco - Sharepoint benchmarkSafePeak @ large telco - Sharepoint benchmark
SafePeak @ large telco - Sharepoint benchmarkVladi Vexler
 
CHARGE PARTICLE ACCELERATORCharge particle accelerator
CHARGE PARTICLE ACCELERATORCharge particle acceleratorCHARGE PARTICLE ACCELERATORCharge particle accelerator
CHARGE PARTICLE ACCELERATORCharge particle acceleratorSYED SHAHEEN SHAH
 
Particle accelerator
Particle acceleratorParticle accelerator
Particle acceleratorChen Siyuan
 

Andere mochten auch (8)

The origins of
The origins ofThe origins of
The origins of
 
AngularJS
AngularJSAngularJS
AngularJS
 
Rc - The Plan 9 Shell
Rc - The Plan 9 ShellRc - The Plan 9 Shell
Rc - The Plan 9 Shell
 
Information Technology Particle Accelerator
Information Technology Particle AcceleratorInformation Technology Particle Accelerator
Information Technology Particle Accelerator
 
Let's Build A Particle Accelerator
Let's Build A Particle AcceleratorLet's Build A Particle Accelerator
Let's Build A Particle Accelerator
 
SafePeak @ large telco - Sharepoint benchmark
SafePeak @ large telco - Sharepoint benchmarkSafePeak @ large telco - Sharepoint benchmark
SafePeak @ large telco - Sharepoint benchmark
 
CHARGE PARTICLE ACCELERATORCharge particle accelerator
CHARGE PARTICLE ACCELERATORCharge particle acceleratorCHARGE PARTICLE ACCELERATORCharge particle accelerator
CHARGE PARTICLE ACCELERATORCharge particle accelerator
 
Particle accelerator
Particle acceleratorParticle accelerator
Particle accelerator
 

Ähnlich wie The transparent web: A concise introduction to functional web development frameworks

How does the Internet Work?
How does the Internet Work?How does the Internet Work?
How does the Internet Work?Dina Goldshtein
 
Phonegap Day 2016: Ember/JS & Hybrid Apps Tips
Phonegap Day 2016: Ember/JS & Hybrid Apps TipsPhonegap Day 2016: Ember/JS & Hybrid Apps Tips
Phonegap Day 2016: Ember/JS & Hybrid Apps TipsAlex Blom
 
Intro to Ruby on Rails
Intro to Ruby on RailsIntro to Ruby on Rails
Intro to Ruby on Railsrschmukler
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_phpJeanho Chu
 
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5David Voyles
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_phpJeanho Chu
 
Web Development: The Next Five Years
Web Development: The Next Five YearsWeb Development: The Next Five Years
Web Development: The Next Five Yearssneeu
 
JavaScript : A trending scripting language
JavaScript : A trending scripting languageJavaScript : A trending scripting language
JavaScript : A trending scripting languageAbhayDhupar
 
Node Security: The Good, Bad & Ugly
Node Security: The Good, Bad & UglyNode Security: The Good, Bad & Ugly
Node Security: The Good, Bad & UglyBishan Singh
 
Introduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsIntroduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsDerek Anderson
 
Trends in programming languages
Trends in programming languagesTrends in programming languages
Trends in programming languagesAntya Dev
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1Mohammad Qureshi
 
Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?Felix Geisendörfer
 
Node.js: The What, The How and The When
Node.js: The What, The How and The WhenNode.js: The What, The How and The When
Node.js: The What, The How and The WhenFITC
 
Solid and Sustainable Development in Scala
Solid and Sustainable Development in ScalaSolid and Sustainable Development in Scala
Solid and Sustainable Development in Scalascalaconfjp
 

Ähnlich wie The transparent web: A concise introduction to functional web development frameworks (20)

Why ruby and rails
Why ruby and railsWhy ruby and rails
Why ruby and rails
 
How does the Internet Work?
How does the Internet Work?How does the Internet Work?
How does the Internet Work?
 
Phonegap Day 2016: Ember/JS & Hybrid Apps Tips
Phonegap Day 2016: Ember/JS & Hybrid Apps TipsPhonegap Day 2016: Ember/JS & Hybrid Apps Tips
Phonegap Day 2016: Ember/JS & Hybrid Apps Tips
 
Intro to Ruby on Rails
Intro to Ruby on RailsIntro to Ruby on Rails
Intro to Ruby on Rails
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
 
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
 
Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)
 
Web Development: The Next Five Years
Web Development: The Next Five YearsWeb Development: The Next Five Years
Web Development: The Next Five Years
 
About Clack
About ClackAbout Clack
About Clack
 
JavaScript : A trending scripting language
JavaScript : A trending scripting languageJavaScript : A trending scripting language
JavaScript : A trending scripting language
 
Node Security: The Good, Bad & Ugly
Node Security: The Good, Bad & UglyNode Security: The Good, Bad & Ugly
Node Security: The Good, Bad & Ugly
 
Introduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsIntroduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCats
 
Wider than rails
Wider than railsWider than rails
Wider than rails
 
Trends in programming languages
Trends in programming languagesTrends in programming languages
Trends in programming languages
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
 
Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
Node.js: The What, The How and The When
Node.js: The What, The How and The WhenNode.js: The What, The How and The When
Node.js: The What, The How and The When
 
Solid and Sustainable Development in Scala
Solid and Sustainable Development in ScalaSolid and Sustainable Development in Scala
Solid and Sustainable Development in Scala
 

Kürzlich hochgeladen

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
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
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
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
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 

Kürzlich hochgeladen (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
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
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
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
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 

The transparent web: A concise introduction to functional web development frameworks

  • 1. The transparent web Bridging the chasm in web development
  • 2. “The best way to predict the future is to invent it.” -Alan Kay
  • 3. How did we get here? • Shout-out to TBL! •Web: 21 years and 12 days old! •Was: Pages •Nowadays: Applications...
  • 4. What do I mean by “transparent web?” • You know you are designing for two different platforms: • Server-side •Client-side •“Transparent web” - you shouldn’t have to!
  • 5. How? •It’s early and techniques vary, but there are some themes: • [Purely] functional •Strongly typed •Automatic generation of client/server communication •Explicit syntax for DB/HTML (or a DSL) •Functional reactive code for UI
  • 6. Why? • Three main problems of webapps: • Security • Tons of sometimes-conflicting languages •You’re often also the sysadmin
  • 7. Security • Injection attacts: •Often a confusion of type: string vs. SQL vs. JavaScript •Fix with types: <html>foo</html> != “<html>foo</html>”
  • 8. Tons of languages • Tower of Babel... •Languages or markup needed by the working web developer (there are more + var. frameworks): • Markup (HTML), application code (Ruby), client-side (JavaScript), javascript abstraction layer (jQuery &etc.), style (CSS), DB (SQL)
  • 9. Sysadminery •Configuring hosts files •Setting up: •RDBMSs •Web servers •Deployment •This is all vitally important, but it’s not programming
  • 10. It’s going to ruin my code •It is common to have that feeling: 1. “That C code is going to produce crap compared to what I could write in assembly” - J. Random Hacker 2. “Garbage collection means that my program is going to be slow and crappy.” - J. Random Hacker, Jr.
  • 11. It’s going to ruin my code •But, history has chosen: 1. Assembly vs. C (or other HLL) is settled: high-level languages. 2. Manual vs. automatic memory management perhaps settled: automatic (garbage collection). • Programmer productivity & the elimination of certain kinds of errors is usually a big win
  • 12. It’s going to ruin my code •I have seen the future and it is: •Separate client/server apps & programmer- managed distribution vs. unified app & automatic distribution: unified & automatic
  • 13. What’s the alternative? • For the first time, some are starting to show up! •Opa •Ur/Web •Meteor.js ran out of time :(
  • 14. Our first examples •Let’s do “Hello world!”... <sigh> •But it gets you past the “how the !@#&^$ do I even compile this?” phase (or at least for me) • And they fit on slides :)
  • 15. Opa: Hello world! helloworld.opa function main() { <h1>Hello, world!</h1> } Server.start(Server.http, {title: "Hello, world!", page: main})
  • 16. *cough* node.js *cough* var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Worldn'); }).listen(1337, '127.0.0.1');
  • 17. Opa: Hello world! ...compile, run: $ opa helloworld.opa $ ./helloworld.js http://localhost:8080
  • 18. Opa: Hello world! •main returns an xhtml fragment, the compiler knows that this is XHTML and not a string • notice lack of: “ “ •the server then sets us up with a page
  • 19. Ur/Web: Hello world! helloworld.ur fun main () = return <xml> <head> <title>Hello world!</title> </head> <body> <h1>Hello world!</h1> </body> </xml>
  • 20. Ur/Web: Hello world! helloworld.urp helloworld helloworld.urs val main : unit -> transaction page ...compile, run: $ urweb helloworld $ ./urweb.exe http://localhost:8080/Helloworld/main
  • 21. Ur/Web: Hello world! • The <xml> is a type that the compiler knows about
  • 22. Another Example • Let’s storycard this: I’d like to be able to... • Fill in name, comment, email, click “comment” and •Show past comments (implies persistent storage)
  • 24. Opa: Comments • To compile and run: opa comments.opa ./comments.js [...creates mongodb datastore...]
  • 25. Ur/Web: Comments • Sources... • comments.urs • comments.urp •comments.ur
  • 26. Ur/Web: Comments •To compile: urweb urweb -dbms mysql comments • Create database table (MySQL in my case): mysql -u root -p1234 < comments.sql • Run! ./comments.exe
  • 27. Thanks! • I’m Chris Wilson: •chris@bendyworks.com • @twopoint718 •Normally, I hack Rails for Bendyworks • ...and thanks to them for letting me use some 20% time for this :)
  • 29. Resources 1. http://opalang.org/ 1.1.http://www.mongodb.org/ 1.2.http://nodejs.org/ 2. http://www.impredicative.com/ur/ 2.1.http://www.expdev.net/urtutorial/

Hinweis der Redaktion

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. Link is on dropbox!\n
  24. \n
  25. Link is on dropbox!\n
  26. \n
  27. \n
  28. \n
  29. \n