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?

Reply

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
Create an account Log in

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

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

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