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
390
TRICK 2022 に入選した話
jinroq
0
210
RubyKaigiとMicrosoftと私
jinroq
0
170
msgraph: Microsoft Graph API Client with Ruby
jinroq
0
260
Fukuoka.rb 2019活動報告・2020抱負
jinroq
0
250
福岡の方から参りました Fukuoka.rb です
jinroq
0
1.7k
Microsoft Graph API Client and OpenAPI
jinroq
0
950
Fukuoka.rb #150 LT
jinroq
0
260
5 分で分かるアイキューブドシステムズ
jinroq
0
530
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Six Lessons from altMBA
skipperchong
27
3.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
97
Product Roadmaps are Hard
iamctodd
PRO
49
11k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Facilitating Awesome Meetings
lara
50
6.1k
Code Reviewing Like a Champion
maltzj
520
39k
How to Ace a Technical Interview
jacobian
276
23k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
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/