Octocat
?
2018/07/13 @treby006
Rails Developers Meetup Day3
• treby (@treby006) Shinjuku.rb
• Repro Dev2
• Rails
• Rails, Vue.js, AWS(ECS, EMR), Go
Repro
• Rails
•
•
•
Repro
• Rails
•
•
•
Commit 2
Additions/Deletions 1
( )
Repro
• Rails
•
•
•
• CTO Contribute
Repro
We are hiring!!
•
• / B to B
•
•
•
• Conference
:
: Technical debt
(design debt)
---- Wikipedia
•
•
•
•
•
•
•
•
• =>
•
•
•
• ( )
•
•
•
•
•
•
•
•
(Rails )
1
DSL/
class SomeDSL
def self.configulation(*args)
end
module Definition
def provide(&definition)
end
end
:
:
end
DSL/
• 0 → 1
•
•
……
DSL/
•
•
• DSL/
DSL/
• Ruby
•
• gem OSS
2
class SomeController < ApplicationController
:
:
def create
@presenter = SomePresenter.new(@some_model)
if @presenter.save
redirect_to :some_path
else
render :new
end
end
end
2
class SomePresenter < PresenterBase
attr_reader :form
delegate :save, to: :form
def initialize(some_model)
@form = SomeForm.new(some_model.attributes, self)
end
:
:
end
2
class SomeForm < FormBase
validate :something
:
:
def initialize(params)
:
:
end
end
•
• Rails
•
• ……
SomeForm : Before
class SomeForm < FormBase
validate :something
:
:
def initialize(params)
:
:
end
end
SomeForm : After
class SomeForm < FormBase
validate :something
:
:
attr_reader :presenter
def initialize(params, presenter)
:
@presenter = presenter
:
end
def validate
presenter.some_methods
super
end
end
Presenter : Before
class SomePresenter < PresenterBase
attr_reader :form
delegate :save, to: :form
def initialize(some_model)
@form = SomeForm.new(some_model.attributes, self)
end
:
:
end
Presenter : After
class SomePresenter < PresenterBase
attr_reader :form
def initialize(some_model)
@form = SomeForm.new(some_model.attributes, self)
end
def save
:
@form.save
:
end
:
:
end
•
•
•
•
•
•
•
•
• CI
•
•
•
•
•
•
•
• →
• →
• →
•
•
•
• =>
•
•
•
• ( )
•
:
•
• ( )
•
•
•
•
•
•
• ( )
•
•
• ( )
• ( )
•
•
• ( )
•
https://speakerdeck.com/joker1007/realworld-
domain-model-on-rails
https://speakerdeck.com/joker1007/realworld-
domain-model-on-rails
•
•
•
•
• Rails
•
• CoC (Convention over Configuration)
• Rails Rails
( )
•
•
•
•
• :
• :
!
!
•
•
•
• ( )
•
•
•
•
• ……
We are hiring!!
•
• / B to B
•
•
•
• Conference
Repro Tech Meetup
https://repro-tech.connpass.com/event/94282/
Happy Hacking!!
:

Octocatは技術的負債の夢を見るか?