Giter Site home page Giter Site logo

event-driven-architecture's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @lukaswilkeer
  • ๐Ÿ‘€ Iโ€™m interested in javascriprt, nodejs, functional and imperative languages.
  • ๐ŸŒฑ Iโ€™m currently learning/praticing imperative code style on nodejs enviroments.
  • ๐Ÿ’ž๏ธ Iโ€™m looking to collaborate projects that involves streamable interfaces.
  • ๐Ÿ“ซ How to reach me! Infos are on my profile.

event-driven-architecture's People

Contributors

lukaswilkeer avatar

Stargazers

 avatar

Watchers

 avatar  avatar

event-driven-architecture's Issues

Differences between OOP, imperative and functional design

OOP

On a OOP design, the events can be triggered by calling a dispatcher, that instantiate a new class and calling the derived function. On the first hand, we can conclude that's is just call a function without instantiate a class and this cost less, but introduces a problem. Every function that is a event must receive a (socket, buffer) parameters, in a large codebase can lead to a painful maintenance.There will be an explicit error on system design if you choose this path, that are: multiple calls can lead to a "overloading" of data, (I'm not mentioning methods). In general terms, the data stored on a static var can simple be suppressed/substituted causing and error on how the program handles that specif event. So, there's a necessity to instantiate a new object for every income request. Not much performative but we can count with the GC.

This links to a OOP implementation

Imperative

The problem is between the chair and the keyboard. Easy maintenance, hard to discipline yourself to not construct a outdated codebase. On that case, the process of maintain the codebase become such a painful disaster. So, unit and integration tests is a must have.

Functional

On other hand, despite the fact that is somewhat is something like, the problem of chair-keyboard turns nullish. In contrast we will need to use such tools like Flow and linters to maintain the integrity of the code.

The problem of maintence become less painfull due to the fact that we have types. One change can break a lot of things but we know why.

The cost of this way is what we can call 'functional price', more memory usage due to multiples compositions or more functions declarations,
flow-types parser and etc. In general, a program written is pure functional style is expected to cost more than a program on a imperative style, but introduces such benefits that this all can be reconsidered.

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.