Design Patterns – Do Frameworks Make Learning Design Patterns Unnecessary?

design-patternsframeworksjava-eespring

I don't want to say that is not necessary knowing design patterns. I just want to tell you my experience.

I've used Spring frameworks for four years and another frameworks (JSF, Mybatis, Hibernate, etc) in various projects where I've participated (I work as Java Developer). In all this time, I've used few design patterns. Knowing Design patterns haven't been necessary for building medium and inclusive large java web applications.

It's a few shameful saying that I only have used MVC, DAO and Factory patterns. Maybe, other two more…but I don't remember

I'm awareness that It's no good and I should improve (I'm trying to learn more about design patterns).

Firstly, I would like if someone has had the same experience that me. Secondly, if could you give information about Use of design patterns with frameworks Java (This is because is almost impossible I leave to use Java frameworks but I know I need to use design patterns for good practice).

Best Answer

Most frameworks already use a lot of known software design patterns. So you are using design patterns unknowingly.

That said, I would strongly suggest you to try learning at least the most common ones. It's funny.

In the other hand, in a framework, your classes "fall into place" within the design of the framework, but you have to code your business logic anyways. And, in that scope, design patterns do still apply. Patterns do not only apply at an "architechtural" level but also at the level of business logic. Chances are parts of your domain classes or controlers have to solve problems that benefit from some design patterns. The so called behavioral design patterns are most likely to be used in business logic, since most frameworks already take care of the creational and structural aspects.

So the bottomline would be, no. Working mostly with frameworks doesn't mean you can no longer benefit from knowing design patterns. And, as I said before, they are fun to learn and use. To my opinion.

Related Topic