PHP - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

PHP

Description:

Code Generator generates directly off a MySQL data model to create object code ... Code Generation supports rapid creation of prototypes that can easily mature ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 16
Provided by: mik69
Category:
Tags: php

less

Transcript and Presenter's Notes

Title: PHP


1
PHP MySQL RAD
  • Accelerated MySQL/PHP Application Development
  • Using a Code Generation Framework
  • MySQL Online Webinar
  • Tuesday, December 14, 2005
  • Mike Ho QuasIdea Development, LLC
  • mike_at_quasidea.com

2
A little about me
  • Co-Founded Quasidea Development, LLC
  • Company behind open-source project Qcodo, a PHP
    Development Framework
  • Past 4 years, focused on improving inefficiencies
    in IT development lifecycle
  • Developing database-driven applications for the
    past 7 years
  • For web, desktop and handheld on various platforms

3
Frameworks All the Rave
  • Past year has seen database-driven development
    frameworks hit the mainstream
  • Ruby on Rails (Ruby), Hibernate (Java),
    NHibernate (.NET), Cake (PHP), Qcodo (PHP), Zend
    PHP Framework (PHP)
  • Focus Dont Repeat Yourself
  • MySQL data model says so much already
  • Metaprogramming
  • Runtime Reflection (e.g. ActiveRecord)
  • Code Generation
  • Can account for 50 of your code base
  • Real cost savings

4
Runtime Reflection
  • Technique used by most DB/metaprogramming
    frameworks
  • Core component Object Relational Mapper (most
    frameworks call it the ActiveRecord class)
  • Allows for very light classes
  • class Project extends ActiveRecord
  • has_many gt TeamMembers
  • belongs_to gt Client
  • ActiveRecord provides CRUD (Create, Restore,
    Update and Delete) functionality, relationship
    handling and attribute properties
  • Project objProject ProjectLoad(21)
  • objProject-gtTitle ACME Website Redesign
  • objProject-gtTeamMembers-gtAdd(PersonLoad(2815))
  • objProject-gtSave()

5
Code Generation
  • At the 50,000 foot level, seems very similar to
    Runtime Reflection
  • Similar looking objects, exact same functionality
  • Actual code is generated
  • No central ActiveRecord class that runs all DB
    logic
  • Advanced code generators use templates and
    subclasses
  • Templates allow for easier global customization
    (for all classes)
  • Subclasses allow for infinite local
    customizations (for an individual class)
  • Changes will not be overwritten by code
    regeneration

6
Code Generation (continued)
  • The person table will generate Person class
  • Class PersonClass
  • // Public Loader
  • public static PersonClass New()
  • public static PersonClass Load(intPersonId)
  • // Methods
  • public void Save()
  • public void Delete()
  • // Public Properties
  • public string FirstName
  • public string LastName
  • public date DateOfBirth
  • public int NumberOfCertifications
  • public LoginClass Login
  • public CompanyClass Company
  • public RoleTypeEnum RoleType

7
Runtime Reflection, Advantages
  • Simplicity
  • Light code base Less Daunting
  • Real-time Changes
  • No need to regenerate your code

8
Code Generation, Advantages
  • No Runtime Analysis Performance Hit
  • Break Free
  • Requires no runtime library
  • Adding Global Functionality
  • Database Archiving, Object Caching, Row- or
    Field-level permissions, etc.
  • No Language Lock-in
  • HTML templates, Javascript/AJAX, etc.

9
NASA Exploration Life SupportOnline Project
Information System
  • OPIS is designed for Exploration Life Support
  • With the constantly changing guidance for NASA
    and the space program, online knowledge
    management is crucial
  • ELS is leading the way with Advanced RD in Life
    Support systems for Space Shuttle, Space Station,
    etc.
  • There are 7 divisions in ELS (Air, Biomass,
    Controls, Food, Thermal, Waste, Water) with
    researchers across the country and around the
    world. Again, online knowledge management is
    crucial.
  • Code Generation allowed for Rapid Prototyping
  • Minimized time to development
  • Minimized cost of change
  • Im a true believer in code generation. NASA
    Civil Servant

10
The Qcodo Framework
  • Code Generation-based Framework for PHP 5
  • More advanced, open-source version of the
    framework used on NASA OPIS
  • Allows for rapid prototyping of your application
  • Lets developers focus on pure functionality,
    usability, performance and security
  • Minimizes cost of change
  • Two parts of the Framework
  • Code Generator generates directly off a MySQL
    data model to create object code (Object
    Relational Model)
  • Qforms is an object-oriented stateful
    event-driven architecture for HTML forms
    processing (e.g. ASP.NET, Java Struts, etc.)
  • Uses robust OO architecture (templates,
    subclasses) to support unlimited
    customizations/modifications to generated code
  • Code Regenerations will not overwrite
    customizations

11
The Qcodo Framework (continued)
  • Lets take a look at a demo

12
Summary
  • Code Generation supports rapid creation of
    prototypes that can easily mature into
    production-level apps
  • Alleviates need for developers to worry about
    mundane, tedious wiring code
  • Lets them instead focus on functionality,
    usability, performance and security
  • Minimizes development time
  • Minimizes cost of change

13
Qcodo, a PHP Development Framework
  • Has been developing and improving since 2001
  • Framework in production at wide variety of orgs
    small businesses, Fortune 500 companies and
    large (local and federal) govt organizations
  • Proprietary parts of framework were rewritten
    (and improved upon), so that framework can be
    open-sourced
  • Qcodo Beta 1 released October 2005
  • Code Less. Do More.

14
MySQL and Zend
  • MySQL
  • MySQL 5.0 Database Server
  • MySQL Connectors
  • MySQL Tools
  • http//www.mysql.com
  • Zend
  • Zend Studio 5
  • Zend Platform
  • http//www.zend.com

15
Questions? Whats Next?
  • Nascent project is growing fast
  • Very active open-source community
  • Beta 2 out by end of year AJAX, Caching, Addl
    DB Adapters
  • 1.0 Release targeted for Q1 2006
  • For more information about the Qcodo Development
    Framework for PHP, please visit
    http//www.qcodo.com/
  • Or e-mail Mike Ho (mike_at_quasidea.com)
Write a Comment
User Comments (0)
About PowerShow.com