What is the difference in case of intent and application between these two Patterns? [closed]

With the Factory pattern, you produce instances of implementations (Apple, Banana, Cherry, etc.) of a particular interface — say, IFruit. With the Abstract Factory pattern, you provide a way for anyone to provide their own factory. This allows your warehouse to be either an IFruitFactory or an IJuiceFactory, without requiring your warehouse to know anything … Read more

When do we need decorator pattern?

The Streams in Java – subclasses of InputStream and OutputStream are perfect examples of the decorator pattern. As an example, writing a file to disk: File toWriteTo = new File(“C:\\temp\\tempFile.txt”); OutputStream outputStream = new FileOutputStream(toWriteTo); outputStream.write(“Sample text”.getBytes()); Then should you require some extra functionality regarding the writing to disk: File toWriteTo = new File(“C:\\temp\\tempFile.txt”); OutputStream … Read more

What is a MV* framework?

You’re referring to any framework that implements one of the many MV* (as in, model-view-wildcard) design patterns. There’s MVC (model-view-controller), MVVM (model-view-view model), MVP (model-view-presenter), and probably some more. The * is just a wildcard, not something specific. Read up on it here: http://www.infragistics.com/community/blogs/nanil/archive/2013/04/01/exploring-javascript-mv-frameworks-part-1-hello-backbonejs.aspx

What is the Hexagon design pattern

From http://alistair.cockburn.us/Hexagonal+architecture and https://github.com/jschairb/sandbox/wiki/HexagonalArchitecture Hexagonal Architecture is an architecture defined by establishing a perimeter around the domain of your application and establishing adapters for input/output interactions. By establishing this isolation layer, the application becomes unaware of the nature of the things it’s interacting with. Create your application to work without either a UI or a … Read more

Is AOP a type of decorator pattern?

I would say AOP (Aspect Oriented Programming) is NOT a pattern by itself (and thus not a type of decorator pattern from my POV)… its implementation can be done via one or more patterns (including the use of decorator pattern)… AOP is a programming paradigm IMHO – other paradigms are for example OOP, functional programming … Read more

When not to use IoC and DI? [closed]

About your question about having only one interface implementation. When you use IoC, it is still useful to use an interface. It will be much easier to create real unit tests (that doesn’t depend on the interface implementation to be working correctly) using mocks for these interfaces. The core of using IoC is making code … Read more

Network Communication Design Patterns [closed]

This is a pretty broad question and its treatment likely requires a fairly dense book. I don’t know of any such resource myself, but lets think this through and consider what would be the dimensions of a network communication pattern space: connection modality: { connection-based, connection-less} interaction modality: { synchronous, asynchronous } conversation complexity: { … Read more