Giter Club home page Giter Club logo

weatherapp's Introduction

The application is developed in two different ways.

  1. Without UI.
  2. With UI.


Without UI
• This is the list of classes for Without UI part
o Project.java
o WeatherThread.java
o ForecastThread.java
o Output.java
o JSONToMap.java
o SaveData.java
o Config.properties
• Without UI I am taking input (City Name) from Config file.
• Then this city name is passed from main class(Project.java) to two different classes (WeatherThread.java and ForecastThread.java) where I have created threads for API’s calls.
• Using city name and APP_ID I have created a URL for API call in respected class (Weather and Forecast).
• I have created an object of Output class in both WeatherThread and ForecastThread classes.
• Output class is responsible for getting JSON format output from API endpoint.
• From both WeatherThread and ForecastThread I have called Output.java for JSON format output by passing their respective URL’s.
• Once I have received JSON format output in WeatherThread.java, I have parsed this data from JSON to Map using JSONToMap.java class.
• Class JSONToMap.java concerts the JSON format to Maps.
• By using Maps properties, I have extracted the Current Temperature of the city.
• Once I get the city name and current temperature, I stored this data to the local MongoDB Database using SaveData.java class.
• In SaveData.java class I have created a WeatherDataBase database and weather Collection using MongoClient method.
• Once City name and Current Temperature is stored, I have displayed the Entire Database in the WeatherThread.java class.



With UI
• This is the list of classes for With UI part
o WeatherUI.java
o Output.java
o JSONToMap.java
• In this part of the project, I have created an application window with Textbox and a submit button.
• For this part, I am taking input as city name from a user not from the config file.
• Once a user enters a city name and submits the button. We get the temperature of the entered city as our output.
• All the process like calling API’s, parsing, etc. is same as Without UI part.



With_UI_1

with_ui_1

With_UI_2

with_ui_2

With_UI_3

with_ui_3

With_UI_4

with_ui_4

Without_UI

without_ui

weatherapp's People

Contributors

asingh72 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.