Professional Documents
Culture Documents
Moqui
Holistic Enterprise Applications Made Easy
!
by David E. Jones!
!
Sponsored by:
! "
! "
Moqui Ecosystem
HotWax Media, Inc.
http://www.moqui.org
http://www.hotwaxmedia.com
HotWax Media designs, implements, and supports
Sponsor this book to see your logo and a
custom ERP applications and systems of description of your offerings here!
innovation that help businesses run faster, leaner, Contact author at dej@dejc.com for details.
and better.
Leapfrogging the inflexible legacy ERP suites of
!
years past, HotWax Media leverages flexible open
source software to create business systems for
today’s innovators and tomorrow’s industry
leaders.
If you are running an old fashioned ERP mega
suite, the time has come to think different. If you
have a new vision for system innovation in your
industry, open source ERP is the way to make it
happen, and Moqui is a great option to consider.
HotWax Media is proud to sponsor this book, and
we actively cheer on Moqui’s long-term success!
!
!
!
!
Copyright © 2014 David E. Jones!
All Rights Reserved"
!
Version 1.0 - First Edition
Based on Moqui Framework version 1.4.1 and Mantle Business Artifacts version 0.5.2.
These open source projects are public domain licensed and are available for download
through http://www.moqui.org."
!
!
The PDF version of this work (available for free download from http://www.moqui.org) is
licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/4.0/."
A special thanks to the sponsors who helped make this book what it is, keep the price low on
the printed book, and make the PDF download version available for free.
For permission to use any part of this work, please send an email to the author at
dej@dejc.com. For more details about the author see his web site at http://www.dejc.com."
!
!
Designed for a full color 8x10" bound book. With this format the PDF version can also be
printed on A4 or US Letter paper."
!
For the CreateSpace print edition:"
ISBN-13: 978-0692267059"
ISBN-10: 0692267050"
!
!
!
Table of Contents
!
Foreword 1
1. Introduction to Moqui 3
What is the Moqui Ecosystem? 3
What is Moqui Framework? 4
Moqui Concepts 5
Application Artifacts 5
The Execution Context 6
The Artifact Stack 7
Peeking Under the Covers 7
Development Process 7
Development Tools 8
A Top to Bottom Tour 11
Web Browser Request 11
Web Service Call 12
Incoming and Outgoing Email 12
2. Running Moqui 13
Download Moqui and Required Software 13
The Runtime Directory and Moqui Conf XML File 13
The Executable WAR File 14
Embedding the Runtime Directory in the WAR File 15
Building Moqui Framework 16
Database Configuration 17
7. User Interface 91
XML Screen 91
Subscreens 91
Standalone Screen 93
Transition 94
Parameters and Web Settings 97
Screen Actions, Pre-Actions, and Always Actions 97
XML Screen Widgets 98
Section, Condition and Fail-Widgets 99
Macro Templates and Custom Elements 99
CSV, XML, PDF and Other Screen Output 100
XML Form 101
Form Field 101
Field Widgets 102
Single Form 106
Single Form Example 107
List Form 112
List Form View/Export Example 113
List Form Edit Example 116
Templates 119
Sending and Receiving Email 121
8. System Interfaces 125
Data and Logic Level Interfaces 125
XML, CSV and Plain Text Handling 125
Web Service 127
XML-RPC and JSON-RPC 127
Sending and Receiving Simple JSON 128
RESTful Interface 129
Enterprise Integration with Apache Camel 130
9. Security 133
Authentication 133
Simple Permissions 134
Artifact-Aware Authorization 135
Artifact Execution Stack and History 135
Artifact Authz 136
Artifact Tarpit 137
! "
Moqui Ecosystem
http://www.moqui.org
Sponsor this book to see your
logo and a short description of
your offerings here!
See the full page ad for Ant Websystems (http://www.antwebsystems.com/) on page 18.
See the full page ad for HotWax Media (http://www.hotwaxmedia.com/) on page 32.
!
!
Foreword
I am not a professional framework developer. I am, just like you, a professional application
developer. My career is oriented around building and customizing applications for a wide
variety of organizations to manage processes and automate information management."
Like any craftsman an application developer needs a good set of tools, and my quest for the
best tools possible started in 1999 when I got into this business. At the time Enterprise Java
was maturing and going through a period of standardization to help consolidate and
organize the many different tools and technologies that were available in the marketplace. "
There was only one problem: for building large-scale systems like an ERP application these
tools and technologies were painful to develop with, required massive hardware to run
satisfactorily, and were plagued by inadequate standards that practically guaranteed lock-in
to application servers that featured enterprise-grade price tags. These applications were also
difficult and expensive to customize and maintain after initial implementation. It was, in a
word, horrible."
Various open source alternatives were starting to emerge to compete with the commercial
players that drove much of the standardization, and this helped with the licensing cost but
did little for the inefficiencies in both development and production performance. "
There was much room for improvement. In 2001 I started an open source project called The
Open For Business Project (OFBiz) with the wide ranging goal of acting as a foundation for
all manner of information automation applications. This was meant to enable consolidated
systems and include eCommerce, ERP, CRM, MRP, and so on. Based on my experience with
enterprise Java tools and exposure to some novel ideas and patterns people were starting to
develop, I designed a very different sort of tool set. This tool set was not plagued by object
mapping to organize data and encapsulate logic, and embraced the service-oriented design
patterns for internal use that have become the standard for interoperation between
applications."
Along with technical development tools, a good application developer also needs a flexible
and comprehensive data model to give structure and consistency to applications developed.
Fortunately in early March 2001, just two months before I started The Open For Business
Project, Len Silverston published The Data Model Resource Book, Revised Edition, Volume 1