Tag Archives: Design Patterns

Java 8 Lambda Expression for Design Patterns – Command Design Pattern

via Java 8 Lambda Expression for Design Patterns – Command Design Pattern | gssachdeva.

In this blog I would illustrate implementing the command pattern in functional programming style using Java 8 Lambda expressions. The intent of command pattern is to encapsulate a request as an object, thereby parameterizing clients with different requests, queue or log requests, and support corresponding operations. The command pattern is a way of writing generic code that sequences and executes methods based on run-time decisions. The participants in this pattern are following:

  • Command – Declares an interface for executing an operation.
  • ConcreteCommand – Defines a binding between a Receiver object and an action.
  • Client – Creates a ConcreteCommand instance and sets its receiver.
  • Invoker – Controls the command(s) to carry out the request(s).
  • Receiver – Performs the actual work.

Design Patterns implemented in Swift2

via ochococo/Design-Patterns-In-Swift · GitHub.

A short cheat-sheet with Xcode 7beta Playground (Design-Patterns.playground.zip).

Android Architecture: A simple guide for MVC, MVP and MVVM on Android projects

via Android Architecture — Android & Tech News — Medium.

MVC Design Pattern splits an application into three main aspects: Model, View and Controller. It forces a separation of concerns, it means domain model and controller logic are decoupled from user interface (view). As a result maintenance and testing of the application become simpler and easier.

11 Handy Shortcuts for Customizing Any Selectable UI Element

via Common Design Patterns for Selectable UI Elements.

Online forms are some of the most common interfaces for user interaction. Many web fields rely on user input from the keyboard, but others have prefilled answers waiting to be selected. These may include checkboxes, file inputs, or even select dropdowns.

Although select menus are fantastic they can also be a little boring. All web design should be functional, but great web design incorporates pleasant aesthetics too.

The following ideas center around selectable UI elements for website layouts. Web designers often like to design their own custom fields which best-suit the project at hand. Select menus and similar inputs can be tricky to customize, but modern techniques make the process a whole lot easier. Check out these plugins and code snippets which can be perfect for customizing any form field.

Fundamental NodeJS Design Patterns

via Fundamental Node.js Design Patterns – RisingStack.

When talking about design patterns you may think of singletons, observers or factories. This article is not exclusively dedicated to them but deals with other common patterns as well, like dependency injection or middlewares.

Design Patterns in the 21st Century: The Abstract Factory Pattern

via Codurance – Design Patterns in the 21st Century: The Abstract Factory Pattern.

This pattern is used everywhere in Java code, especially in more “enterprisey” code bases. It involves an interface and an implementation. The interface looks something like this:

Video: JavaScript Design Patterns

We’ve come a long way down the JavaScript road. Gone are the days of ‘just hack it’ for the web – architecting even a small project in JavaScript can be a challenge. Thankfully, there are several frameworks to help you; the most popular currently is AngularJS.

Before you start using a framework in JavaScript, you will want to understand the techniques expert JavaScript programmers use to build them. In this session, we’ll dive into design patterns in JavaScript, and do live coding so you can see these patterns applied. Even if you’re not using a framework, you can use these design patterns to make your code more maintainabile, elegant, and concise.