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.

  • 相关阅读:
    第五章(6)Libgdx应用框架之接口
    java 源代码中动态加载JAR文件中的类
    curl: (60) SSL certificate problem: unable to get local issuer certificate 错误
    SVN和Git 介绍,区别,优缺点以及适用范围
    B2C电子商务系统研发——商品SKU分析和设计(一)
    电商ERP系统——商品SKU与库存设计
    PHP获取搜索引擎关键词
    一起谈.NET技术,使用VS2010为Windows7编写一个杀手级WPF应用 狼人:
    一起谈.NET技术,关于C# 中的Attribute 特性 狼人:
    一起谈.NET技术,Silverlight同步(Synchronous)调用WCF服务 狼人:
  • 原文地址:https://www.cnblogs.com/cy163/p/1865371.html
Copyright © 2011-2022 走看看