Is ViewComponent the Future of Rails?

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024

Комментарии • 31

  • @SebastianSastre
    @SebastianSastre 11 месяцев назад +1

    Fantastic review. Really fair evaluation.

    • @mixandgo
      @mixandgo  11 месяцев назад

      Thanks for watching Sebastian

  • @RogerAlmeida82
    @RogerAlmeida82 Год назад +1

    What is that chrome extension that fill the form automatically? 🤔

    • @mixandgo
      @mixandgo  Год назад

      chrome.google.com/webstore/detail/fake-filler/bnjjngeaknajbdcgpfkgnonkmififhfo

  • @mdrenovac
    @mdrenovac 2 года назад

    you have a misspelling on one of your links above, instead of 'mixandgo', you've for 'mxiandgo'..

    • @mixandgo
      @mixandgo  2 года назад

      Thank you Martin

  • @ashutoshdevshali2933
    @ashutoshdevshali2933 2 года назад +1

    I am under the impression that we should be using the rails api and any of js framework in frontend to build new applications. Now that stimulus and viewcomponent is here what do you think can these be used instead? Is it worth learning and using? I want to know your thoughts on this

    • @mixandgo
      @mixandgo  2 года назад +1

      Of course. That is exactly why Hotwire is so interesting.
      Instead of building two different apps, not to mention all the challenges that come with that, you only build one.

    • @ashutoshdevshali2933
      @ashutoshdevshali2933 2 года назад

      @@mixandgo thank you for the reply. I will be learning to work with hotwire and see what I have been missing.

    • @silencipher
      @silencipher 2 года назад +2

      I also have the same impression. Rails asset pipeline changes frequently and upgrading rails versions is a pain because of this. Using rails for apis only and using a frontend framework seems to use the best of both worlds

    • @mixandgo
      @mixandgo  2 года назад +3

      @@silencipher I disagree. To me, Hotwire is the way to go.

  • @denisbolomier3577
    @denisbolomier3577 2 года назад +1

    thx for this video !

  • @DevBishwasBh
    @DevBishwasBh 2 года назад +1

    Thanks for sharing.

    • @mixandgo
      @mixandgo  2 года назад

      Glad you liked it

  • @gamerneversleep4200
    @gamerneversleep4200 2 года назад

    i just started learning rails

  • @dfriis
    @dfriis Год назад

    Thanks for the video! I like how you look both at what's good and what could be better. I'm curious why not just use partials to obtain the same benefits you mention (reusability, design system, etc.)?

    • @mixandgo
      @mixandgo  Год назад +1

      It's possible to do that using partials. It's just that this library makes it a bit easier if you're willing to depend on a 3rd party library for that.
      But you should always think twice about using a library for such a big part of your app. History has proven that's often a bad idea.
      Personally, I like to stick to partials as much as possible.

    • @dfriis
      @dfriis Год назад

      @@mixandgo Thanks for sharing. That was exactly my thinking. I feel I've been down this path before with a 'clever' new approach that turns out to be more of a burden later.

    • @mixandgo
      @mixandgo  Год назад +1

      @@dfriis yup, same here.

  • @JarmamStuff
    @JarmamStuff 2 года назад +1

    I appreciate that you gave it a good in-depth look and worked to find the useful aspects. I just can't shake the feeling that this is pretty over-engineered even for what it *is* able to achieve. You mention that with some updates this might become more useful - what additions could you imagine to make this a good pickup?

    • @mixandgo
      @mixandgo  2 года назад +2

      I would love to see an easy way to isolate and/or incorporate all dependencies, so if for example you have a form that depends on a controller, or some non-global css.
      A gem (like devise) would be a close example.
      What I'm going for is, plug and play functionality. Forms are the first thing that comes to mind.

  • @siyaram2855
    @siyaram2855 Год назад

    reusable? ain't partial does that job?

  • @crr4141
    @crr4141 2 года назад

    Man but is not a good idea create a lot of components wrapped in helpers, uf you create a lot of helpers your aplications run slow because helpers is loading in the initial time when start your aplication for this reason was creating concept as drapoer to create decorator and load in demand. What do you opinion?

    • @mixandgo
      @mixandgo  2 года назад

      I don't think that's the case... why do you say that?

  • @siyaram2855
    @siyaram2855 Год назад

    Does it make sense for regular web apps?
    At first it makes sense, then you see the complexity of the code going uphill.
    viewcomponent is produce of react fanboys.
    They want to complicate everything possible in name of testability

  • @sufyaniqbal3636
    @sufyaniqbal3636 2 года назад +1

    Just like Angular components but instead of type script Ruby is involved.

    • @mixandgo
      @mixandgo  2 года назад +2

      I don't think that's a fair comparison. Everything happens on the back-end here. There's no client-side logic at all (unless you add JS).

    • @drnicwilliams
      @drnicwilliams 2 года назад +2

      Right, it’s a component system for server side organisation/rendering, independent of how you might do your JavaScript or CSS.