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
62
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
270
Forget Ruby. Forget CoffeeScript. Do SOA
mlomnicki
1
120
CAP Theorem
mlomnicki
2
120
[PL] Transakcje w bazach danych
mlomnicki
1
160
Ruby Tricks 2
mlomnicki
3
58
SchemaPlus
mlomnicki
1
37
Other Decks in Technology
See All in Technology
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
AGIについてChatGPTに聞いてみた
blueb
0
130
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
130
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
130
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
140
Amazon Personalizeのレコメンドシステム構築、実際何するの?〜大体10分で具体的なイメージをつかむ〜
kniino
1
100
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
840
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
DynamoDB でスロットリングが発生したとき_大盛りver/when_throttling_occurs_in_dynamodb_long
emiki
1
390
Terraform Stacks入門 #HashiTalks
msato
0
360
Featured
See All Featured
It's Worth the Effort
3n
183
27k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Documentation Writing (for coders)
carmenintech
65
4.4k
Become a Pro
speakerdeck
PRO
25
5k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
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