SlideShare a Scribd company logo
1 of 43
How We
ACP
Use
(the Abivia Content Pattern

in Website
plug-in)



Developmen
Alan Langford, www.abivia.net
How We Use ACP
●
    What problems does ACP solve
●
    What is a pattern
●
    Walk through a few examples
●
    Questions
About Me
●   Active in FOSS since mid-1990's
●   Involved with Joomla since 2006
●   Founding member of Joomla Security Team
●   Project structure WG
●   Working on Joomla 4.0 architecture
●   Former development team and JBS member
●   Pioneered unit testing in Joomla core
●   Contributor to PHP's PEAR
●   Founded Abivia Web Hosting and Development in 2005
What is ACP?

Abivia Content Pattern Plugin


 A plugin for content that

     separates data          Data




    from presentation
What is a Pattern?

                Template



             Clone to Article



               User Data



              Final Article
Data + Pattern = Page Content

     Article                             Final Article
                       Patterns

 Pattern Reference
                                         Resolved Pattern
     with Data


                          ACP
                       (Runs during
 Pattern Reference   Page Composition)   Resolved Pattern
     with Data
That's Nice But...




   Why Do I Care?
What Does ACP Fix?

Unwanted changes by “WYSIWYG” Editors




               “Just do it in Dreamweaver then paste it in”
What Does ACP Fix?



                                                    ts
                                         ila r forma
                              s with sim
                    ny article
            ning ma
    Maintai
What Does ACP Fix?

              Inde
                   cisiv
                         e   Clien
                                   ts
What Does ACP Fix?

   I liked it better
   with a bigger
   image I know
   kittens     don't
   really go with
   the rest of the
   site but these
     Unwa
   ones are so
            nted
   cute I thought it
                   p
   would be okay resenta
   if we did it just     tion   chan
                                    ges b
   this one time
                                         y   huma
   don't you think                               n edi
   they're cute my                                       tors
   partner      also
   thinks it would
   be nice to put
   up a picture of
   his dog rex and
Advantages of Patterns
Pattern
  ●   Applied during page composition
  ●   Presentation changes have instant effect
  ●   A pattern is just another article

Template
  ●   One time substitution when article added
  ●   Presentation elements are “baked in”
  ●   Users can make unwanted changes to presentation
      elements
Why “pattern”
●   Template is an over used that has too many
    meanings:
    –   Joomla Templates
    –   Content Templater from NoNumber.nl
    –   Other content template solutions
    –   Stand-alone template systems
    –   Template systems built into other extensions
Using Abivia Content Patterns




  A Brief History of ACP
ACP's Humble Beginning
Ordered lists in (older) TinyMCE
 1. Item One
 2. Item Two
 1. Item Three
 2. Item Four
