Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Lotus For Rails Developers
Search
Luca Guidi
November 05, 2015
Programming
360
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Lotus For Rails Developers
Luca Guidi
November 05, 2015
Transcript
63 slides
Lotus For Rails Developers @jodosha / #lotusrb
Indie OSS dev & Freelancer
Why Lotus?
Lotus Philosophy
Lightweight
Features • Thread-safety • Full featured HTTP router • RESTful
resources • Actions and views as objects • Actions callbacks • Code sharing • Exception handling • Sessions • Secure Cookies • HTTP Caching • Automatic MIME Types • 20+ Template engines • Partials and layouts • Presenters • Routing helpers • Form helpers • HTML helpers • Automatic markup escape • CSRF and XSS prevention • Force SSL • Entities • Repositories • Data Mapper • SQL and Memory adapters • Dirty Tracking • Reusable validations • Mailers • Multiple environments • Static assets • JSON body parser • Params whitelisting and validation • Code generators • Rack servers support • Application console • Database console • Powerful CLI • Migrations • RSpec, Minitest and Capybara support • Several architectures • And more..
0 17,5 35 52,5 70 Ruby Rack Sinatra Lotus Rails
Dependencies Memory
On average, we use only a fraction of the features
that a gem provides.
Lotus depends on a few gems. You can be sure
that all the loaded code is useful for your application.
Lotus Foo Bar Baz Runtime dependency Transitive dependency
For each gem that we require, we’re adding overhead to
Ruby and Bundler.
There is no faster code than no code at all.
Less convenient
Example: Constant Autoloading • Differences across environments • ActiveSupport’s dependencies.rb
is ~800LOCs • lotus-controller gem is ~800LOCs • It took years to become stable • It modifies how Ruby VM loads code and features • It requires to “monkey-patch” Ruby Core
Solution: Eager loading • Same behaviour across environments • It’s
just 26LOCs • It isn’t a perfect solution • “Easy fix” via require
No monkey-patching
Don’t monkey-patch classes that you don’t own.
Testability
All the application components can be unit tested.
No need to maintain lotus-rspec or lotus- minitest gems.
A complete framework
Lotus goes beyond “Flat-MVC” by providing a set of collaborators
for “Full-MVC”.
Lotus toolkit
Full stack web apps
None
None
Lotus has a “Modular First” approach that helps you to
scale your code.
The Monolith is good for the first 5 years, but
then a framework should make your life easy.
None
Example #1
None
This is the name of the application under apps/
None
Web::Controllers::Home::Index For the app named Web we have Web::Action
None
None
None
For the app named Web we have Web::View Web::Controllers::Home::Index Web::Views::Home::Index
All the “exposures” and view’s public methods are available to
the template.
None
Exposure from the action
None
Example #2
One big ERb block
In order to avoid coupling with any ORM, it just
accepts symbols.
We have the routes factory to not overload the view
context with too many methods.
No need to concat these two div blocks.
Params validation is optional
This is the same name that we have set to
form_for.
Separation between entities and repositories.
No coupling with the routing system and the ORM
None
None
None
None
Useful resources
http://lotusrb.org Guides and API docs
http://lotusrb.org/mailing-list Subscribe to the mailing list at:
http://lucaguidi.com
http://lotusrb.org/hackday
Q&A
https://speakerdeck.com/jodosha/ lotus-for-rails-developers Slides available at:
Thank you
More Decks by Luca Guidi
See All by Luca Guidi
Functional Web with Hanami
jodosha
4
460
Lessons Learned While Building Hanami
jodosha
4
1.2k
Lotus RubyDay 2015
jodosha
2
980
Lotus - Brighton Ruby 2015
jodosha
3
950
Lotus
jodosha
8
590
A Rails Criticism
jodosha
4
1.8k
Other Decks in Programming
See All in Programming
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
220
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
1.4k
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
620
Stage 3でも仕様は変わる。アプリケーション開発者のためのTC39プロセスの読み方
bicstone
2
1.5k
ruby/uri meets WHATWG
jinroq
0
200
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.4k
観測者から当事者へ、AI 時代にドメインへ深入りする知識と技術 / From Observer to Practitioner: Going Deep into Domains in the Age of AI
nrslib
5
2.3k
Going Full Circle with Virtual Graphs and Relational Databases
michaelsimons
1
120
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
180
Apache Airflow Introduction
leew
1
100
LLM 101
dalinaum
0
570
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
490
Featured
See All Featured
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
73
43k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
30 Presentation Tips
portentint
PRO
1
480
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Embracing the Ebb and Flow
colly
88
5.2k
Web Performance Is a Journey [PerfNow 2026]
tammyeverts
3
200
sira's awesome portfolio website redesign presentation
elsirapls
0
530
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
530
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
410
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
570
Google's AI Overviews - The New Search
badams
0
1.7k