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 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
960
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
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.9k
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
220
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
350
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
130
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
670
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
5
490
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
240
今さら聞けない .NET CLI
htkym
0
200
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
350
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
250
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
170
源内ハンズオン概要編
hideg
0
200
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Utilizing Notion as your number one productivity tool
mfonobong
4
550
Making the Leap to Tech Lead
cromwellryan
135
10k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
490
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
580
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
290
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Automating Front-end Workflow
addyosmani
1369
210k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
370
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
470
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
220
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