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
340
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Lotus For Rails Developers
Luca Guidi
November 05, 2015
More Decks by Luca Guidi
See All by Luca Guidi
Functional Web with Hanami
jodosha
4
450
Lessons Learned While Building Hanami
jodosha
4
1.2k
Lotus RubyDay 2015
jodosha
2
970
Lotus - Brighton Ruby 2015
jodosha
3
930
Lotus
jodosha
8
580
A Rails Criticism
jodosha
4
1.7k
Other Decks in Programming
See All in Programming
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
170
Can LLMs Replicate 4 Years of Compose Migration? Exploring the boundaries of automation with 279 XML files from a real product
makun
0
140
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
230
Heart of Swift Concurrency
koher
0
540
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
700
自分的「カンファレンスの楽しみ方」
syumai
0
200
Jetpack Compose メカニズム
skydoves
0
370
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
270
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
370
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
120
VueプロジェクトをTypeScript7に対応させる- Side-by-Side戦略による一部高速化 -
koukimiura
0
110
Deep dive into the select statement (GopherCon UK)
jespino
0
180
Featured
See All Featured
New Earth Scene 8
popppiees
3
2.6k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
790
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
A Tale of Four Properties
chriscoyier
163
24k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
450
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
600
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
270
Navigating Team Friction
lara
192
16k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
690
Transcript
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