GithubHelp home page GithubHelp logo

onavarrette / rock-paper-scissor-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from virtualsharif/rock-paper-scissor

0.0 0.0 0.0 70 KB

Game build on RESTful API

License: GNU General Public License v3.0

Java 100.00%

rock-paper-scissor-1's Introduction

##Rock Paper Scissor

This project is based on Spring boot application

Technology used

  • Java 8 : programming language
  • Spring boot : Web application
  • H2 : In-Memory Database
  • Maven : Building project
  • Swagger : RESTful Documentation

Web Application configuration

  • Web Application is running on port 9119
  • You can change the configuration in application.properties

Steps to run the project

Prerequisite

  • Maven
  • Java 8 or higher

Start the application

Through following command:

mvn clean install spring-boot:run 

Maven will install all the dependencies and followed by run the application

To test the application

http://localhost:9119/swagger-ui.html

Architectural points and Terminologies used in the project

Game rules

  • Rock beats Scissors
  • Scissors beats Paper
  • Paper beats Rock

Modularise

For the time being I have modularise the project on package level. Later we can also modularise in maven modules.

RESTful API design

Backend consists RESTful APIs all starts with /api/v1 because of following reasons:

  • Api versioning can be done in future. (followed java principle: Open for extension and closed for modification)

Trying out and documentation for RESTful APIs

Swagger is already integrated and can be used for using API instead of curl.

http://localhost:9119/swagger-ui.html

Comments in code

Entire code styling is influenced by Clean Code principle - Robert Martin Which says 'Truth can only be found in one place: the code’. So you may not found any comments anywhere in the project. Keeping in mind that git can be used to versioning of file and method, class names should be kept as self explanatory.

However, if you need comments on each file. I can do that too.

Design principles used in Project :

  • SOLID (single responsibility, open-closed, Liskov subsitution, interface segragation, dependency inversion) principle
  • Composition over inheritance
  • DRY(Don’t repeat yourself)
  • KISS(Keep it simple, stupid)
  • and some experience principle ;)

rock-paper-scissor-1's People

Contributors

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