Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class library for design patterns in Java? [closed]

I find my self writing again and again the same programming patterns in many new projects. I have been thinking about creating my own reusable library of typical implementations of such patterns -not trying to cover all possible design patterns, but only them that experience has shown that it makes sense to put such typical implementations in a library (e.g., adapter, factory, etc ...)- but before I would like to know if there is not an existing library for this purpose already available for Java?.

I know that it is very difficult to completely generalize programming patterns in a way that they could be reused across different implementations with complex requirements (e.g., composition of patterns, classes participating in more than one pattern, etc ...). However, most of the time the pattern instantiations I need are quite simple and standard, and in many situations the implementation work could be sped up a bit with the use of such a library.

Thanks for your feedback.!

like image 416
Sergio Avatar asked Nov 06 '11 21:11

Sergio


People also ask

Which design pattern is used by runtime library?

Decorator Pattern The decorator design pattern is used to modify the functionality of an object at runtime.

Which of the below classes in core java libraries are examples of factory design patterns?

java. util. Collection#Iterator is a good example of a Factory Method.

Can you name few design patterns used in standard JDK library?

Proxy: The Proxy pattern is used to represent with a simpler object an object that is complex or time consuming to create. Abstract factory: To provide a contract for creating families of related or dependent objects without having to specify their concrete classes.

Can we apply design patterns without Oops?

The idea of design patterns is to take a set of patterns and solve recurrent problems. At the same time (even in the same breath), the patterns reflect good object-oriented programming (OOP) practices. So, we cannot separate OOP from design patterns, nor would we want to do so.


1 Answers

Design pattern are just... patterns. They aren't classes ready to use for anyone, but common concepts found across several projects. That's why you won't find a Design Pattern API.

like image 69
Emmanuel Bourg Avatar answered Oct 24 '22 03:10

Emmanuel Bourg