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
Lotus
Search
Luca Guidi
October 14, 2014
Programming
8
540
Lotus
Lotus: a complete web framework for Ruby.
Luca Guidi
October 14, 2014
Tweet
Share
More Decks by Luca Guidi
See All by Luca Guidi
Functional Web with Hanami
jodosha
4
410
Lessons Learned While Building Hanami
jodosha
4
1.1k
Lotus RubyDay 2015
jodosha
2
890
Lotus For Rails Developers
jodosha
2
300
Lotus - Brighton Ruby 2015
jodosha
3
870
A Rails Criticism
jodosha
4
1.7k
Other Decks in Programming
See All in Programming
CSC509 Lecture 02
javiergs
PRO
0
400
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1k
フロントエンド開発に役立つクライアントプログラム共通のノウハウ / Universal client-side programming best practices for frontend development
nrslib
7
3.8k
defer f()とdefer fの挙動を 誤解していた話
kogamochiduki
2
160
議事録の要点整理を自動化! サーバレス Bot 構築術
penpeen
3
1.6k
私達はmodernize packageに夢を見るか feat. go/analysis, go/ast / Go Conference 2025
kaorumuta
2
430
メモリ不足との戦い〜大量データを扱うアプリでの実践例〜
kwzr
1
740
なぜあの開発者はDevRelに伴走し続けるのか / Why Does That Developer Keep Running Alongside DevRel?
nrslib
1
330
ポスターセッション: 「まっすぐ行って、右!」って言ってラズパイカーを動かしたい 〜生成AI × Raspberry Pi Pico × Gradioの試作メモ〜
komofr
0
890
育てるアーキテクチャ:戦い抜くPythonマイクロサービスの設計と進化戦略
fujidomoe
1
150
タスクの特性や不確実性に応じた最適な作業スタイルの選択(ペアプロ・モブプロ・ソロプロ)と実践 / Optimal Work Style Selection: Pair, Mob, or Solo Programming.
honyanya
2
110
CI_CD「健康診断」のススメ。現場でのボトルネック特定から、健康診断を通じた組織的な改善手法
teamlab
PRO
0
160
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.5k
Raft: Consensus for Rubyists
vanstee
139
7.1k
It's Worth the Effort
3n
187
28k
Agile that works and the tools we love
rasmusluckow
331
21k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Fireside Chat
paigeccino
40
3.7k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Transcript
Lotus A c o mp l e t e web
framework @jodosha / #lotusrb
None
Do we need yet another web framework?
Are you reinventing the wheel?
What if we never reinvented the wheel?
The wheel
None
We reinvented the wheel after observing it
Complexity should be managed, not hidden.
Why does this matter?
The ultimate goal is…
Money https://flic.kr/p/aFAEHR
Use case: http://bit.ly/github-rails-upgrade
We should not trade control for convenience.
Cost of maintenance 0 20 40 60 80 Years 0
1 2 3 Covenience Simplicity
Silver bullets are a lie.
Philosophy
Standalone frameworks
Full stack applications
Few conventions More objects No monkey- patching
Few conventions More objects No monkey- patching
Few conventions More objects No monkey- patching
Simple
Simplicity is achieved by removing what isn’t essential
Coffee https://flic.kr/p/6rX8pn
Convenient https://flic.kr/p/93Bk4K
Simple https://flic.kr/p/mn57Zm
The output https://flic.kr/p/9oG93w
Lotus doesn’t enable optional features by default
We perceive as simple the things we are familiar with
BookRepository.find 23
Rails.application.routes.draw do get '/' => 'home#index', as: :home resources :books
end ! Rails.application.routes # => ???
router = Lotus::Router.new do get '/', to: 'home#index', as: :home
resources :books end ! router.path(:home) # => '/' router.call(env) # Rack env run router # in config.ru
Fast
Micro benchmarks http://bit.ly/lotus-micro-bench
HTTP benchmarks http://bit.ly/lotus-http-bench
Rails 1027.73 Sinatra 2207.73 Lotus 4175.90 http://bit.ly/lotus-http-bench req/s
Rails 1027.73 Sinatra 2207.73 Lotus 4175.90 http://bit.ly/lotus-http-bench req/s
Rails 1027.73 Sinatra 2207.73 Lotus 4175.90 http://bit.ly/lotus-http-bench req/s
Testable
Testability is a virtue
There is no “test-damaged” design
class Show include Lotus::Action ! expose :book ! def initialize(repository
= BooksRepository) @repository = repository end ! def call(params) @book = @repository.find params[:id] end end
book = Object.new repository = Minitest::Mock.new repository.expect(:find, book, [Integer]) !
action = Show.new(repository) action.call(id: 23) # => [200, {}, nil] ! repository.verify action.book.must_equal book # assigns(:book) isn’t needed
Demo
The future
Get involved
lotusrb.org #lotusrb @jodosha
Q&A
Thank you!