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

General Discussion

Advices about technology to use to reuse as much code as possible

Hi community, this is a question I still have to think a lot about it and I'd like to share with you to give me the best technically possible solution.

In short: I want to track the position of my car in real time. The idea is from my car (via arduino, gps and 3G) send the location and store it in a server. Then, this location information will be consumed via an API programmed by me. This is my first question, do you think an API would be the best way to consume the information? I think so, but I want to know what do you think. I want to consume this info from a web app and from mobile apps. For this reason, I think that I could reuse the backend if I serve this info via api.

Then comes the second question. Real time tracking position will be represented in google maps. And I want to use the same or almost the same code in my web app and in my mobile apps. Is this possible? Or I'll have to write similar code in Java for Android, similar code in Swift for IOs and similar code if I program the web in javascript, c#, python, ....?

I'm waiting for your responses and thank you very much.

Albert