DEV Community

Discussion on: Design Patterns Discussion

smartcodinghub profile image
Oscar • Edited on

Well, if you are using a frontend separated from the backend, you can use an MVVM + DDD approach.

Use MVVM only in your frontend (React, Angular, JQuery, Vanilla). This way helps to separate concerns and easily create logic only for the U.I.

Use DDD on PHP. You will need to use an MVC framework for creating, i.e., REST services. But using an MVC framework doesn't mean to follow an MVC pattern fully, and you can add all the DDD functionalities with an Onion, Hexagonal, or N-Tier architecture.

I suggest you dig in these patterns too if you find them helpful.

P.D.: To clarify, this kind of patterns are known as architecture patterns. There are other kinds of patterns known as design patterns.