Coder Social home page Coder Social logo

curcon's Introduction

The DRY & SOLID Currency Converter

THIS LINE IS HEAR FOR THE SAKE OF THIS EXERCISE

purpose

The aim of this project is to:

  • write a currency converter
  • use Node.Js on the back end
  • follow the DRY and SOLID principles of clean code
  • have a command line UI with powershell
  • separate the UI layer from the main program and support an easy addition / removal of various types of input mechanisms (console, input into sourcefile, csv files)
  • data-validation for the front-end input, checking the currency keys against an array from the requested JSON
  • have a web application UI / layer
  • the idea of the code is to allow as many UIs as possible via the proper separation of the service and UI layer via the proper use of principles of OOP, DRY and SOLID

  • this is a rough sketch

instructions

  • download, navigate to ./ui > powershell and run curcon.bat
    • node is required to have on client
    • still windows-based, powershell front-end
  • you need to have node installed
  • currently, it's running on windows-based powershell, the idea would be to use powershell-core to have this cross-platform
  • if for any reason you'd like to put the variable inside of the source code, navigate to sourceFileInput.js and see the commented section

demo for the PS UI

powershell_ui

todo

  • web server: Node
    • routing should be inspired by the syntax of time.is so you could run the queries directly in the address bar (for.ex/list/eur or foo.bar/convert/1000/eur/czk)
  • web UI: maybe jQuery, but possibly no library or framework, plain stuff
  • csv input type could be a possibility to point the script to the .csv file to iterate over and create an appended copy with the current conversion rate / result

sources

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.