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
みんなで Hanami をしよう
Search
jinroq
September 22, 2018
0
2.2k
みんなで Hanami をしよう
FUKUOKA Engineers Day 2018 ~Autumn~ セッション
jinroq
September 22, 2018
Tweet
Share
More Decks by jinroq
See All by jinroq
Fukuoka.rb 2023 年度活動報告
jinroq
0
410
TRICK 2022 に入選した話
jinroq
0
230
RubyKaigiとMicrosoftと私
jinroq
0
190
msgraph: Microsoft Graph API Client with Ruby
jinroq
0
280
Fukuoka.rb 2019活動報告・2020抱負
jinroq
0
250
福岡の方から参りました Fukuoka.rb です
jinroq
0
1.7k
Microsoft Graph API Client and OpenAPI
jinroq
0
970
Fukuoka.rb #150 LT
jinroq
0
260
5 分で分かるアイキューブドシステムズ
jinroq
0
550
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
GitHub's CSS Performance
jonrohan
1030
460k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Site-Speed That Sticks
csswizardry
3
270
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
173
51k
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
Speed Design
sergeychernyshev
25
740
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Transcript
ΈΜͳͰ Hanami Λ͠Α͏ ODA Hirohito
ΈΜͳͰՖݟΛ͠Α͏ ODA Hirohito
None
Hanami http://hanamirb.org/
͓ॻ͖ • Hanami ͱʁ • Hanami Architecture • Rails Λ
Hanami ʹҠߦͯ͠Έͨ • ·ͱΊ
ࣗݾհ ʲ໊લʳ ɹODA Hirohito ʲग़ʳ ɹFukuoka.rb / JXUG Ԭ ʲଐੑʳ
ɹRuby ͕Α͔͘Βͳ͍ Rubyist
Hanami ͱʁ
Hanami ͱʁ • Ruby ϑϨʔϜϫʔΫ • Δͼ·ʢ0056 ߸ʣͰհ͞Εͨ • ݱࡏ
ver. 1.2.0
Hanami Guides http://hanamirb.org/guides/1.2/getting- started/
Hanami Architecture
Α͘ݴΘΕΔ͜ͱ or Α͘ࢥΘΕΔ͜ͱ
Ruby on Rails ͱԿ͕ҧ͏ͷʁ
Rails Hanami جຊཧ೦ ɾDRY ɾCoC ɾClean Architecture ɾMonolith First ORM
ɾActiveRecord ɾHanami-Model ࣮ํ ɾClass Base ɾModule Base ։ൃख๏ ɾ໌ࣔͳ͠ʢʁʣ ɾBDD
Rails Λ Hanami ʹҠߦͯ͠Έͨ
Rails Λ Hanami ʹҠߦͯ͠Έͨ Ҡߦ͠Α͏ͱͯ͠࠳ંͨ͠
Ζ͏ͱͨ͠ಈػ • Rails Hanami ʹҠߦ͍͔͢͠ʁͱ͍͏ ७ਮͳతح৺ • BDDʢBenkyokai Driven
Developmentʣ
Ҡߦͯ͠ΈΔϓϩδΣΫτ
OneMDM https://github.com/multunus/onemdm-server
Advanced Mobile Malware Campaign in India uses Malicious MDM https://blog.talosintelligence.com/2018/07/Mobile-Malware-
Campaign-uses-Malicious-MDM.html
͜ͷهࣄʹ͜Μͳจষ͕…
Advanced Mobile Malware Campaign in India uses Malicious MDM https://blog.talosintelligence.com/2018/07/Mobile-Malware-
Campaign-uses-Malicious-MDM.html
open-source MDM!?
ௐͯΈΔͱ݁ߏ͋Δ • MicroMDM • Commandment • mdm-server • Carbon Device
Management • Flyve MDM • OneMDM https://www.quora.com/Is-there-any-open-source-project-solution-for-MDM-mobile-device-management
༻ݴޠ • MicroMDM • Commandment • mdm-server • Carbon Device
Management • Flyve MDM • OneMDM ➡ Go ➡ Python ➡ Python ➡ Java ➡ JavaScript ➡ Ruby
༻ݴޠ • MicroMDM • Commandment • mdm-server • Carbon Device
Management • Flyve MDM • OneMDM ➡ Go ➡ Python ➡ Python ➡ Java ➡ JavaScript ➡ Ruby
બߟཧ༝ • Ruby on Rails Λ͍ͬͯͨ • ఏڙ͍ͯ͠Δػೳ͕গͳ͔ͬͨͷͰԿ͔༡ ͦ͏
ͲͷΑ͏ʹҠߦ͢Δ͔ʁ
Ҡߦͷ݅ • OneMDM ͷػೳΛଛͳΘͳ͍ ɾՄೳͳݶΓطଘͷ༷Λ౿ऻ͢Δ ɾݟͨʗৼΔ͍ʹ͍ͭͯଥڠ͢Δ • ͍ճͤΔࢿ࢈͍ճ͢
ՄೳͳݶΓ͍ճͤΔ ࢿ࢈͍ճ͍ͨ͠
͍ճͤΔࢿ࢈ • DB • ςετʢrspecʣ
ςετ͕ಈ͘Α͏ʹ ࣮ͨ͠ΒͲ͏͔ʁ
OneMDM ಈ࡞ڥ • CentOS 7 • Ruby 2.3.3 • Rails
4.2.10 • MySQL 8
OneMDM ಈ࡞ڥ • CentOS 7 • Ruby 2.3.3 • Rails
4.2.10 • MySQL 8 ➡ Debian 9 ➡ Ruby 2.5.1 ➡ Rails 4.2.10 ➡ MySQL 5.7
OneMDM ಈ࡞ڥ • CentOS 7 • Ruby 2.3.3 • Rails
4.2.10 • MySQL 8 ➡ Debian 9 ➡ Ruby 2.5.1 ➡ Rails 4.2.10 ➡ MySQL 5.7 ➡ Debian 9 ➡ Ruby 2.5.1 ➡ Hanami 1.2.0 ➡ MySQL 5.7
མͱ݀͠ ଖͷұ
Rails ͷࠇຐज़ʹቕ·Δ
Rails Good Parts, Bad Parts @willnet Rails Good Parts, Bad
Parts https://speakerdeck.com/willnet/rails-good-parts-bad-parts
gemも似たように、安易に採用すべきで はないものがある » devise » simple_form » activeadmin » etc
҆қʹ࠾༻͖͢Ͱͳ͍ gem ͷҰྫ
None
ݟʹ͍͘ͷͰ֦େ
͍Βͬ͠ΌΔ
͍ͭ͜ΒԿऀʁ • ActiveAdmin ཧը໘ཧऀΞΧϯτΛ͓खܰʹ ࡞ΕΔ gem • Devise ೝূػೳΛ͓खܰʹ࡞ΕΔ gem
ቕ·ΓͲ͜Ζ • ActiveAdmin / Devise ͱʹ͓खܰʹػೳΛ ఏڙͯ͘͠ΕΔ ɾ͓खܰ = ۤ࿑͢Δ෦͕ӅΕ͍ͯΔ
ɾۤ࿑͢Δ෦͕ϞϯΩʔύονͰ ɹ࣮ݱ͞Ε͍ͯΔʢͱࢥ͏ʣ
མͱ݀͠ ଖͷ್
Hanami ͷόάʢͬΆ͍ͷʣΛ౿Μͩ
࣮ࡍͷΤϥʔ $ bundle exec rspec An error occurred while loading
spec_helper. Failure/Error: Hanami.boot NameError: uninitialized constant Web::Controllers::Admin # ./apps/web/controllers/admin/dashboard/index.rb:1:in `<top (required)>'
<hanami_apps>/apps
<hanami_apps>/apps ← ͜͜ʹ index.rb ͕͍ͨ
Hanami ͷόάʁ • module Λਂ͍֊Ͱ࡞Δͱ NameError Λ ු༲͢Δʁ →ͦͷੲɺRails ͰࣅͨΑ͏ͳΤϥʔΛىͨ͜͠ͷͰ
ɹצҧ͍ͷՄೳੑ൱ఆͰ͖ͳ͍… • ݸผͷ rspec Λࢦఆͯ͠ର rspec ֎ͷ controller Λରʹ͍ͯ͠Δ →צҧ͍
·ͱΊ
·ͱΊ • Rails ͔Β Hanami ҠߦɺҠ২ΑΓ ϑϧεΫϥον͢Δํָ͕ʁ • BDD ਏ͍ʢ̎ͭͷҙຯͰʣ
ࠓճΕͳ͔ͬͨ͜ͱ • ίϯςφԽͯ͠ͷੑೳଌఆ • Hanami ͷ hack
Έͳ͞ΜɺHanami ʹ ڵຯͪ·ͨ͠ʁ
Έͳ͞ΜɺՖݟʹ ڵຯ͋Γ·͔͢ʁ
ՖݟΛ͠·͠ΐ͏
དྷͷ 4/18 ~ 4/20 ࠒʹ
Ԭࠃࡍձٞ͋ͨΓͰ
RubyKaigi in Ԭ https://rubykaigi.org/2019
࠷ޙʹ
RubyKaigi 2019 ӡӦελοϑืूதʂ ڵຯͷ͋Δํ Fukuoka.rb ͓ӽ͍ͩ͘͠͞ʂ
Fukuoka.rb #107 Rails LT ಛू https://fukuokarb.connpass.com/event/101452/