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.1k
みんなで 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
400
TRICK 2022 に入選した話
jinroq
0
220
RubyKaigiとMicrosoftと私
jinroq
0
180
msgraph: Microsoft Graph API Client with Ruby
jinroq
0
270
Fukuoka.rb 2019活動報告・2020抱負
jinroq
0
250
福岡の方から参りました Fukuoka.rb です
jinroq
0
1.7k
Microsoft Graph API Client and OpenAPI
jinroq
0
960
Fukuoka.rb #150 LT
jinroq
0
260
5 分で分かるアイキューブドシステムズ
jinroq
0
530
Featured
See All Featured
Designing for Performance
lara
604
68k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Designing for humans not robots
tammielis
250
25k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
790
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
How GitHub (no longer) Works
holman
310
140k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
A better future with KSS
kneath
238
17k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
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/