Do you know any examples of a PAC design pattern?

2019-04-06 03:53发布

问题:

Can anyone point to any websites or web applications that are using the Presentation-Abstraction-Control design pattern rather than MVC? Desktop applications are easy to find like this (e.g.; GIMP) but I'm looking for something on the web.

回答1:

There are more sites using PAC than, I think, people realize. For example, drupal uses the PAC pattern and there are a lot of sites (and a lot of big sites) built with drupal. Many people confuse MVC and PAC. Larry Garfield does a good job explaining the difference and how drupal uses PAC.

In my research on this topic I found more than one open source app/framework that called themselves a MVC architecture when they more accurately fit the PAC pattern. Specifically in the way the model/abstraction, presentation/view, and controller interacted with each other.



回答2:

I suspect most sites written using what is called MVC are in fact using a version of PAC but with a single triad. MVC specifically requires the view to be able to communicate with the model directly without going via the controller. I think many web developers would expect this to always go via the controller regardless of the direction of communication.



回答3:

You have difficulty to get Web application that use PAC because PAC inheritance pattern work well on custom component and custon dialog box that is not really present in the web.

Many framwework use PAC that let you override the presentation, abstraction or control but when used in the web, mostly transform to MVC for it's simplicity (for example, you do not need to have a new level of PAC to change the appearance of a grid... you can use CSS file).

This is the best answer that I can give you.



回答4:

The only example I've seen is in Pattern-Oriented Software Architecture Volume 1: A System Of Patterns.



回答5:

Drupal is a PAC based web framework in written in PHP. :)