plainblack.com
Username Password
search
Bookmark and Share

WebGUI 7.x Developers Guide

WebGUI's development team has come together to share the inner workings of WebGUI, and provide expert lessons on how to use it to your advantage. Learn about writing custom workflow activities, writing tests, using the WebGUI API, writing and installing your own assets, and a great deal more.

Search


Categories


API (7)
apache (3)
asset (6)
configuration (2)
perl (2)
shop (3)
sql (1)


Featured Article: Table of Contents

WebGUI Request Cycle

mod_proxy

mod_perl

WebGUI

URL Handlers

Extras

Uploads

Content

Content Handlers

Upgrade

Operations

Setup

Assets

Output

Testing WebGUI

Writing Tests in Perl

Test::More

Testing in WebGUI

WebGUI Testing Modules

WebGUI::Test::Maker::Permissions

WebGUI::PseudoRequest

How Good are Your Tests?

General Advice for Testing

Other Testing Resources

The WebGUI API

The API Docs in HTML

Using Perldoc to Read the Documentation

Installing Third-Party Modules via CPAN

Session

User vs Request Session

Managing a Session

$session->asset

$session->config

$session->datetime

$session->db

$session->dbSlave

$session->env

$session->errorHandler

$session->form

$session->http

$session->icon

$session->id

$session->output

$session->os

$session->privilege

$session->request

$session->scratch

$session->server

$session->setting

$session->stow

$session->style

$session->url

$session->user 3

$session->var

Dynamic Loading

Writing Macros for WebGUI

How Macros Work

The Macro Skeleton

Hello World

Getting Argumentative: Accepting Parameters

Now for Something Completely Different

Utility Scripts

Why Create Utility Scripts?

Existing Utility Scripts

fileImport.pl

rebuildLineage.pl

search.pl

Useful API Functions

WebGUI::Session

open method

config method

settings method

db method

WebGUI::Asset

new method

newByUrl method

getRoot method

getLineage

WebGUI::User

new, newByUsername, newByEmail methods

profileField method

A Simple Utility Script : settings.pl

Package Maintenance: Short but Powerful

Apache Authentication: When a Script isn't a Script

$ vim apacheAuth.pl

URL Handlers

The Request Cycle

When to Use

Configuration

Examples

Hello World

From the Core

Custom Privileges

Content Handlers

Request Cycle

When to Use

Configuration

Examples

Hello World

From the Core

WebGUI::Content::Referral

WebGUI::Content::Asset

WebGUI::Content::Shop

WebGUI::Content::Setup

WebGUI::Content::Maintenance

Handling a Post from an Arbitrary Form

Form Controls

Hello World

A Simple Example: Button

Getting Attached: the Attachment Control

Writing Your Own Form Control

Authentication Plugins

History

General Authentication Structure

Writing a Custom Authentication Plugin

Auth Constructor

$auth->session

$auth->user([$user_object])

$auth->userId

$auth->username

$auth->error([$errorMessage])

$auth->warning([$warningMessage])

$auth->setCallable(\@callableMethods)

$auth->isCallable([methodName])

init()

displayLogin()

$auth->displayLogin([postMethod, templateVariables])

getLoginTemplateId()

login()

$auth->authenticate($username);

$auth->getParams();

logout()

Authentication Data

Settings

editUserSettingsForm()

editUserSettingsFormSave()

User Data

$auth->getParams

$auth->saveParams($userId,$authMethod,$propertiesHashRef)

$auth->deleteParams()

$auth->deleteSingleParam($userId,$authMethod,$fieldName)

Creating User Accounts

editUserForm()

editUserFormSave()

createAccount()

createAccountSave()

$auth->validUsername($username);

displayAccount()

$auth->displayAccount(postMethod,[templateVariables])

deactivateAccount()

$auth->deactivateAccount([postMethod])

deactivateAccountConfirm()

Creating Custom Methods

Extending Existing Authentication Plugins

Installing Your Authentication Plugin

Manually Installing Your Authentication Plugin

Automating Your Authentication Plugin Installation

Workflow Activities

The Workflow Engine

Steps of WebGUI Workflow

Synchronicity

Workflow Engine Components

Spectre and WebGUI Communicate

WebGUI::Workflow::Activity API

definition()

States

return $self->COMPLETE;

return $self->ERROR;

return $self->WAITING;

execute()

WebGUI::Workflow::Instance API

setScratch()

getScratch()

deleteScratch()

Rules to Work By

Workflow Activity Examples

Hello World

Email Poll Example

Functional Specification

Technical Specification

The Code

Configuration

Assets

The Bare Necessities: a Cliched Example

Definition

tab

fieldType

defaultValue

label

hoverHelp

properties

assetName

icon

tableName

className

autoGenerateForms

Create the Database Table

View Method

Add the Asset to the Configuration Table

Hello World

Adding a Template

getTemplateVars

processTemplate

prepareView

The Edit Form

getEditTabs

getEditForm

processPropertiesFromFormPost

www_edit

More Definition Magic: Filters

Tips, Tricks, and Things Left Unsaid

Lineage

The getLineage Method

Query the Asset Tree

addChild

Rank and Depth

Writing Wobjects

History

What is a Wobject?

Getting Started

Writing a Functional Specification

Writing a Technical Specification

Building Your Wobject

Hello World

Example: Recipe Catalog

Installing Your Wobject

Building Your Wobject

www_ methods

Container Wobjects

Finishing Up

Wobject Inheritance

Internationalization

Placeholders and i18n

Help

Template Variables

Related and ISA

Writing SKUs

API Highlights

addToCart()

Event Handlers

The Numbers

Display Helpers

SKUs as Products

Special Methods

Book Example

Recurring SKUs

Special Methods

Association Dues Example

SKUs as Coupons

Special Methods

Member Discount Example

Writing Payment Drivers

API Highlights

The Master Classes

PayDriver Basics

Recurring Methods

Karma Payment Example

Writing Shipping Drivers

API Highlights

The Master Classes

The Basics

Free Shipping on Big Orders Example

Appendix 1: Advanced Install Scripts for Assets

Appendix 2: Writing Patches for WebGUI

Developing Against a Release

Developing With the Latest Code

© 2023 Plain Black Corporation | All Rights Reserved