- The web application should have a single web page that has a form input and a button
- When the user enters a valid us zipcode into the form and clicks the button, it should display a page with the city name, state name, and current temperature in fahrenheit.
- If the user puts in an input that is not in the correct format for a zip code (5 numbers) the page should display an error: 'invalid zip code format'
- If the user enters an input that is in the correct format but the zip code does not exist the page should display an error: 'zipcode not found'
- The project should compile, run unit tests and start tomcat using maven
- The project must contain some unit tests
- The unit tests must cover the validation
How to get the weather data: http://www.wunderground.com/weather/api/d/docs?d=data/conditions
The API Key is: ed044d75b91fb500
Hint: The example in the docs uses q/state/city.json, but you can use q/.json instead for example:
http://api.wunderground.com/api/ed044d75b91fb500/conditions/q/94117.json http://api.wunderground.com/api/ed044d75b91fb500/conditions/q/94117.xml
You may choose to use either the JSON or XML api, but please be prepared to explain why you chose the one you did.
- Create a github repository and import the code
- Include a README.md file that has instructions on how to compile, execute the tests, and start the application. Also document any assumptions you've made, known issues with your example, or anything about your thought process during the exercise that you'd like to share.
- Send me a link to the github repository
- Create a very simple site hosted for free on Heroku that consumes this API and displays deals in an appealing manner.
- Languages Heroku supports: https://devcenter.heroku.com/categories/language-support
- Java on Heroku
- Extra credit if it builds in Travis-CI: https://travis-ci.org/
- The code sample must result in a working application by following the instructions you provide in the README file
- The appropriate usage of the following spring annotations: @Controller, @Service, @Configuration, @Value, @RequestMapping, @Bean, @Autowired
- The quality of the unit test. Approach to testing (TDD is ideal, but not required).
- Coding style and readability of code.
Keep the exercise simple. This is not something that should take more than four to eight hours of effort.