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
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
It's Worth the Effort
3n
183
28k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
30
2.1k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Designing Experiences People Love
moore
139
23k
The Cult of Friendly URLs
andyhume
78
6.1k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
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/