Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Making Sense of Web Frameworks
Search
Daniel Morrison
May 11, 2015
Programming
0
98
Making Sense of Web Frameworks
Presented at GLSEC 2015 in Grand Rapids, Michigan on 11 May 2015.
Daniel Morrison
May 11, 2015
Tweet
Share
More Decks by Daniel Morrison
See All by Daniel Morrison
Early 2024 Holland City Fiber Update
danielmorrison
0
2.8k
August 2019 Broadband Service - City Study
danielmorrison
0
5.9k
Holland BPW Fiber to the Premises Capital Recovery Models
danielmorrison
0
7.7k
Holland BPW Broadband Expansion
danielmorrison
0
8.7k
Downtown Holland Fiber Update
danielmorrison
0
97
Interactor
danielmorrison
2
440
Getting Started with Ruby
danielmorrison
5
460
You Can't Fear JavaScript Anymore
danielmorrison
2
180
Other Decks in Programming
See All in Programming
最新TCAキャッチアップ
0si43
0
140
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
イベント駆動で成長して委員会
happymana
1
320
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.4k
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
Ethereum_.pdf
nekomatu
0
460
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Jakarta EE meets AI
ivargrimstad
0
120
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Click-free releases & the making of a CLI app
oheyadam
2
110
Featured
See All Featured
A Tale of Four Properties
chriscoyier
156
23k
A better future with KSS
kneath
238
17k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Practical Orchestrator
shlominoach
186
10k
Designing the Hi-DPI Web
ddemaree
280
34k
Thoughts on Productivity
jonyablonski
67
4.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Bash Introduction
62gerente
608
210k
The Pragmatic Product Professional
lauravandoore
31
6.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Transcript
collectiveidea.com Making Sense of Web Frameworks Daniel Morrison collectiveidea.com @danielmorrison
collectiveidea.com
collectiveidea.com
collectiveidea.com
collectiveidea.com What’s a Web Framework?
collectiveidea.com Write Code View on the Web Do interesting stuff
collectiveidea.com Why use a Web Framework?
collectiveidea.com Work faster Have fun Profit!
collectiveidea.com What’s out there?
collectiveidea.com
collectiveidea.com
collectiveidea.com Where do we start?
collectiveidea.com
collectiveidea.com Languages vs Frameworks
collectiveidea.com
collectiveidea.com Languages vs Frameworks vs Runtimes
collectiveidea.com
collectiveidea.com
collectiveidea.com
collectiveidea.com Choosing a Framework
collectiveidea.com Option #1 Pick by Language
collectiveidea.com #1: Pick by Language
collectiveidea.com #1: Pick by Language
collectiveidea.com #1: Pick by Language
collectiveidea.com #1: Pick by Language ! Quicker to learn !
Easier to “sell” ! Limits your choices " Wrong for goals? " Baggage " Limits your choices
collectiveidea.com Option #2 Pick by Popularity
collectiveidea.com #2: Popularity
collectiveidea.com #2: Popularity “For the fourth year in a row,
Python retains it's #1 dominance followed by Java, C++, and Javascript.”
collectiveidea.com #2: Popularity
collectiveidea.com #2: Popularity 1 JavaScript 2 Java 3 PHP 4
Python 5 C# 5 C++ 5 Ruby
collectiveidea.com #2: Popularity
collectiveidea.com #2: Popularity source: Google Trends
collectiveidea.com #2: Popularity ! Lots of resources ! Excitement !
Active community " May change too fast " May change too slow " Not battle-tested " Fewer experts " Is it actually used?
collectiveidea.com Server Languages Obscure Popularity
collectiveidea.com Option #3 Pick by Type
collectiveidea.com #3: Type Where is the logic?
collectiveidea.com #3: Type Server Side Icons by alf, Konstantin Velichko,
& Edward Boatman from the Noun Project.
collectiveidea.com #3: Type Client Side Icons by alf, Konstantin Velichko,
& Edward Boatman from the Noun Project.
collectiveidea.com #3: Type Both!
collectiveidea.com #3: Type ! Right tool for the job !
Focus on features ! Optimize for Env " May be new Language " Difficulties may arise " New toolchains
collectiveidea.com Option #4 Ecosystem
collectiveidea.com #4: Ecosystem
collectiveidea.com #4: Ecosystem
collectiveidea.com #4: Ecosystem
collectiveidea.com 4: Ecosystem ! Find helpful people ! Easy to
research ! May be friendly expats " Safety bias " Miss innovations " Different styles
collectiveidea.com We need to weigh all options.
collectiveidea.com Let’s Dive In
collectiveidea.com Server Side • Server Generated Code • Stateless •
Model View Controller • Database ORM • Routing
collectiveidea.com
collectiveidea.com
collectiveidea.com
collectiveidea.com
collectiveidea.com class!Article!<!ActiveRecord::Base end
collectiveidea.com class!ArticlesController!<!ApplicationController !!#!GET!/articles !!#!GET!/articles.json !!def!index !!!!@articles!=!Article.all !!end !!#!GET!/articles/1 !!#!GET!/articles/1.json
!!def!show !!!!@article!=!Article.find(params[:id]) !!end !!#!GET!/articles/new !!def!new !!!!@article!=!Article.new !!end !#!extra!lines!omitted.! end
collectiveidea.com <tbody> !!<%
[email protected]
!do5|article|!%> !!!!<tr> !!!!!!<td><%=!article.title!%></td> !!!!!!<td><%=!article.body!%></td> !!!!!!<td><%=!link_to!'Show',!article!%></td> !!!!!!<td><%=!link_to!'Edit',!edit_article_path(article)!%></td> !!!!!!<td><%=!link_to!'Destroy',!article,!method:!:delete,!! !!!!!!!!!!!!data:!{!confirm:!'Are!you!sure?'!}!%></td>
!!!!</tr> !!<%!end!%> </tbody>
collectiveidea.com Server Side • Most common type of framework •
Safe choice • Works like the web
collectiveidea.com Client Side • Javascript • No server needed •
Stateful
collectiveidea.com
collectiveidea.com
collectiveidea.com
collectiveidea.com
collectiveidea.com
collectiveidea.com
collectiveidea.com Todos.Todo!=!DS.Model.extend({ !!title:!DS.attr('string'), !!isCompleted:!DS.attr('boolean') });
collectiveidea.com Todos.TodosListController!=!Ember.ArrayController.extend({ !!needs:!['todos'], !!allTodos:!Ember.computed.alias('controllers.todos'), !!itemController:!'todo', !!canToggle:!function!()!{ !!!!var!anyTodos!=!this.get('allTodos.length'); !!!!var!isEditing!=!this.isAny('isEditing'); !!!!return!anyTodos!&&!!isEditing;
!!}.property('allTodos.length',!'@each.isEditing') });
collectiveidea.com <section!id="main"> !!{{#if!canToggle}} !!!!{{input!type="checkbox"!id="toggle\all"!checked=allTodos.allAreDone}} !!{{/if}} !!<ul!id="todo\list"> !!!!{{#each}} !!!!!!<li!{{bind\attr!class="isCompleted:completed!isEditing:editing"}}> !!!!!!!!{{#if!isEditing}} !!!!!!!!!!{{todo\input!type="text"!class="edit"!value=bufferedTitle!
!!!!!!!!!!!!focus\out="doneEditing"!insert\newline="doneEditing"! !!!!!!!!!!!!escape\press="cancelEditing"}} !!!!!!!!{{else}} !!!!!!!!!!{{input!type="checkbox"!class="toggle"!checked=isCompleted}} !!!!!!!!!!<label!{{action!"editTodo"!on="doubleClick"}}>{{title}}</label> !!!!!!!!!!<button!{{action!"removeTodo"}}!class="destroy"></button> !!!!!!!!{{/if}} !!!!!!!!</li> !!!!{{/each}} !!</ul> </section>
collectiveidea.com Client Side • No server code needed • Rich,
stageful interfaces • Interfaces feel responsive • Logic runs in the browser
collectiveidea.com Both Sides • Single language • Run code on
either client or server
collectiveidea.com
collectiveidea.com
collectiveidea.com
collectiveidea.com
collectiveidea.com
collectiveidea.com
collectiveidea.com Lists!=!new!Mongo.Collection('lists'); //!Calculate!a!default!name!for!a!list!in!the!form!of!'List!A' Lists.defaultName!=!function()!{ !!var!nextLetter!=!'A',!nextName!=!'List!'!+!nextLetter; !!while!(Lists.findOne({name:!nextName}))!{ !!!!//!not!going!to!be!too!smart!here,!can!go!past!Z !!!!nextLetter!=!String.fromCharCode(nextLetter.charCodeAt(0)!+!1); !!!!nextName!=!'List!'!+!nextLetter;
!!} !!return!nextName; }; Todos!=!new!Mongo.Collection('todos');
collectiveidea.com Router.map(function()!{ !!this.route('join'); !!this.route('signin'); !!this.route('listsShow',!{ !!!!path:!'/lists/:_id', !!!!//!subscribe!to!todos!before!the!page!is!rendered!but!don't!wait!on!the !!!!//!subscription,!we'll!just!render!the!items!as!they!arrive !!!!onBeforeAction:!function!()!{
!!!!!!this.todosHandle!=!Meteor.subscribe('todos',!this.params._id); !!!!!!if!(this.ready())!{ !!!!!!!!//!Handle!for!launch!screen!defined!in!app\body.js !!!!!!!!dataReadyHold.release(); !!!!!!} !!!!}, !!!!data:!function!()!{ !!!!!!return!Lists.findOne(this.params._id); !!!!}, !!!!action:!function!()!{ !!!!!!this.render(); !!!!} !!}); !!this.route('home',!{ !!!!path:!'/', !!!!action:!function()!{ !!!!!!Router.go('listsShow',!Lists.findOne()); !!!!} !!}); });
collectiveidea.com <div!class="list\todos"> !!<a!class="js\new\list!link\list\new">! !!!!<span!class="icon\plus"></span>New!List</a> !!{{#each!lists}} !!!!<a!href="{{pathFor!'listsShow'}}"!class="list\ todo!{{activeListClass}}"!title="{{name}}"> !!!!!!{{#if!userId}} !!!!!!!!<span!class="icon\lock"></span>
!!!!!!{{/if}} !!!!!!{{#if!incompleteCount}} !!!!!!!!<span!class="count\list">!!! !!!!!!!!!!{{incompleteCount}}! !!!!!!!!</span> !!!!!!{{/if}} !!!!!!{{name}} !!!!</a> !!{{/each}} </div>
collectiveidea.com Both Sides • Write in a single language •
Move logic from server to client later
collectiveidea.com So which is best for me?
collectiveidea.com Server Side • Most common choice • Request-response cycle
• Mature frameworks • Avoid Javascript (if you want)
collectiveidea.com Client Side • Newer and less information • Especially
great if simply calculating • May feel more familiar to desktop coders • May require server side anyway
collectiveidea.com What shouldn’t I consider?
collectiveidea.com Marketing
collectiveidea.com Marketing (unless terrible)
collectiveidea.com Version Numbers
collectiveidea.com Version Numbers (unless pre-1.0)
collectiveidea.com Performance
collectiveidea.com
collectiveidea.com
collectiveidea.com But it wouldn’t be done yet!
collectiveidea.com …but then Facebook changed PHP!
collectiveidea.com “The Go standard lib is good enough for most
apps.”
collectiveidea.com
collectiveidea.com Frameworks give us flexibility.
collectiveidea.com Good Frameworks
collectiveidea.com Save you time.
collectiveidea.com Get better over time.
collectiveidea.com Are used in production
collectiveidea.com Have great documentation
collectiveidea.com The right framework for you?
collectiveidea.com The framework that gets work done.
collectiveidea.com Thank You! Daniel Morrison collectiveidea.com @danielmorrison
collectiveidea.com Image Credits • Untitled by kris krüg https://www.flickr.com/photos/kk/6863172432 •
The empty room by Antoine Robiez https://www.flickr.com/photos/enthuan/9317165351 • Wild West Hotel by Marion Doss https://www.flickr.com/photos/ooocha/2594791354