DesignPatterns

Showing 1-5 of 5 results
EngineeringIcon ChevronTechnology

Ensuring Clean Code: A Look at Python, Parameterized

by Luke Plant

We’ll explore the application of parameterization and how it relates to mainstream design patterns such as dependency injection, strategy, template method, and others. In Python, many of these are made unnecessary by the fact that parameters can be callable objects or classes.

12 minute readContinue Reading
EngineeringIcon ChevronBack-end

The Comprehensive Guide to JavaScript Design Patterns

by Marko Mišura

As a good JavaScript developer, you strive to write clean, healthy, and maintainable code. While you solve interesting and unique challenges, you’ve likely found that you’re often writing code that looks similar to the code for an entirely different problem you’ve handled before. You may not know it, but you’ve used a design pattern.

22 minute readContinue Reading
EngineeringIcon ChevronBack-end

Unity with MVC: How to Level Up Your Game Development

by Eduardo Dias da Costa

In this article I’ll relate my experience with the popular Unity game development platform and the Model-View-Controller (MVC) pattern for game development. In my seven years of development, having wrestled with my fair share of game dev spaghetti, I’ve been achieving great code structure and development speed using this design pattern.

15 minute readContinue Reading
EngineeringIcon ChevronBack-end

Unit Tests, How to Write Testable Code and Why it Matters

by Sergey Kolodiy

In this article, I will show that unit testing itself is quite easy; the real problems that complicate unit testing, and introduce expensive complexity, are a result of poorly-designed, untestable code. We will discuss what makes code hard to test, which anti-patterns and bad practices we should avoid to improve testability, and what other benefits we can achieve by writing testable code. We will see that writing testable code is not just about making testing less troublesome, but about making the code itself more robust, and easier to maintain.

22 minute readContinue Reading
EngineeringIcon ChevronWeb front-end

The Publish-Subscribe Pattern on Rails: An Implementation Tutorial

by Ahmed AbdelHalim

The publish-subscribe pattern] (or pub/sub, for short) is a messaging pattern where senders of messages (publishers), do not program the messages to be sent directly to specific receivers (subscribers). Instead, the programmer "publishes" messages (events), without any knowledge of any subscribers there may be. This article provides insight in how to use the pub/sub pattern, in Rails, to communicate messages between different system components without these components knowing anything about each other's identity.

8 minute readContinue Reading

Join the Toptal® community.