All threads / Multiple Device support with Request Variants in Rails Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Multiple Device support with Request Variants in Rails Discussion

Great video as always! How does this method compare with using responsive design with a CSS framework like Bootstrap or Tailwind? Is this a better method if you want a very specific or completely different look for different devices?

This allows you to have different functionality based on the device type a user access your app from. For example, you could use Hotwire/Turbo to show both a list of records and a detail on the same screen when the app is accessed/viewed from a desktop browser, and do more conventional list > detail individual page views on a mobile phone due to screen size limitations and, for example, inability to hover over links, etc.

The responsive CSS would still be in play for styling and what is shown and how, but you would also be able to use different style sheets altogether based on the device type any single user uses to access the app.

Reply

Rich episode as usual. Thanks for this, Chris!

Reply

This is a great feature. However, one really needs to think twice about branching into different views for different variants. It increases development and testing time significantly.

I wonder how does caching works. Would you create a different key for each variant? Would you included the variant version in the key name?

Reply

Is this going to be a JSP default feature? It would be nice if GoRails had an easy way to indicate which videos specifically apply to Jumpstart by default or is already part of it if we're wanting to learn JSP specifically. Maybe just have a JSP playlist?

Reply

How does this work if say you have a mobile app that's a wrapper for your WebViews, compared to someone using safari/chrome on their mobile device?

Reply
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 53,406+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2021 GoRails, LLC. All rights reserved.