GithubHelp home page GithubHelp logo

geeksilva97 / clean-calculator Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 45 KB

A calculator implemented following Clean/Hexagonal Architecture

Elixir 69.05% CSS 22.72% JavaScript 3.05% HTML 5.18%
elixir elixir-lang phoenix architecture clean-architecture ddd domain-driven-design functional-programming hexagonal-architecture ports-and-adapters

clean-calculator's Introduction

Clean Caculator (Calculator.Umbrella)

This project is a simple calculator but implemented using mostly the Hexagonal Architecture principles (a bit of Clean Architecture too). This project was created for study purposes only.

This is a umbrella project created by running mix phx.new project_name --umbrella --no-ecto. Each app in this project intend to represent a layer. The folder structure itself doesn't matter.

Motivation

I haven't seen implementations of such patterns in Elixir so I decided to start workin on my own. If you are a experient Elixir developer or an architect you found something you can improve in this project. Your suggestions are welcome, just let me know them.

Features

Our features are pretty simple. This is just a calculator which performs the basic four math operations (sum, sub, div, mult). It's even more simple, our calculator only accepts two operators.

The most important here is not the core itself, it's the separation of concerns and application of the patterns. The domain is that simple specially to avoid the dispersion. I want to focus in the architecture here.

The features this projects should contain at the end are:

  1. basic math operations;
  2. log of operations;
  3. event tracking (web interface only?);
  4. any storage implementation to have an examle of contract that saves data

Things I want to experiment

  • Definition of domain Entities: done already. Using structs (maybe we can add some metaprogramming to make it better).
  • How to work with interfaces (contracts): not started. We'll define some behaviours for that.
  • Where to put logs (?): not started
  • Where to put analytics stuff (?): not started

References

clean-calculator's People

Contributors

geeksilva97 avatar

Stargazers

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