Skip to content

Instantly share code, notes, and snippets.

View dimabory's full-sized avatar
💭
🦁

Dmytro Borysovskyi dimabory

💭
🦁
View GitHub Profile
@dimabory
dimabory / kays_oop
Last active February 14, 2019 08:46
Alan Kays Definition Of Object Oriented
http://wiki.c2.com/?AlanKaysDefinitionOfObjectOriented
1. Everything Is An Object.
2. Objects communicate by sending and receiving messages (in terms of objects).
3. Objects have their own memory (in terms of objects).
4. Every object is an instance of a class (which must be an object).
5. The class holds the shared behavior for its instances (in the form of objects in a program list)
6. To eval a program list, control is passed to the first object and the remainder is treated as its message.
This definition is derived from early versions of Smalltalk (Smalltalk-72?), and rules 5 and 6 clearly show Smalltalk's Lisp heritage. Kay remarked as such, noting that rules 4-6 would mutate as Smalltalk developed.
@dimabory
dimabory / law-of-demetra.md
Last active February 11, 2019 09:20
Law of Demeter
  • Each unit should have only limited knowledge about other units: only units "closely" related to the current unit.
  • Each unit should only talk to its friends; don't talk to strangers.
  • Only talk to your immediate friends.

https://www2.ccs.neu.edu/research/demeter/demeter-method/LawOfDemeter/paper-boy/demeter.pdf

More formally, the Law of Demeter for functions requires that a method m of an object O may only invoke the methods of the following kinds of objects:

  1. O itself
@dimabory
dimabory / .md
Last active February 4, 2019 08:31
ddd-style project structure (WIP)
@dimabory
dimabory / gist:56e36474a1bb5573c08f26805a978fb5
Last active July 22, 2023 08:41
General Responsibility Assignment Software Patterns (GRASP)
@dimabory
dimabory / vo|dto.md
Last active January 31, 2019 14:31
VO, DTO
VO DTO
Data yes yes
Logic yes no
Identity no no
Immutability yes no

VO

final class Address
@dimabory
dimabory / gist:20da391838eb19a99973b9d213c77842
Created January 31, 2019 10:41
Message broker protocols

MQTT - Message Queue Telemetry Transport

http://mqtt.org

MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks. The design principles are to minimise network bandwidth and device resource requirements whilst also attempting to ensure reliability and some degree of assurance of delivery. These principles also turn out to make the protocol ideal of the emerging “machine-to-machine” (M2M) or “Internet of Things” world of connected devices, and for mobile applications where bandwidth and battery power are at a premium.

AMQP - Advanced Message Queueing Protocol

https://www.amqp.org/

The Advanced Message Queuing Protocol (AMQP) is an open standard for passing business messages between applications or organizations. It connects systems, feeds business processes with the information they need and reliably transmits onward the instructions that achieve the

@dimabory
dimabory / 3.md
Last active February 7, 2019 12:04
three words which are taking over the world

(DDD) Domain Driven Design
(TDD) Test-Driven Development
(BDD) Behavior-Driven Development
(TBD) Trunk Based Development

(MDA) Model Driven Architecture

(MVC, MVP, MMVM) Model-View-Controller, ...
(ADR) - Action Domain Responder

@dimabory
dimabory / ddd_glossary.md
Last active April 8, 2024 16:40
Implementing Domain-Driven Design by Vaughn Vernon
  • Ubiquitous Language
  • Bounded Context
  • Context Map
  • Domain, Aggregate, Domain Events
  • Entities, Value Objects, Services, Repositories

The Ubiquitous Language is a shared language developed by the team—a team composed of both domain experts and software developers.

A Bounded Context is an explicit boundary within which a domain model exists. Inside the boundary all terms and phrases of the Ubiquitous Language have specific meaning, and the model reflects the Language with exactness.

@dimabory
dimabory / async.md
Last active January 28, 2019 13:03
Async PHP implementtions