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

iOS

luke jones
luke jones
8,915 Points

Customer reviews for app.

How does one implement customer reviews into an app? Such as TripAdvisor or HungryHouse. I'm using MySQL if it makes any difference. I'm guessing I have to store and fetch the reviews from somewhere

1 Answer

Yes, you are correct. If you need to have a store of data like reviews which all of your app's users can contribute to and view, this data needs to be accessible to the users' devices, usually on a server on the internet. The iOS track will teach you how you can use an app to fetch data from a server with an API. If you look at other courses on Treehouse, you'll see there are lots of different ways you can create the API on the server side.

MySQL is useful as a database but you generally wouldn't want a mobile app to connect to it directly. You'd usually create some form of server API which would use the database to store its data and have your mobile apps access the API. That way, if your backend system needed to change at some point in the future, as long as the new version supplies an API with the same specification as before, your apps would not need to be changed.

luke jones
luke jones
8,915 Points

My app is actually already fetching and posting data to and from MySQL via PHP. I guess what I should be asking is how can I create a review system in MySQL for my app to make use of. Can I store the reviews in MySQL or do I have to fetch them from elsewhere? I've come across things like http://www.rating-system.com/ but I'm not sure if it's what I should be using.

I'm not sure if I'm getting my message across too well but I hope you can see what I'm trying to do here.