Greets all,

 

June's UPHPU meeting will be Thursday, June 19th at 7p in Draper (address /
map below).

 

We are very pleased to have Travis Barney of Progrexion presenting on QCodo.


 

The Qcodo Development Framework is an open-source PHP 5 framework that
focuses on freeing developers from unnecessary tedious, mundane coding.  It
is a completely object-oriented framework that takes the best of PHP and
provides a truly rapid application development platform. (http://qcodo.com/
)

 

Meeting Information:

 

UPHPU 

June 19th, 2008 @7pm

12393 Gateway Park Place, Suite 600

Draper, Utah 84020

 

http://maps.google.com/maps?f=q&hl=en&geocode=&q=12393+Gateway+Park+Pl,+Drap
er,+UT+84020&sll=37.0625,-95.677068&sspn=61.711173,104.0625&ie=UTF8&z=17&iwl
oc=addr

 

Presentation Notes:

 

Part 1. Preparation and Configuration 

            A. Download QCodo / Setup

                        Latest Dev Version - http://qcodo.com/downloads/

                        Unzip, Configure Apache, etc. - WAMP is nice, google
has info.

                        

            B. Configuration Settings

                        Path Constants - Directory structure constants.

                        Database Connection(s) - One or several database
connection settings.

                        

            C. DevTools Directory

                        codegen_settings.xml - Name the Application, define
database(s).

                        path_to_prepend.txt - Absolute path to reach the
configuration, etc.

                        Qcodo Updater - php qcodo_updater.phpexe development

                                                

             

Part 2. Generate the Database Model

            A. Supported Database Types 

                        InnoDB - Having true foreign keys is ideal for the
code generator.

                        MyISAM - Additional txt file can describe table
field relationships.

                        Postgres - True foreign keys available.

                        SqlServer - True foreign keys available.

                        

            B. Foriegn Keys, Field Names

                        If MyISAM - table_name.field_name =>
table2_name.field_name text file for all relationships.

                        *_type table(s) - Two column (id, name) table which
generates Type contstant classes.

                        *_assn table(s) - Two column (parent_id, child_id)
table for zero to many relationship between two objects.

                                    

            C. Naming Conventions

                        Singular table names - Preferably the object names
in the db should be lowercase singular with underscores.

                        Underscore between words - The code-generator writes
the Getter/Setters, etc. as CamelCased.

                        Descriptive Associations - Produce readable
understandable code.

                        

            D. Run CodeGenerator

                        Command Line - php codegen.phpexe
codegen_settings.xml

                        Via Browser - /_devtools/codegen.php


 

Part 3. Modify Forms and Controls

            A. Hello World Page

                        hello-world.php - Demonstrate Form_Create and
Form::Run process. 

                        hello-world.tpl - Create the "View" layer markup and
remarks.

 

            B. Drafts and MetaControls

                        Form Drafts - Working PHP Form class and template
examples to copy/paste from.

                        Panel Drafts - Copied into the /lib directory to be
edited for custom layout/logic.

                        Data Meta Control - A factory class for
instantiating data-bound controls, reducing keypresses.

                                                

            C. Login Authentication

                        LoginPanel.class.php - Example reusable panel for
validating user sessions.          

            

Part 4. Customize Views

            A. PHP Template Files

                        header.inc.php - Page Title, load Assets, etc.

                        footer.inc.php - Copyright, etc.

                        _p Function - Shorthand for echo, and escapes HTML
special chars by default.

                        Render or RenderWithName - Surround the control with
Error Reporting, Instructions, and Label.

                        

            B. Modify Panel Classes

                        AutoRenderChildren - Render child controls without a
template.

                        Control Properties - Name, Text, Instructions,
CssClass, Warning, Enabled.

                        Control Methods - Focus, Blink, AddChildControl,
Validate.

            

            C. Event Bound Controls

                        QServerAction - AddAction(new QClickEvent(), new
QServerAction('MethodName'));

                        QServerControlAction - AddAction(new QClickEvent(),
new QServerAction($objControl, 'MethodName'));

                        QAjaxAction - AddAction(new QChangeEvent(), new
QAjaxAction('MethodName'));

                        QAjaxControlAction - AddAction(new QFocusEvent(),
new QAjaxControlAction($objControl, 'MethodName'));

                        QJavaScriptAction - AddAction(new QEnterKeyEvent(),
new QJavaScriptAction("alert('enter!');"));

            

Part 4. Testing and Error Reporting

            A. Database Profiling

                        DB_CONNECTION - 'profiling' => true

                        Enable -
QApplication::$Database[1]->EnableProfiling();

                        Output -
QApplication::$Database[1]->OutputProfiling();

                        

            A. Stack Trace and Verbosity.

                        ERROR_PAGE_PATH - Well formatted browser based error
details.

                        ERROR_LOG_PATH - Text document output of errors.

                        ERROR_FRIENDLY_PAGE_PATH - For public websites, when
you dont want errors shown.

                        ERROR_FRIENDLY_AJAX_MESSAGE - When errors occur
during ajax calls, hide details on public sites.

 

Part 5. Beyond The Basics

            A. Advanced QQuery 

                        $objDb = ObjectName::GetDatabase() - In case a
project data model consists of multiple databases.

                        $objRes = $objDb->Query($strQuery); - When you want
a result set.

                        $objDb->NonQuery($strQuery); - When you are running
commands, not requring a result set.

                        

            B. QEmailServer

                        Write to Text - For development machines not
connected to a mail server.

                        Attachments and Multi-Part - Rich HTML and
plain-text content segments, file attachments.

                        

            C. Customizing the CodeGenerator

                        Template .tpl Files - Text documents with
configurable Open and Close tags, to output/update various PHP documents.



_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to