1.

Why design patterns are important? Name some of the popular design patterns used in iOS?

Answer»

A design pattern is a solution to a specific problem you might encounter while designing an app's architecture. They are templates designed to MAKE coding easier and more reusable for you. Following are some of the design patterns that can be used in iOS: 

MVC (Model-View-Controller): MVC is a design pattern for developing web applications in which three components are connected i.e., view, controller, and model. Views can be conceived as the user interface shown to the end-user at a certain point in time. The model represents the data to be shown on the view. The controller ACTS as a link between view and model. There is always a relationship between these three components. 

MVVM (Model-View-View Model): Unlike MVM, there is a SPECIAL layer in MVVM called the View Model between the View and the Model. Using a view model, model information can be transformed into values that can be displayed on the view. There is a binding link between the view and View model that allows the view model to share updates with the view. 

Facade: The facade design pattern provides a simplified (but limited) interface to a complex set of classes, libraries or frameworks. As OPPOSED to providing the user with a set of classes and their APIs, you instead provide a simple, unified API. While Facade helps to reduce overall application complexity, it also helps to move unwanted dependencies to a single location. 



Discussion

No Comment Found