ACP's Humble Beginning
Plug-in to fix lists:        Template body:
   {template ordered-list}       <ol style="...">
   {list Item One}               {for item}
   {list Item Two                  <li>{current}</li>
   {list Item Three}             {end}
   {list Item Four}              </ol>
   {template end}
ACP Evolved

ACP has evolved considerably
●
    Version 2.0
●
    Language features
●
    On the fly CSS injection
●
    Format-specific patterns (html, feed, raw)
●
    Access to Joomla environment
Basic ACP Example

Article                         Biography Pattern
  {acp _pattern biography}       <div>

  {name Jane Doe}                <h3>{acp var name}

  {title CEO}                    {acp ifdef title}

  {body/}                        , <em>{acp var title}</em>

  one or more paragraphs here    {acp end title}

  {/body}                        </h3>

  {acp _end}                     {acp var body}

                                 </div>
Basic ACP Example

Article                         Biography HTML
  {acp _pattern biography}       <div>

  {name Jane Doe}                <h3>Jane Doe,
                                 <em>CEO</em></h3>
  {title CEO}
                                 one or more paragraphs here
  {body/}
                                 </div>
  one or more paragraphs here

  {/body}

  {acp _end}
ACP as a Content Creator

Objective: keep it simple
    {acp _command parameters}
    definition/selection directives
    {acp _end}


Top Level Commands are:
    _pattern, _globals, _with
ACP Pattern References

{acp _pattern alias | title | id}
{varname value}
{acp varname value}
{varname/}value{/varname}
{_list arrayname value1}{_list arrayname value2}
{_open objname}...{_close objname}
{acp _end}
Arrays and Objects? Really??

Useful in many real world situations:
   –   Business Directory
       ●
           Office [1..n]
            –   Address
            –   Staff [1..n]
                  ●
                      Name, title, email, phone, [cell], [fax], etc.

User friendly commands: _list, _open
instead of _array, _object
Globals
●
    Globals are available to all pattern references
     {acp _globals}
     definitions
     {acp _end}
Example of Globals
{acp _globals}
{path /some/file/path/}
{acp _end}
{acp _pattern image}{name x.jpg}{acp _end}
{acp _pattern image}{name y.jpg}{acp _end}



The path variable is available to both calls to the
image pattern.
The Power of _”With”
●
    With selects articles, then applies a pattern
●
    Only article globals are available
●
    Surprisingly powerful feature
     {acp _with pattern}
         {article alias or id...}
         {category catalias or catid...}
     {acp _end}
Processing in a With Command

                                Final Article
                      Pattern
 Master Article                 Resolved Article
 Pattern Reference
         with
  Article Selectors             Resolved Article


                       ACP
                                Resolved Article

   Selected
    Selected
    Selected
     Selected
     Selected
    Articles
    Articles
     Articles
                                Resolved Article
     Articles
      Articles
   ACP Globals
    ACP Globals
    ACP Globals
     ACP Globals
     ACP Globals
                                Resolved Article
ACP as a Developer

ACP has a rich command set
●
    Variable spaces: var, article, request, with
●
    Conditionals: if, ifdef, ifempty, ifview
●
    Looping: for, foreach
●
    Styles: css
●
    More: set, transform, ...
Example: Case Studies
Example: Case Studies
Example: Case Studies
The main article:

    {acp _with bizcase}
        {category business-cases}
    {acp _end}
Example: Case Studies
Global Variables:
●
  date
●
  description
●
  equity
●
  fund
●
  industry
●
  overview
●
  own
●
  role
●
  status (optional)
●
  thesis
Example: Bizcase Pattern
<div class="biz-case">
 <div class="biz-data">
   <p><strong>Sector:</strong> {acp var industry}</p>
   <p><strong>Investment Date:</strong> {acp var date}</p>
   <p><strong>Equity:</strong> {acp var equity}</p>
{acp ifdef status}<p><strong>Status:</strong> {acp var status}</p>{acp end status}
   <p><strong>{acp var fund} Ownership:</strong> {acp var own}</p>
 </div>
 <div class="biz-body">
   <h4>{acp var @with.title}</h4>
   <h5>Company Overview:</h5>
     {acp var overview}
   <h5>Transaction Description:</h5>
     {acp var description}
   <h5>CFI Role:</h5>
     {acp var role}
   <h5>Investment Thesis:</h5>
                                                             Editor Switcher by
     {acp var thesis}
                                                             Anything Digital
 </div>
</div>
Example: Case Studies
Doing it with style:                On-t
                                         he-fl
                                              y CS
                                                   S Ch
{acp css}                                               ange
                                                             s
.biz-body {max-width: 725px;padding-left: 1em;}
div.biz-case {border-top: 3px solid #ef3318;clear:
both;margin-bottom: 24px;}
div.biz-data {background:
url(/images/sections/cs/cs_head_400x260.jpg) no-repeat top
right transparent;min-height: 170px;}
div.biz-data p {margin: 0 16px 8px 24px;}
{acp end}
Example: Multiple Presentations
Example: Multiple Presentations


               One
                   Artic
                        le   – Tw
                                    o Wa
                                        ys t o
                                                 See
                                                     it
Example: Multiple Presentations
{acp _globals}
{jext plg_abiviasupertable}
{j15 1} {j25 1}
{fptitle SuperTable Plugin}
{fpsub Beautiful tables in less than a minute!}
{fptext Abivia's SuperTable Plugin is designed to make your tabular
data pop! SuperTable takes regular tabular data and turns it into a
powerful and dynamic display.}
{acp _end}
Remaining article content...
Example: Multiple Presentations

Extension Thumbnail
<a href="{acp var @with.url}">
 <img class="jthumb"
 src="images/{acp var jext}/thumb.png"
 alt="{acp @with.title}"/>
</a>
Example: Multiple Presentations

Blog Title
<h3><a href="{siteacp var @with.url}">
{acp ifdef fptitle}
  {acp var fptitle}
{acp else fptitle}
  {acp var @with.title}
{acp end fptitle}</a>
{acp ifdef new} <span class="new">NEW!</span>{acp end new}
</h3>
Example: Multiple Presentations

Version buttons
{acp ifdef j25}
   <a href="{acp var @with.url}"><img class="jbutton"
  src="images/buttons/btn-joomla-25.png" alt="Designed for
  Joomla 2.5" title="Designed for Joomla 2.5"/></a>
{acp end j25}
ACP Development & Support
●
    ACP 2.0 just released (free for now)
       ●
           Runs on J 1.5, 2.5 expect 3.0 soon
       ●
           ACP 1.9 has been used in production > 1 year
●
    Code quality:
       ●
           53 unit tests – so far
●
    Documentation:
       ●
           29 page reference manual (with a few examples)
       ●
           Not much tutorial support yet
       ●
           Forums
ACP Future Development
●
    More capable expressions (comparison, math)
●
    Add LESS for Joomla 3.0
●
    Patterns in XML
●
    More “with” selectors
●
    Schemas for pattern data
●
    Graphical Interface / Editor Assist
Questions




                                        ?
Credits:
   Kitten image: goosie-gander (Flickr) used under a CC license.
   Clip art: openclipart.org public domain license
   Image editing: Gimp.org (GPLv3)
   Presentation: LibreOffice.org (LGPLv3)
Contact Information
                 Alan Langford                        u!
                                             Thank yo
                  jal@php.net

           alan.langford@abivia.com
                 www.abivia.net

           Twitter: @FxNxRL, @Abivia
                    ADN: @yyz
                Skype: abivia.com
       also Google+, Facebook, LinkedIn...

More Related Content

Viewers also liked (6)

Glass & Architecture
Glass & ArchitectureGlass & Architecture
Glass & Architecture
 
The Future of ACP-EU Relations: Scenarios for Post Cotonou 2020
The Future of ACP-EU Relations:Scenarios for Post Cotonou 2020The Future of ACP-EU Relations:Scenarios for Post Cotonou 2020
The Future of ACP-EU Relations: Scenarios for Post Cotonou 2020
 
Aluminium composite panel
Aluminium composite panelAluminium composite panel
Aluminium composite panel
 
Aluminium composite panels(acp)
Aluminium composite panels(acp)Aluminium composite panels(acp)
Aluminium composite panels(acp)
 
Google glass ppt
Google glass pptGoogle glass ppt
Google glass ppt
 
Glass
GlassGlass
Glass
 

Similar to How We Use the Abivia Content Pattern (ACP) Plugin in Joomla Website Development

* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, Developer
Linuxmalaysia Malaysia
 

Similar to How We Use the Abivia Content Pattern (ACP) Plugin in Joomla Website Development (20)

Ml pipelines with Apache spark and Apache beam - Ottawa Reactive meetup Augus...
Ml pipelines with Apache spark and Apache beam - Ottawa Reactive meetup Augus...Ml pipelines with Apache spark and Apache beam - Ottawa Reactive meetup Augus...
Ml pipelines with Apache spark and Apache beam - Ottawa Reactive meetup Augus...
 
JavaScripts & jQuery
JavaScripts & jQueryJavaScripts & jQuery
JavaScripts & jQuery
 
Harness The Power Of ACF For Gatsby and WordPress
Harness The Power Of ACF For Gatsby and WordPressHarness The Power Of ACF For Gatsby and WordPress
Harness The Power Of ACF For Gatsby and WordPress
 
Web performance essentials - Goodies
Web performance essentials - GoodiesWeb performance essentials - Goodies
Web performance essentials - Goodies
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
 
JS Essence
JS EssenceJS Essence
JS Essence
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Angular 2 Essential Training
Angular 2 Essential Training Angular 2 Essential Training
Angular 2 Essential Training
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracket
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, Developer
 
Malo Denielou - No shard left behind: Dynamic work rebalancing in Apache Beam
Malo Denielou - No shard left behind: Dynamic work rebalancing in Apache BeamMalo Denielou - No shard left behind: Dynamic work rebalancing in Apache Beam
Malo Denielou - No shard left behind: Dynamic work rebalancing in Apache Beam
 
Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017 Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017
 
Milot Shala - C++ (OSCAL2014)
Milot Shala - C++ (OSCAL2014)Milot Shala - C++ (OSCAL2014)
Milot Shala - C++ (OSCAL2014)
 
Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!
 
Refactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 RecapRefactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 Recap
 
PyGrunn 2017 - Django Performance Unchained - slides
PyGrunn 2017 - Django Performance Unchained - slidesPyGrunn 2017 - Django Performance Unchained - slides
PyGrunn 2017 - Django Performance Unchained - slides
 
templates in Django material : Training available at Baabtra
templates in Django material : Training available at Baabtratemplates in Django material : Training available at Baabtra
templates in Django material : Training available at Baabtra
 
Flink Forward SF 2017: Malo Deniélou - No shard left behind: Dynamic work re...
Flink Forward SF 2017: Malo Deniélou -  No shard left behind: Dynamic work re...Flink Forward SF 2017: Malo Deniélou -  No shard left behind: Dynamic work re...
Flink Forward SF 2017: Malo Deniélou - No shard left behind: Dynamic work re...
 
The Why and What of Pattern Lab
The Why and What of Pattern LabThe Why and What of Pattern Lab
The Why and What of Pattern Lab
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

How We Use the Abivia Content Pattern (ACP) Plugin in Joomla Website Development

  • 1. How We ACP Use (the Abivia Content Pattern in Website plug-in) Developmen Alan Langford, www.abivia.net
  • 2. How We Use ACP ● What problems does ACP solve ● What is a pattern ● Walk through a few examples ● Questions
  • 3. About Me ● Active in FOSS since mid-1990's ● Involved with Joomla since 2006 ● Founding member of Joomla Security Team ● Project structure WG ● Working on Joomla 4.0 architecture ● Former development team and JBS member ● Pioneered unit testing in Joomla core ● Contributor to PHP's PEAR ● Founded Abivia Web Hosting and Development in 2005
  • 4. What is ACP? Abivia Content Pattern Plugin A plugin for content that separates data Data from presentation
  • 5. What is a Pattern? Template Clone to Article User Data Final Article
  • 6. Data + Pattern = Page Content Article Final Article Patterns Pattern Reference Resolved Pattern with Data ACP (Runs during Pattern Reference Page Composition) Resolved Pattern with Data
  • 7. That's Nice But... Why Do I Care?
  • 8. What Does ACP Fix? Unwanted changes by “WYSIWYG” Editors “Just do it in Dreamweaver then paste it in”
  • 9. What Does ACP Fix? ts ila r forma s with sim ny article ning ma Maintai
  • 10. What Does ACP Fix? Inde cisiv e Clien ts
  • 11. What Does ACP Fix? I liked it better with a bigger image I know kittens don't really go with the rest of the site but these Unwa ones are so nted cute I thought it p would be okay resenta if we did it just tion chan ges b this one time y huma don't you think n edi they're cute my tors partner also thinks it would be nice to put up a picture of his dog rex and
  • 12. Advantages of Patterns Pattern ● Applied during page composition ● Presentation changes have instant effect ● A pattern is just another article Template ● One time substitution when article added ● Presentation elements are “baked in” ● Users can make unwanted changes to presentation elements
  • 13. Why “pattern” ● Template is an over used that has too many meanings: – Joomla Templates – Content Templater from NoNumber.nl – Other content template solutions – Stand-alone template systems – Template systems built into other extensions
  • 14. Using Abivia Content Patterns A Brief History of ACP
  • 15. ACP's Humble Beginning Ordered lists in (older) TinyMCE 1. Item One 2. Item Two 1. Item Three 2. Item Four
  • 16. ACP's Humble Beginning Plug-in to fix lists: Template body: {template ordered-list} <ol style="..."> {list Item One} {for item} {list Item Two <li>{current}</li> {list Item Three} {end} {list Item Four} </ol> {template end}
  • 17. ACP Evolved ACP has evolved considerably ● Version 2.0 ● Language features ● On the fly CSS injection ● Format-specific patterns (html, feed, raw) ● Access to Joomla environment
  • 18. Basic ACP Example Article Biography Pattern {acp _pattern biography} <div> {name Jane Doe} <h3>{acp var name} {title CEO} {acp ifdef title} {body/} , <em>{acp var title}</em> one or more paragraphs here {acp end title} {/body} </h3> {acp _end} {acp var body} </div>
  • 19. Basic ACP Example Article Biography HTML {acp _pattern biography} <div> {name Jane Doe} <h3>Jane Doe, <em>CEO</em></h3> {title CEO} one or more paragraphs here {body/} </div> one or more paragraphs here {/body} {acp _end}
  • 20. ACP as a Content Creator Objective: keep it simple {acp _command parameters} definition/selection directives {acp _end} Top Level Commands are: _pattern, _globals, _with
  • 21. ACP Pattern References {acp _pattern alias | title | id} {varname value} {acp varname value} {varname/}value{/varname} {_list arrayname value1}{_list arrayname value2} {_open objname}...{_close objname} {acp _end}
  • 22. Arrays and Objects? Really?? Useful in many real world situations: – Business Directory ● Office [1..n] – Address – Staff [1..n] ● Name, title, email, phone, [cell], [fax], etc. User friendly commands: _list, _open instead of _array, _object
  • 23. Globals ● Globals are available to all pattern references {acp _globals} definitions {acp _end}
  • 24. Example of Globals {acp _globals} {path /some/file/path/} {acp _end} {acp _pattern image}{name x.jpg}{acp _end} {acp _pattern image}{name y.jpg}{acp _end} The path variable is available to both calls to the image pattern.
  • 25. The Power of _”With” ● With selects articles, then applies a pattern ● Only article globals are available ● Surprisingly powerful feature {acp _with pattern} {article alias or id...} {category catalias or catid...} {acp _end}
  • 26. Processing in a With Command Final Article Pattern Master Article Resolved Article Pattern Reference with Article Selectors Resolved Article ACP Resolved Article Selected Selected Selected Selected Selected Articles Articles Articles Resolved Article Articles Articles ACP Globals ACP Globals ACP Globals ACP Globals ACP Globals Resolved Article
  • 27. ACP as a Developer ACP has a rich command set ● Variable spaces: var, article, request, with ● Conditionals: if, ifdef, ifempty, ifview ● Looping: for, foreach ● Styles: css ● More: set, transform, ...
  • 30. Example: Case Studies The main article: {acp _with bizcase} {category business-cases} {acp _end}
  • 31. Example: Case Studies Global Variables: ● date ● description ● equity ● fund ● industry ● overview ● own ● role ● status (optional) ● thesis
  • 32. Example: Bizcase Pattern <div class="biz-case"> <div class="biz-data"> <p><strong>Sector:</strong> {acp var industry}</p> <p><strong>Investment Date:</strong> {acp var date}</p> <p><strong>Equity:</strong> {acp var equity}</p> {acp ifdef status}<p><strong>Status:</strong> {acp var status}</p>{acp end status} <p><strong>{acp var fund} Ownership:</strong> {acp var own}</p> </div> <div class="biz-body"> <h4>{acp var @with.title}</h4> <h5>Company Overview:</h5> {acp var overview} <h5>Transaction Description:</h5> {acp var description} <h5>CFI Role:</h5> {acp var role} <h5>Investment Thesis:</h5> Editor Switcher by {acp var thesis} Anything Digital </div> </div>
  • 33. Example: Case Studies Doing it with style: On-t he-fl y CS S Ch {acp css} ange s .biz-body {max-width: 725px;padding-left: 1em;} div.biz-case {border-top: 3px solid #ef3318;clear: both;margin-bottom: 24px;} div.biz-data {background: url(/images/sections/cs/cs_head_400x260.jpg) no-repeat top right transparent;min-height: 170px;} div.biz-data p {margin: 0 16px 8px 24px;} {acp end}
  • 35. Example: Multiple Presentations One Artic le – Tw o Wa ys t o See it
  • 36. Example: Multiple Presentations {acp _globals} {jext plg_abiviasupertable} {j15 1} {j25 1} {fptitle SuperTable Plugin} {fpsub Beautiful tables in less than a minute!} {fptext Abivia's SuperTable Plugin is designed to make your tabular data pop! SuperTable takes regular tabular data and turns it into a powerful and dynamic display.} {acp _end} Remaining article content...
  • 37. Example: Multiple Presentations Extension Thumbnail <a href="{acp var @with.url}"> <img class="jthumb" src="images/{acp var jext}/thumb.png" alt="{acp @with.title}"/> </a>
  • 38. Example: Multiple Presentations Blog Title <h3><a href="{siteacp var @with.url}"> {acp ifdef fptitle} {acp var fptitle} {acp else fptitle} {acp var @with.title} {acp end fptitle}</a> {acp ifdef new} <span class="new">NEW!</span>{acp end new} </h3>
  • 39. Example: Multiple Presentations Version buttons {acp ifdef j25} <a href="{acp var @with.url}"><img class="jbutton" src="images/buttons/btn-joomla-25.png" alt="Designed for Joomla 2.5" title="Designed for Joomla 2.5"/></a> {acp end j25}
  • 40. ACP Development & Support ● ACP 2.0 just released (free for now) ● Runs on J 1.5, 2.5 expect 3.0 soon ● ACP 1.9 has been used in production > 1 year ● Code quality: ● 53 unit tests – so far ● Documentation: ● 29 page reference manual (with a few examples) ● Not much tutorial support yet ● Forums
  • 41. ACP Future Development ● More capable expressions (comparison, math) ● Add LESS for Joomla 3.0 ● Patterns in XML ● More “with” selectors ● Schemas for pattern data ● Graphical Interface / Editor Assist
  • 42. Questions ? Credits: Kitten image: goosie-gander (Flickr) used under a CC license. Clip art: openclipart.org public domain license Image editing: Gimp.org (GPLv3) Presentation: LibreOffice.org (LGPLv3)
  • 43. Contact Information Alan Langford u! Thank yo jal@php.net alan.langford@abivia.com www.abivia.net Twitter: @FxNxRL, @Abivia ADN: @yyz Skype: abivia.com also Google+, Facebook, LinkedIn...