TRAILBLAZERbez Trailblazera !
View Slide
Krzysztof WawerGITHUB: wafcioTWITTER: @KrzysztofWawerO MNIE
reformroarView Model(Presenter)
REFORM• Form Object• opcjonalna integracja z ActiveRecord• zagnieżdżone formularzeprzykład: https://github.com/gogogarrett/reform_example
REFORMAlternatywa -> np. Virtushttps://github.com/solnic/virtus
ROARrepresentableroarroar-railsMapowanie klas do JSON, XML
ROUTING ZASOBÓWW RUBY ON RAILSdestroyupdateeditshowcreatenewindex
OPERATION1. wyświetlenie formularza2. wykonanie operacji3. wyświetlenie wynikuhttps://github.com/apotonick/gemgem-trbrb/blob/master/app/concepts/comment/crud.rbhttps://github.com/apotonick/gemgem-trbrb/blob/master/app/concepts/thing/crud.rb
OPERATIONAlternatywa:• Virtus (jako contract)• ServiceObject (jako process)
CELL• View Model• brak helperów, czy na pewno ?https://github.com/apotonick/cells
CELLAlternatywa:• Kontroler• Widok
WNIOSKI• Trailblazer - więcej „magii”• Tylko Ruby on Rails• „Buy my book on leanpub…” - zdecyduj sam
KONIEC