Marius Chiriac
    • Posts
    • Client Server
      • Cookies in development
      • Node: Migrate JS to TS
      • Stripe payment React-Flask
      • Paypal payment React-Flask
    • React
      • React: Migrate JS to TS
    • Unity
      • Design Patterns
        • Chain of Responsibility
        • Command
        • Object Pool
        • Component
      • javascript in WEBGL build
      • Timeline
        • Change timeline dinamically
        • Concatenate Timeline
        • Unity Timeline
    Chain of Responsibility Pattern

    Behavioural Design Pattern applied on unity Pattern explenation Intent Avoid coupling between the sender of a request and the recipient, allowing more than a single object to hear the request. Concatenate the recipient objects and pass the request of object in object until one of these fails to fulfill it. Applications more than one object can handle a request and the receiver who will handle it is not known a priori.

    December 6, 2020 Read
    Commmand Pattern

    Behavioural Pattern. Pattern explenation Intent Encapsulate a request as an object, thereby letting you parametrize clients with different requests, queue or log requests, and support undoable operations. What it solve Need to issue requests to objects without knowing anything about the operation being requested or the receiver of the request. Applications To parameterize objects with respect to an action to be performed To specify, queue and execute requests at different times To allow the cancellation of operations To organize a system into high-level operations which are themselves based on primitive operations Actors Command Specifies an interface for performing a generic operation ConcreteCommand Defines a link between a target object and an action Implement the Execute method by invoking the corresponding method (s) on the Receiver Keeps the data of the action Client Create a concrete instance of Command and set its Receiver Invoker Asks Command to complete the request Keeps the history of ConcreteCommand used Receiver Knows the way to perform the operations associated with a request.

    December 3, 2020 Read
    Component Pattern

    Game Programming Pattern. Pattern explenation Intent Allow a single entity to span multiple domains without coupling the domains to each other What it solve The creation of big classes that are hard to mantain. Applications You have a class that touches multiple domains which you want to keep decoupled from each other. A class is getting massive and hard to work with You want to be able to define a variety of objects that share different capabilities, but using inheritance doesn’t let you pick the parts you want to reuse precisely enough.

    December 3, 2020 Read
    Object Pool Pattern

    Behavioural Pattern. Pattern explenation Intent Improve performance and memory use by reusing objects from a fixed pool instead of allocating and freeing them individually. What it solve Management of list of the same object type Applications To frequently create and destroy objects. Objects are similar in size. Allocating objects on the heap is slow or could lead to memory fragmentation. Each object encapsulates a resource such as a database or network connection that is expensive to acquire and could be reused.

    December 3, 2020 Read
    Navigation
    • About
    • Skills
    • Experiences
    • Recent Posts
    • Projects
    Contact me:
    • Email: redarked@gmail.com
    • Phone: +39 3880947809

    Toha
    © 2021 Marius Chiriac.
    Powered by Hugo Logo