RailsConf 2017: In Relentless Pursuit of REST by Derek Prior

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 พ.ย. 2024

ความคิดเห็น • 12

  • @deadleaves1985
    @deadleaves1985 7 ปีที่แล้ว +7

    One of the best talks of entire conference. Great work, Derek!

    • @derekprior
      @derekprior 7 ปีที่แล้ว +3

      Thank you!

  • @alexdunae
    @alexdunae 7 ปีที่แล้ว +1

    Nice one. I'm a podcast listener and totally enjoyed your talk

  • @thiagoguimaraes9310
    @thiagoguimaraes9310 3 หลายเดือนก่อน

    I didn't understand how to best implement a system machine. Current, I'm working on a project that has a model X and it has a lot of status, and each status has a transaction to another one, and do a lot of things when changed. i would like to know more about how to avoid these transactions and use a restfull approach

  • @JohnDoe-zc3fg
    @JohnDoe-zc3fg 6 ปีที่แล้ว +2

    Great stuff about featured flag on photos. But "there can be only one featured photo" requirement was like a trigger for me. I immediately thought that it would be even better to create a separate resource featured_photo with only update action. This action should accept only one parameter: photo id. But then there will be several ways in which we can handle unfeaturing of the photo. And none of them are intuitive enough.

  • @erikecoologic
    @erikecoologic 5 ปีที่แล้ว +1

    Being restful makes things much easier. Avoiding State machine gems is the way to go, they couple data with behaviour. Models should ONLY read/write their data. Having nested actions for every state transaction? Seems very reasonable. Thanks

  • @andreimotinga1826
    @andreimotinga1826 7 ปีที่แล้ว +1

    I got a question,
    what does
    ```
    new(photo).call
    ```
    do ?
    here's the timestamp - th-cam.com/video/HctYHe-YjnE/w-d-xo.html

    • @derekprior
      @derekprior 7 ปีที่แล้ว +1

      That calls `new` on the current class, so it's equivalent to `AddFeatureFlag.new(photo).call`

    • @andreimotinga1826
      @andreimotinga1826 7 ปีที่แล้ว

      Thank you. Yeah, I should've got it. I guess I got confused cause never saw it before.

  • @j.r.4718
    @j.r.4718 4 ปีที่แล้ว

    👌🏽