zoukankan      html  css  js  c++  java
  • Understanding the PAC framework of Druple

    http://www.webhostinghero.ca/understanding-the-pac-framework-for-drupal.html

    Understanding the PAC Framework for Drupal

    Drupal’s structure is known as a PAC (presentation abstraction control) model which uses a controller to represent logic, a presentation layer for design and an abstraction layer for data.  Similar to an MVC framework, the components are unique and primarily communicate via API. In the structure, the Controller servers as the go between of the Presentation and Abstraction, which is why the templates are generated through function calls. The presentation, therefore, is just a rendering of a template, so you can focus on building out the core of the site and styling via CSS. In order to understand how PAC differs from other framework models, this article provides a theoretical overview of PAC for web development.

    PAC is unique in that the various levels communicate with each other so you can create a broad structure. Sometimes the framework is also known as HMVC, or hierarchical model view controller for its nested structure. With the depth of Drupal sites, it’s much easier to build large sites that can scale across multiple business models.

    For developers and publishers, this framework provides a way to create new membership structures and enables layers of the site to reflect unique presentation. One common example would be in an e-commerce site where the presentation for existing customers could be adapted to reflect their purchasing preferences. In this way you can utilize your site data to optimize its audience specific presentation. With a flexible structure, you can modify your Drupal app to derive more revenue and better value for each visitor.

    How the PAC Structure Impacts the Drupal Model

    In Drupal, the PAC structure provides a flexible framework for scale-able development. Menus in Drupal serve as controllers, which receive input via POST (or GET) functions, while data is stored in nodes, forms and entries in the Abstraction layers and the theme system provides a Presentation layer. While the overall structure may be new to many developers, its consistent logic and streamlined development can help accelerate and scale applications to new levels.

    At the core the control layer plays a crucial role in gathering and transmitting data. With dual feedback between the abstraction and presentation layers, developers should focus on the control as the core of data transmission and structuring. The Presentation layer is solely to render the template, which itself makes API calls from functions as well as styling with CSS. At the back-end, the Abstraction layer provides storage for data in a SQL database (although recent versions of Drupal are compatible with a wide array of options.)

    There are multiple PAC layers within Drupal which allows you to create a dynamic structure so the presentation and functions of the site are conditional upon the user, time or particular section. For example, the controller receives inputs from the user in terms of preferences; it may update the Presentation as well as storing the preference in the Abstraction layer. The controller can then update the child PAC elements so the entire user experience across the application reflects the newly entered preferences.

  • 相关阅读:
    #pragram与#ifndefine防止头文件重复编译的区别
    C++中几种测试程序运行时间的方法
    Android 6.0以上版本权限管理
    dip dp dpi ppi density区别
    github中Android程序导入AS
    《实时控制软件设计》第三组结项总结
    《实时控制软件设计》第三组第八天工作日志
    《实时控制软件设计》第三组第七天工作日志
    《实时控制软件设计》第三组第六天工作日志
    《实时控制软件设计》第三组第五天工作日志
  • 原文地址:https://www.cnblogs.com/cy163/p/1865371.html
Copyright © 2011-2022 走看看