What is the best method to develop the project "Show the Local Weather"?

I want help to get a clear idea of the process for developing my code.

I’m not sure if this is the best way, but it is the process that I used.

  1. Find an API. I ended up using openweather, which is impossible to use with chrome without using a proxy. I did the least mature thing and developed the app in firefox and then had an error message appear if the server couldn’t connect. It wasn’t the best option, I but by this point, I was pretty frustrated, so it was the choice I made.

  2. Figure out how the API works. Look at the documentation to at least get a feel for how the data is organized.

  3. Figure out how to pull the data from the server. At this point you can just log it to the console.

  4. Based on the object returned from the api call and the documentation, figure out what data you want to use. The organization of the data may not make much sense even after looking at the api (for example weather,sys.country is where I found country info, but weather.main.temp was the temperature).

  5. Assign your data to variables and make sure that your variables contain the data the you are expecting.

  6. Design your user interface (e.g. the design of the app)

  7. Display variables values to user (e.g. temperature, conditions)

This is a little bit of an aside, but some people prompted users for a zip code when the geolocation didn’t work. I didn’t do this personally, but I think that it is smart design and if I decide to update or redesign my version,I will have this as a feature.

Also, if you run into an issue search the forums here on FCC, because it is likely an issue that others have had. Of course as you already know, if you can’t find the answer, ask for help.

Happy Coding!

2 Likes

Thank you very much :slight_smile:

I would completely agree with you but with API I think underground weather is better and objects are much organized. https://www.wunderground.com/

1 Like