Adding mobile-specific boilerplate code to your Rails project
If you haven't done so already I strongly recommend setting up some foundation HTML and CSS for your project:
- Rails Views, Doing It Right
- Setting up a Smart HTML Foundation for Rails
- Setting up a Smart CSS Foundation for Rails
When it comes to boilerplate, mobile is a special case. It's a complete different beast . . .
Toggling between callto and tel
Phone numbers on the web create an interesting dilemma, should I use
tel? Like most things on the web, that depends.
Here's the situation, when a user finds a phone number link like this one:
...As developers we can change the links behavior so that when clicked a call is made: through a program like Skype, or just . . .
How to set up mobile device detection in a Rails application using Rails variants and the Browser gem
UPDATED: March 30, 2016
In 2007 I worked for Fidelity Investments helping develop their then new mobile offering. Our goal was to cover 99.999% of all web-enabled mobile phones that Fidelity customers used. To accomplish this we developed a super dumbed down HTML 1.0 template that would render correctly on at least 90% of mobile devices . . .
Using device detection and responsive web design to serve Rails views and assets to different device types
UPDATED: March 13, 2016
I like using "user agent sniffing" to deliver highly optimized versions of a website to different devices. Doing so allows me to really optimize and improve the user experience. What happens though when a device slips through my detection strategy? Let's say it's brand-new and for whatever reason does . . .
How to set up a mobile first Rails application using Rails variants and the Browser gem for device detection
UPDATED: March 30, 2016
If you have been reading the last couple articles you know I am a big fan of Mobvious. I use it to figure out what kind of device any given request has come from, i.e. tablet, PC, phone?
With this information Rails then serves optimized content for that device:
Adding mobile boilerplate files and configuring Rails to serve mobile specific files from a separate mobile folder
Now that we have Mobvious set up – if you've been following along from the last article – here is how we will use it:
- Rails detects the device type through Mobvious
- If the device is a standard desktop computer, Rails will serve regular view files
- If the device is a mobile device, then Rails will serve files from a special folder . . .
How to set up Mobvious to serve device specific scripts, markup and CSS
In 2007 I worked for Fidelity Investments, helping develop their then new mobile offering. Our goal was to cover 99.999% of all web-enabled mobile phones that Fidelity customers used. To accomplish this we developed a super dumbed down HTML 1.0 template that would render correctly on at least 90% of mobile devices (then), and for the . . .