15

Click here to load reader

Developing in MODx

  • Upload
    modxpo

  • View
    2.113

  • Download
    0

Embed Size (px)

DESCRIPTION

Brief description on how to develop using MODx Revo

Citation preview

Page 1: Developing in MODx

Power Developing Extras

For MODx Revolution

Page 2: Developing in MODx

Coming to Terms with Terminology

• “Extra” - Anything coded for MODx. Also called ‘Component’, ‘3PC’, or 3rd Party Component

• “Add-On” - Anything that doesn’t extend core but ‘adds’ functionality

• “Core Extension” - Anything that extends the core

Page 3: Developing in MODx

Coming to Terms with Terminology

• ‘CMP’ - Custom Manager Page

• ‘Lexicon’ - A collection of translation entries, or strings

• ‘Namespace’ - A unique name identifying your Component

Page 4: Developing in MODx

The Power of Extras• Develop custom web applications

• Courseware, amazon gallery systems, web service integrations, ecommerce tools

• Create Transport Packages to deploy anywhere and to anyone

• Internationalization support readily available

• Use the power of xPDO to access custom tables

• Custom Manager Pages to have your own rich, ExtJS (or other library) powered manager UIs

Page 5: Developing in MODx

Two Methods of Dev

• Method One: Develop for myself

• Easy - same way as Evolution

• Can use new API, no need to add build script

• Cannot be distributed with Package Management

Page 6: Developing in MODx

Two Methods of Dev

• Method Two: Building a Transport Package

• Makes for easy point-click installs

• Can be distributed via Package Management

• Allows others to use it easily

Page 7: Developing in MODx

The Namespace

• A unique identifier of your Component

• Related to Settings, Lexicons, CMPs

• Namespace path tells MODx where CMP is

• Think of it like the house your Component is built in

Page 8: Developing in MODx

Lexicons for Internationalization

• Lexicons allow your components to translate

• $modx->lexicon(‘entry_name’);

• Separated into topics. Loaded by: $modx->lexicon->load(‘namespace:topic’);

• Tied to Namespaces

Page 9: Developing in MODx

Custom Settings

• Settings can be dynamically added

• You can package in settings

• System -> Context -> User

Page 10: Developing in MODx

Custom Manager Pages

• Also called ‘CMPs’

• Replaces Modules

• Access to MODx API

• Can either embed your script in a MODx page or load it completely alone

Page 11: Developing in MODx

CMPs: Actions and Menus

• An Action is a controller - a database representation of a php file

• A Menu is a menu item for the top nav

• Menus attach to an action

• Menus can use lexicon entries

Page 12: Developing in MODx

Properties and Property Sets

• Any tag can now have properties

• Tags can be nested with properties

• Common Properties can be grouped into Property Sets

• Default properties can be set for any Element

Page 13: Developing in MODx

Case Studies: The Wine Guide

• by Digital Butter Limited

• Custom Manager Pages

• Custom DB tables

• Language-specific Contexts

• CSV imports/exports

Page 14: Developing in MODx

Case Studies:The License Coach

• by Collabpad

• Dynamic Courseware System

• Enrollments, Courses, Chapters, Modules, Quizzes, Dynamic Questions

• Enrollments/Courses can be restricted to Branches

• Signup via website, tracking, heavy reporting, time tracking, etc

• Course Plans to assess risk/progress of students throughout course

• Heavy CMP usage - trees, grids, TinyMCE integration

Page 15: Developing in MODx

Example Component: Doodles

• Objectives: Display a list of Doodles that are loaded from an external DB table

• Have a backend mgr UI in ExtJS to edit them with

• Make it translated via Lexicons

• Have a Transport Package (TP) to distribute with