Week 7 Reflection

2–3 minutes

This week, I worked on a weather app that fetched live data from an API using setInterval. The app displayed weather details for Norwich, including a blue filter that changed based on humidity and animated leaves moving according to wind speed. We used JSON to store and manage the data and Postman to test the API calls. To access the data, I obtained an API key from WeatherStack, which allowed the app to retrieve real-time weather information.

I really enjoyed working with live data because it made the app feel dynamic and interactive. Watching the weather data update in real-time was fascinating, and the animations added a fun and engaging layer to the user experience. However, managing the setInterval function to ensure data was fetched consistently at the right intervals was a bit tricky at first. Once I obtained the API key and tested the data using Postman, I gained a better understanding of how to handle API requests effectively.

The project was enjoyable overall, but the biggest challenge I faced was optimizing repeated requests to avoid overloading the system. JSON made it easy to structure and store the data in a readable format, and Postman allowed me to verify that the API calls were working correctly, and the data was accurate. This experience helped me understand the importance of managing API requests efficiently to maintain app performance and prevent unnecessary data retrieval.

Looking ahead, I plan to explore rate limiting and asynchronous programming to better handle repeated API requests and ensure that data fetching doesn’t negatively affect performance. I also want to focus on error handling and data validation, which will be crucial for creating smoother user experiences in future projects. Additionally, this week I learned the importance of securing API keys to protect sensitive data when working with external APIs.

This week’s work reinforced how important it is to optimize data-fetching processes and secure the information handled by APIs. I learned how to integrate live data into applications and create dynamic, real-time updates, but I also recognized that too many repeated requests can lead to performance issues. Moving forward, I plan to refine my approach to managing API requests, ensuring both performance and security are maintained throughout my projects.