Click here to load reader
Upload
modxpo
View
2.113
Download
0
Embed Size (px)
DESCRIPTION
Brief description on how to develop using MODx Revo
Citation preview
Power Developing Extras
For MODx Revolution
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
Coming to Terms with Terminology
• ‘CMP’ - Custom Manager Page
• ‘Lexicon’ - A collection of translation entries, or strings
• ‘Namespace’ - A unique name identifying your Component
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
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
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
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
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
Custom Settings
• Settings can be dynamically added
• You can package in settings
• System -> Context -> User
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
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
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
Case Studies: The Wine Guide
• by Digital Butter Limited
• Custom Manager Pages
• Custom DB tables
• Language-specific Contexts
• CSV imports/exports
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
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