Spring Tips: @Controllers: give HTTP a REST

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

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

  • @JentaroYusong
    @JentaroYusong 3 ปีที่แล้ว +11

    Please make a video about a more domain-centric API design, maybe with CQ(R)S.
    In my experience, level 2 "REST" APIs are oftentimes just "database CRUD over HTTP", leading to leakage of implementation details into the public API of the service, which results between high coupling between a client and the server implementation, which is a malpractice in my opinion.
    Despite that you loose semantic information about the actions performed in your system early on, as you push the usecases of the domain upwards, basically to the clients.
    For example, what does a "PATCH /api/todo-items/3" mean? Has the TODOs title been changed? Has it been ticked of? Marked as irrelevant? Has someone been assigned to the task? A combination of these actions? Compare this with a more domain-centric command based API design, e.g. "POST /api/commands/tick-todo-item { id: 3 }".
    I personally think the latter one is far more descriptive and does not loose the domain semantics early on.
    Don't get me wrong here. I think a more resource based approach can be useful, e.g. for more "backing services", but the more an API is designed for a specific domain problem, that being "closer to the end users", the less REST is helpful in my opinion.

    • @rebelsdeveloper367
      @rebelsdeveloper367 3 ปีที่แล้ว

      big word there . why limit rest or url ? the old way you dont have think one endpoint is enough . you dont need /api/read / api/update/id. This style of routing much better for web crawling but no point on intranet application.

  • @chrizzking
    @chrizzking 2 ปีที่แล้ว +2

    Nerd tv at its best 👌

  • @30harshal
    @30harshal 3 ปีที่แล้ว +4

    rest in peace

  • @zickzack987
    @zickzack987 3 ปีที่แล้ว +1

    Umm... Sudden end. Where is the rest part?

  • @nmdollarl8798
    @nmdollarl8798 3 ปีที่แล้ว +1

    Dr Strange? magic

  • @wazeeharaa8100
    @wazeeharaa8100 3 ปีที่แล้ว +2

    Man what are you coming to say

  • @RajeshKumar5
    @RajeshKumar5 3 ปีที่แล้ว

    Good

  • @s1n7ax
    @s1n7ax 3 ปีที่แล้ว

    that screen recording is in 144p

  • @mrrishiraj88
    @mrrishiraj88 3 ปีที่แล้ว

    Hi

  • @sethunder332
    @sethunder332 2 ปีที่แล้ว

    I think it's not for beginners.

  • @juliuspms
    @juliuspms 3 ปีที่แล้ว +2

    What a long and boring video...