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
Having fun with legacy apps
Search
Michał Łomnicki
November 21, 2012
Technology
1
65
Having fun with legacy apps
Michał Łomnicki
November 21, 2012
Tweet
Share
More Decks by Michał Łomnicki
See All by Michał Łomnicki
DDD, Rails and persistence
mlomnicki
1
280
Forget Ruby. Forget CoffeeScript. Do SOA
mlomnicki
1
120
CAP Theorem
mlomnicki
2
130
[PL] Transakcje w bazach danych
mlomnicki
1
230
Ruby Tricks 2
mlomnicki
3
67
SchemaPlus
mlomnicki
1
42
Other Decks in Technology
See All in Technology
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.8k
複数サービスを支えるマルチテナント型Batch MLプラットフォーム
lycorptech_jp
PRO
1
890
Webアプリケーションにオブザーバビリティを実装するRust入門ガイド
nwiizo
7
880
Generative AI Japan 第一回生成AI実践研究会「AI駆動開発の現在地──ブレイクスルーの鍵を握るのはデータ領域」
shisyu_gaku
0
330
Terraformで構築する セルフサービス型データプラットフォーム / terraform-self-service-data-platform
pei0804
1
190
Unlocking the Power of AI Agents with LINE Bot MCP Server
linedevth
0
110
AIのグローバルトレンド2025 #scrummikawa / global ai trend
kyonmm
PRO
1
310
[ JAWS-UG 東京 CommunityBuilders Night #2 ]SlackとAmazon Q Developerで 運用効率化を模索する
sh_fk2
3
460
これでもう迷わない!Jetpack Composeの書き方実践ガイド
zozotech
PRO
0
1.1k
EncryptedSharedPreferences が deprecated になっちゃった!どうしよう! / Oh no! EncryptedSharedPreferences has been deprecated! What should I do?
yanzm
0
490
AIエージェントで90秒の広告動画を制作!台本・音声・映像・編集をつなぐAWS最新アーキテクチャの実践
nasuvitz
3
340
MagicPod導入から半年、オープンロジQAチームで実際にやったこと
tjoko
0
110
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Fireside Chat
paigeccino
39
3.6k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.8k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
The Invisible Side of Design
smashingmag
301
51k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Why Our Code Smells
bkeepers
PRO
339
57k
The Power of CSS Pseudo Elements
geoffreycrofte
77
6k
Transcript
Legacy Apps @mlomnicki The essence of dealing with legacy apps
is to reduce the number of WTFs down to zero.
Legacy Apps Growing market.
There was an app... Almost 3 years under development 2
teams. 1st from UK, 2nd from India
tests there were some tests! (unit, controllers) over 100 out
of 220 fail
git log fixes - 163 times fix - 144 times
search - 52 times changes - 40 times final issues - 30 times
versions Rails 2.3.5 ruby 1.8 no bundler
WTFs (@club.secretary == current_member || @club.secretary == current_member)
WTFs <%= @payment.new_record? ? '' : '' %>
WTFs if some_condition else do_something
WTFs Member.first(:conditions => ["member_id LIKE #{params[:id]}"])
WTFs if @member.something == sth || @member.somethi ... elsif other_long_conditions
... else very_long_condition && looks_important ...
Logic models controllers views layouts initializers (!)
Everything is awful ruby code JS CSS plugins used
Arkency took control
1. Understand the app It is hard From the beginning
you have to dive into every detail Bugs made by your predecessor become your bugs
2. Tests BBQ heavy no factories or fixtures
3. Code PORO + real unit tests Good Rails code
Nothing fancy yet (no DCI, no usecases...)
4. Upgrade It is all about plugins Moved them to
lib and simplify Do you need them all?
Where is the fun?!
Removing code is fun 1799 files changed, 37303 insertions(+), 78770
deletions(-)
SPA migration is mega fun Realize the rails-way is legacy!
It does not matter how old Rails you have
To fix or to rewrite? None is correct! SPA is
the answer Otherwise your app is still legacy...
Profits Users - SPA enhances their experience Devs - SPA
is better architecture
Time 80% in frontend app 20% in Rails
Gameboxed Engine It is the best thing since Rails Put
pressure on Andrzej to open-source it
Mobile app soon Mobile is so easy now Thank you
SPA
Q&A