extending mura cms with custom plugins

33
Extending Mura CMS with Custom Plugins cf.Objective(ANZ) 2011

Upload: andrew-myers

Post on 20-May-2015

1.942 views

Category:

Technology


0 download

DESCRIPTION

Presentation from cf.Objective(ANZ) on creating plugins for Mura CMS.

TRANSCRIPT

Page 1: Extending mura cms with custom plugins

Extending Mura CMS with Custom Plugins

cf.Objective(ANZ) 2011

Page 2: Extending mura cms with custom plugins

About the presenter

Java developer for early part of career Joined RISE in 2005 Developing in ColdFusion since… …and loving it!

Twitter: @am2605 Email: [email protected]

Page 3: Extending mura cms with custom plugins

About the audience?

Who is using a CMS? Who is using Mura?

Who is using Mura plugins?

Page 4: Extending mura cms with custom plugins

About the presentation

Overview of Mura (brief)

Mura Plugins when & why? how?

walk through some simple plugin code

Page 5: Extending mura cms with custom plugins

About the presentation (cont.)

What you will take away: Understanding of plugins & what they are Starting point for building your own plugins

(published on github) Development tips, techniques and pitfalls

to avoid

Page 6: Extending mura cms with custom plugins

Mura

Open Source Content Management System (CMS)

GPL, with exceptions for plugins, themes and bundles*

* See https://github.com/blueriver/MuraCMS/blob/develop/index.cfm

Page 7: Extending mura cms with custom plugins

Mura

Commercial licensing and support available, should you prefer

Page 8: Extending mura cms with custom plugins

Mura (cont…)

Features Easy for front end users

to learn and use Novice users / no

knowledge of HTML

Templates and content styling

Page 9: Extending mura cms with custom plugins

Mura (cont…)

Features Easily extensible

Mura MarketplacePlugins Templates

Create you own!Plugins Templates

Page 10: Extending mura cms with custom plugins

What are Mura Plugins?

Extend Mura with new functionality

Examples from the Mura Marketplace include: eCommerce, Google

Maps integration, Survey module

Page 11: Extending mura cms with custom plugins

What are Mura Plugins?

Extend Mura with new functionality Installable, distributable package Contains all the necessary elements

to build powerful custom applications within Mura CMS

Page 12: Extending mura cms with custom plugins

How Mura Plugins work

Provide Display Objects

These are in turn embedded in Mura pages

Can be used across multiple sites

Page 13: Extending mura cms with custom plugins

When use Mura Plugins?

Plugins are only one of numerous ways to extend Mura

So when use them? If planning to distribute Providing large or

complex functionality

Page 14: Extending mura cms with custom plugins

Why use Mura Plugins?

Update safe Packaged and organised Easily distributable Licensing exception Framework-friendly

FW/1, Model-Glue, etc.

Credit: “Anatomy of a Mura Plugin” presentation – Sean Schroeder, Blue River Software

Page 15: Extending mura cms with custom plugins

So how is it done?

Follow a standard file / directory structure

Package as a zip file Upload via the Mura Admin interface

Page 16: Extending mura cms with custom plugins

The simplest example contains 3 files

A simple plugin

Page 17: Extending mura cms with custom plugins

config.xml.cfm

Page 18: Extending mura cms with custom plugins

dspHelloWorld.cfm

Page 19: Extending mura cms with custom plugins

Build and install

Deployed as a zip file I prefer to use ant from within Eclipse

to package the plugin But you can create it any way you wish

My ant build.xml is available on github Link will be at end of slides

Page 20: Extending mura cms with custom plugins

Demo 2 - More advanced

The previous example was interesting, but not very useful

Let’s hook up our plugin to Mura… …via events

Page 21: Extending mura cms with custom plugins

Introducing the Mura Scope

Provides a standard, concise syntax for interfacing with Mura objects (and their properties and events).

Accessed as the “$” variable We’ll see an example of this shortly

Page 22: Extending mura cms with custom plugins

Introducing the Mura Scope

Provides a standard, concise syntax for interfacing with Mura objects (and their properties and events).

In admin area Must include plugins/config.cfm to obtain

access to this

When included in Mura page Automagically available

Page 23: Extending mura cms with custom plugins

More about PluginConfig

Page 24: Extending mura cms with custom plugins

The <settings> element

Contains settings that the plugin requires to function

Specified by the user during plugin install

Accessed programatically via pluginConfig.getSetting(‘settingName’)

Page 25: Extending mura cms with custom plugins

The <settings> element

Page 26: Extending mura cms with custom plugins

EventHandlers

Map to Mura events, or events announced in your plugins

Mura has an extensive event model –more info in links at end of slides

Set up in config.xml.cfm:

Page 27: Extending mura cms with custom plugins

EventHandlers (cont)

Page 28: Extending mura cms with custom plugins

Plugin.cfc

Allows you to run code that is needed to properly install, update or delete a plugin

Plugin.cfc must extend mura.plugin.plugincfc

Page 29: Extending mura cms with custom plugins

An example

See demo3/plugin/plugin.cfc

Page 30: Extending mura cms with custom plugins

Resources

Mura – http://getmura.com

Mura Marketplace -http://www.getmura.com/marketplace/

Grant Sheperthttp://www.grantshepert.com/

Page 31: Extending mura cms with custom plugins

Resources (cont.)

Source code for demos –https://github.com/am2605/cfoanz-2011-mura-plugins

Twitter: @am2605 Email: [email protected]

Page 32: Extending mura cms with custom plugins

Questions?

Page 33: Extending mura cms with custom plugins

Thank you!