Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Zach Perry
1,303 PointsBest way to make a web app work for iOS and Android?
Hi! Recently, I've been starting to create a web app/service - which I was hoping to be cross-platform. I wanted to have 'card like' user interface elements that are accessible by search (like the cards in Google Now and Pinterest) be accessible by web app, iOS, and Android. Is there a way to have that data and those design elements work on all those platforms, without having to rewrite the service the entire time? If there is a way ... is there a tutorial on how to do this. I found a site called Meteor (www.meteor.com) but I didn't know if it solve this problem. Pretty much, I just wanted to create a web app first - but is there a way to scale that to other platforms without rewriting almost everything or it being incredibly painful? Making an api perhaps? Any help or advice is greatly appreciated! Thank you for your time
1 Answer

Brad Zickafoose
7,726 PointsHi Zach,
To answer your question, yes, there is a way. You should look into creating hybrid mobile apps—which are a native wrapper around a mobile web core.
You would basically setup variants of your website for desktop, phone and tablet—each with their own set of templates, images, CSS and Javascript assets. When your web app detects a mobile device or a native app declares itself, your web app renders the appropriate variant—whether phone or tablet.
If you want some inspiration on how this could be done, check out the link below from Basecamp. They used this exact method to take their desktop browser experience (built with Ruby on Rails) to create phone and tablet variants that could be used within their iPhone, iPad, Android and Kindle hybrid apps.
https://signalvnoise.com/posts/3766-hybrid-how-we-took-basecamp-multi-platform-with-a-tiny-team
Hope that helps.
Good luck,
BZ