QCubed-4 Examples Site
This is a collection of many small examples that demonstrate the functionality in QCubed-4. Later examples tend to build upon functionality or concepts that are discussed in prior ones, which allows the Examples site to be viewed as a quasi-tutorial. However, you should still feel free to check out any of the examples as you wish.
The Examples are broken into three main parts: the Code Generator, the Forms and Control Library, and Other QCubed-4 Functionality.
* Some of the examples (marked with a "*") use the Example Site Database. This database (which consists of six tables and some preloaded sample data) is included in the Example Site directories. See Basic CodeGen > About the Database for more information.
The Code Generator is at the heart of the Model in the MVC (Model, View, Controller) architecture. It uses the data model you have defined to create all your data objects, relationships and CRUD functionality.
Sections 1–3 look specifically at the Code Generator, the Object Relational Model it creates, and the QCubed-4 Query library which powers it.
1. Basic CodeGen - An introduction to the QCubed-4 Code Generator
- (About Sections 1-3)
- About the Database
- * Object Relational Model
- * Loading Objects
- * Saving and Deleting
- * Relationships (Foreign Keys)
- * Reverse Relationships (One-to-One and One-to-Many)
- * Many-to-Many Relationships
- Defining Relationships without Foreign Keys
- Explanation of QCubed-4 Primary Key Requirement
2. More About the Object Relational Model - Looking more in depth at the functionality of the generated ORM
- * Sorting and Limiting Array Results
- * Late Binding of Related Objects
- * Early Binding of Related Objects
- * Type Tables
- * Customized Business Logic
- * Customized Load Methods
- * Optimistic Locking
3. Querying in QCubed-4 - Ad Hoc Queries, Custom Load Methods, and QCubed-4 Query
- * QCubed-4 Query: Object Oriented Database Querying
- * QCubed-4 Query: The Node Classes
- * QCubed-4 Query: The Condition Classes
- * QCubed-4 Query: The Clause Classes
- * QCubed-4 Query: Conditional Joins
- * QCubed-4 Query: Handling Association Tables
- * QCubed-4 Query: Handling Reverse Relationships
- * ExpandAsArray: Multiple related tables in one swift query
- * SQL Aliases for QQuery
- * Picking database columns for QQuery
- * SQL functions and math operations for QQuery
- * Custom SQL Subqueries for QQuery
- * Performing Custom SQL Queries
- * Virtual Attributes and Custom SQL
QForms is a stateful, event-driven architecture for web-based forms, providing the display and presentation functionality for QCubed-4. Basically, it is your "V" and "C" of the MVC architecture.
Sections 4–10 are examples on how to use Forms and the Control libraries within the QCubed-4 Development Framework.
4. Basic QForms - An introduction to Forms and Controls
- (About Sections 4 - 10)
- Hello World Example
- Forms: Stateful, Event-Driven Objects
- Understanding Process Flow
- Calculator Example
- Calculator Example with Validation
- Calculator Example with "Design"
- * Introduction to ListControl
- * Generating HTML Lists
- * Introduction to TextBox Controls
5. Basic AJAX in QForms - A look at how to AJAX-enable your QForms
6. More About Events and Actions -
- Editable ListBox
- Conditional Events
- Trigger-Delayed Events
- Javascript Actions, Alerts and Confirmations
- Other Client-Side Actions
- Controlling Event Bubbling
- Event Delegation
- Blocking Unwanted Events
- JavaScript Priorities
- Automatic Refreshing of Controls
- Using ControlProxies to have Non-Controls Trigger Events
7. Paginated Controls - The Table, DataGrid and DataRepeater controls
- * Table Controls
- * Table Columns
- * Table Formatting and Styling
- * Table Link Column
- * Dynamically adding Controls to Tables
- * The DataGrid Class and Sorting
- * DataGrid Pagination
- * Detecting Row and Cell Clicks
- * The Easy Way to Add a Checkbox Column to a Datagrid
- * Datagrid with Inline Editing
- * Nested DataGrid
- * Simple DataRepeater using AJAX-triggered Pagination
8. Advanced Controls Manipulation - Dynamically creating controls, Implementing custom controls
- Introduction to BlockControls
- Dynamically Changing a Control's Parent
- Persistent Controls
- Creating Your Own Control
- Creating a Composite Control
- "Multiple Forms" Functionality via Custom Panels
9. Advanced AJAX - Advanced AJAX functionality like drag and drop, selection and cinematic effects
- Renameable Labels
- Porting Code to the Client Side
- Moveable Controls (a.k.a. Drag and Drop)
- Automatic Scrolling
- Move Handle: Specifying Which Controls to Move
- Move Handle: Defining Drop Zones
- Resizing Block Controls
- Modal "Dialog Boxes"
- * Server-side wrappers for all jQuery UI Controls
- Post data back to the server from jQuery UI controls
- JQuery Effects
10. Other Controls - Other core controls
Beyond the Code Generator and the Forms library, QCubed-4 also has many other modules and features that are useful for web application developers.
11. Model Connectors, DataGrid Connectors, and the Drafts - Combining the Code Generator with the Form Library
- Forms and CodeGen, a Winning Combination to RAD
- * Introduction to Model Connectors
- * Introduction to DataGrid Connectors
- * Introduction to the Drafts
12. Beyond HTML - Other libraries in QCubed-4
- Introduction to Cryptography
- Introduction to I18n (Internationalization)
- * Measuring Performance using Timer
13. Other Tidbits - Other random examples, samples and tutorials
- * Security: Preventing Cross-Site Scripting
- Attribute Overriding
- Specifying a Template Filepath
- Single File Forms
- Working with FormState Handlers
- PHP Print Command Shortcuts
- Includes outside of the DocRoot for Security and Shared Installs
14. Libraries - Infrastructure that lets the community extend QCubed-4