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
58
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
250
Forget Ruby. Forget CoffeeScript. Do SOA
mlomnicki
1
120
CAP Theorem
mlomnicki
2
110
[PL] Transakcje w bazach danych
mlomnicki
1
100
Ruby Tricks 2
mlomnicki
3
52
SchemaPlus
mlomnicki
1
37
Other Decks in Technology
See All in Technology
自動生成を活用した、運用保守コストを抑える Error/Alert/Runbook の一元集約管理 / Centralized management of Error/Alert/Runbook to minimize operational costs using automated code generation
biwashi
9
2.1k
Next'24 事例セッションの紹介とクラウド資格を活用したキャリア形成について語りMuscle
yasumuusan
1
340
レガシーをぶっ壊せ。AEONで始めるDevRelの話 / Qiita Night 2024-2-22
aeonpeople
3
150
マルチアカウント環境への発見的統制の導入
ch1aki
1
1.3k
Vertex AI を中心に 生成AIのアップデートを共有します
kaz1437
0
140
「手動オペレーションに定評がある」と言われた私が心がけていること / phpcon_odawara2024
blue_goheimochi
2
320
最近たまに見かけるTiDBってなんだ? - Findy
pingcap0315
2
600
WebアプリケーションにおけるPDOの使い方入門 / phpcon odawara 2024
meihei3
2
430
Microsoft Cloudで開発ライフサイクルを保護する
kkamegawa
0
140
社内勉強会運営のコツ
senoo
6
1.1k
日本におけるデータエンジニアリングのこれまでとこれから
foursue
11
2.4k
Databricksを活用してDELISH KITCHENのレシピレコメンドを開発した話
furu8
0
250
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
273
13k
Creatively Recalculating Your Daily Design Routine
revolveconf
209
11k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
154
14k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
658
120k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
Being A Developer After 40
akosma
56
580k
What’s in a name? Adding method to the madness
productmarketing
PRO
15
2.6k
The Invisible Customer
myddelton
114
12k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
Music & Morning Musume
bryan
41
5.6k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Become a Pro
speakerdeck
PRO
10
4.5k
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