Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why MVC and singleton both are 'design pattern'? [duplicate]

Every literature that is searched said that "MVC - is a design pattern assigns..." and the same such pattern as Singleton describes as "a software design pattern".

But WHY? These are different things that specify concepts on different levels of developing. In one MVC project you can have few Singleton, Factory and Unit of Work for example. But MVC and all these patterns still will be called 'design patterns'.

like image 381
Roman Makarenko Avatar asked Nov 26 '17 06:11

Roman Makarenko


1 Answers

You were confused here with architectural and design pattern. In this case, both are different.

MVC is an architectural pattern where as Single-ton is an design pattern.

Design patterns - are for solving some common technical problems which are addressed using OOPs concepts. Example: How to write a code to have a single object for a single user rather than creating many such objects which results in lack of memory.

Architectural Patters - are for solving software application architecture problems which mostly addresses scalability, reliability, security, etc.,. Example: How easily we can handle an application if its size gets increased ?

like image 151
Sudarson Soundararajan Avatar answered Sep 19 '22 13:09

Sudarson Soundararajan