Giter Club home page Giter Club logo

test-task-solution's Introduction

General info

Hello, my name is Kostya. This is my solution of your test task. Using it, you can join two or more JSON data sources (urls, .json or .csv files). To solve it I have used Hibernate and Spring frameworks (while solving it I used SOLID and TDD principles) To run this project you can use Apache Tomcat web server (I used version 9.0.54) (configure this project as web application) or run it locally by using "main" method in Application class.

Functionality

*You can add your links (with protocole name) or files in a dataSources file in format:


fileName="YOUR FILE NAME;
urlName="YOUR URL;

like


fileName="input.json";

or


urlName="https://test-api-heroku.herokuapp.com/testLink/1";

*Also ou can input a single data-source path (url or name of the file located in resources directory) using console

*Moreover, you can run this project as a web app and use "/giveInput" to send url or data-source path interactively

All products from input data sources will be saved into remote DB (mapped using Hibernate), it's properties are already added into application.properties file (you can add your own DB by adding your properties in this file) In order to avoid duplications in DB I have created UniqueFieldDuplicationException, that will be thrown if in input will be two or more objects with different names and same ID. After working out all sources, that you have mentioned, you will receive report of all products and their amounts in console.

To test it I have created own API, you can also try to use it. It is available by link api link (its possible to generate as many test links as we need by setting request param, up to BigInteger size) or look through it source code on its repository api repo

Structure

In this project I used N-tier (multi-tier) architecture concept and divide all app into three layers:

*Presentation level
*Service level
*Data access (dao) level

Each of them has a specific responsibility, logic of working out an input in different layers is separated.

test-task-solution's People

Contributors

konstde00 avatar

Watchers

 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.