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 trialibrahim Warsame
7,803 PointsHow to get data for your web app.
Hi, I'm making a web app with javascript and i'm wondering if i can get all the data that my website needs from someplace in the internet without having to deploy the information my self. For eksempel i want info about a dog, can i get the picture of a dog their species and where they live, without having to research and add that to my website through html.
1 Answer
James Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 PointsHi Ibrahim,
You would need some sort of database containing information on various dog species. You would then request information from that database, and display it to your users in the 'front-end' of your website. You could either host the database yourself, or request the information from someone else's site via an API.
Databases are normally found in the 'back-end' of a website. So you would need to be comfortable working on the 'server-side' with a language such as PHP or Node.js (server-side javascript).
The database itself, would use a different language such as SQL or MongoDB.
It can be pretty hard to get your head around, and will take some time to learn.
Check out the SQL Basics course for a good starting point on SQL and databases in general.
For a more structured approach, I would recommend working your way through the Full stack JavaScript Track (do the Beginner JavaScript track first if you haven't already) or Beginning PHP Track.
Also see Treehouse Database Courses.
Hope this helps :)
ibrahim Warsame
7,803 Pointsibrahim Warsame
7,803 PointsThanks. that really helped, but is there someplace in the internet that offers free databases for certaing type of things like dogs for eksempel.
James Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 PointsJames Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 PointsApologies for the late reply.
I don't know of any place that offers all kinds of free databases, but there are a couple such as:
Google has a bunch of APIs for their various services, e.g Google Maps
If you do a google search for "Dog database" you should get plenty of results.
You will never find exactly what you are looking for though, unless you collect and organise all the data yourself.
Hope this helps :)