Giter Site home page Giter Site logo

angular-routes's Introduction

angular-routes

This is a very simple demo web application designed as a starting point interviews, training or just experimenting. This demo application uses:

  • AngularJS-2 - UI framework
  • Spring - Dependency injection
  • Bootstrap - CSS styling
  • Selenium - Control a web browser for UI testing (Latest version of FF is not supported yet, Please install Firefox 46.0 or lower to run cucumber UI tests)
  • Cucumber - Behavior Based Development
  • JUnit - Unit testing

There is a single page in the application with one section that lets you increment a counter and another that lets you add two numbers. Both of these features communicate with a Spring controller using REST. The controller then uses the corresponding service to do the work.

The services are tested with unit tests (that end in Test) and the controllers are tested with integration tests (that end in IT). Cucumber is triggered by RunCucumberIT as an integration tests. It will read and execute the .feature files by locating the corresponding steps file (for example DemoSteps.java) and running the correct code for each step.

The steps file will interact with the UI using the Page Object pattern. For example, DemoPage contains the code that tells Selenium how to interact with the page. (This gives you a single place to update if you rename CSS ids or classes for a particular page.)

One problem with many interviews that use coding is that they check the wrong things. Tricky computer science questions may be fun, but there are a number of jobs out there where your ability to modify an existing application following the existing patterns is more important than how quickly you can write a recursive factorial algorithm on a whiteboard.

A suggested project for someone you are wanting to interview would be to take this project and use TDD and BDD to add a new section to the front page that takes a number as an input and returns it as a Roman Numeral.

Some basics for getting the demo app up and running:

Please install web dependencies using following command

go the following folder

demo-angular2/src/main/resources/static

and run following command. which will create node_modules folder with all package.json dependencies

npm install

Run all the unit tests: mvn test

Start the web app, run the tests and then shut it back down: mvn verify

Start the web app using Maven on http://localhost:8080: mvn spring-boot:run

Start the web app from inside an IDE: Run the main method in DemoApplication.java

angular-routes's People

Contributors

faisalloe avatar

Watchers

 avatar  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.