200406 linuxtag php meets uml - somabo.desomabo.de/talks/talks/200406_linuxtag_php_meets_uml.pdf;...
TRANSCRIPT
PHP meets UML
Marcus Börger
LinuxTag 2004
Marcus Börger PHP meets UML 2
Overview
PHP 5 vs. PHP 4
PHP 5 OO
PHP and UML
Marcus Börger PHP meets UML 3
PHP 4 and OO ?
Poor Object modelMethods
No visibilityNo abstracts, No finalStatic without declaration
PropertiesNo default valuesNo static properties
InheritanceNo abstract, final inheritance, no interfaces
Object handlingCopied by valueNo destructors
Marcus Börger PHP meets UML 4
PHP 5's revamped OO Model
PHP 5 has really good OO
Better code reuse
Better for team development
Easier to refactor
Some patterns lead to much more efficient code
Fits better in marketing scenarios
Marcus Börger PHP meets UML 5
Completely new XML support
PHP 4's XML was patheticSAX was OKDOM was crappy, DOM was fakeThere was nothing else
PHP 5's XML is brilliantSAX is OKDOM is functionalSimpleXML is the solution to all your problemsNative SOAP support
Marcus Börger PHP meets UML 6
Reflection API
Can reflect nearly all aspects of your PHP codeFunctionsClasses, Methods, PropertiesExtensions
<?phpclass Foo {
public $prop;function Func($name) {
echo "Hello $name";}
}ReflectionClass::export('Foo');ReflectionObject::export(new Foo);ReflectionMethod::export('Foo', 'Func');ReflectionProperty::export('Foo', 'prop');ReflectionExtension::export('standard');?>
Marcus Börger PHP meets UML 7
Reflection API
Can be used to generate XMI
Can be used to reverse engineer PHP
Marcus Börger PHP meets UML 8
Unified Database API
PHP 5.1 will come with PDO
Unified object oriented API
Support for MSSql, MySQL, Oracle, Postgres, ...
Support for transactions
Support for LOBs
Support for iterators
Marcus Börger PHP meets UML 9
Why UML
Improve CommunicationWith customerWith managementBetween developers
Visualize ConceptsImprove documentationModel verification
Mistakes during design are cheapMistakes during implementation are expensive
Automatic code generation
Marcus Börger PHP meets UML 10
PHP and UML
Support for OO syntax/semantic
Support through open source toolsDoxygenUmbrelloArgoUML
Support through commercial/proprietary toolsPoseidonWaterproof UMLBITPlan smartGENERATORSybase PowerDesigner
Marcus Börger PHP meets UML 11
Doxygen
Doxygen is a documentation system Code comments to documentationCreates UML like graphs automaticallyGenerates html, chm, TEX, PostScript, PDF, man pagesRuns on Linux/Windows
Marcus Börger PHP meets UML 12
Umbrello
Most of UML 1 diagram typesCode generation for
C++, Java, PHP, Perl, Python, SQL, ADA, AS, JavaScript, IDL, XML Schema
Export to PNG and XMIRuns on Linux/KDEManual in English and German
Marcus Börger PHP meets UML 13
ArgoUML
Runs on any platform with Java 1.3+ Exports GIF, PS, EPS, PGML and SVGXMI Support OCL SupportCode generation
C++Java PHP
Support throughcommercial versionPoseidon
Marcus Börger PHP meets UML 14
BITPlan smartGENERATOR
Code generation from XMI
This allows to use all XMI compliant UML toolsRational Rose Poseidon GentlewaremicroTOOL objectivFTogether Soft Together/J oder C++ Object Domain from Object Domain Systems JDBC-Quellen and other Repositories
At the moment only a prototype
Marcus Börger PHP meets UML 15
Sybase PowerDesignerComplete UML 1.3 supportProcess Execution
Service Oriented Architecture supportebXML, BPEL4WS
Data ModelingConceptual, Logical, Physical and Warehouse DataRoundtrip engineering for databases
Enterprise ModelingModel Driven ArchitectureObject/Relational, XML to Database and Warehouse Source mapping TechniquesRoundtrip engineering for C#, C++, Java, VBA, XML, ...
Documentation generation Highly Extensible and Customizable
Marcus Börger PHP meets UML 16
Sybase PowerDesigner
Working with class diagrams
Marcus Börger PHP meets UML 17
Sybase PowerDesigner
Teaching PHP
Marcus Börger PHP meets UML 18
Sybase PowerDesigner
Teaching PHP
Marcus Börger PHP meets UML 19
Sybase PowerDesigner
Teaching PHP
Marcus Börger PHP meets UML 20
Sybase PowerDesigner
Generating PHP scripts from UML
Marcus Börger PHP meets UML 21
Sybase PowerDesigner
Generating PHP code for constants
Marcus Börger PHP meets UML 22
What to do nextAutomatically generate data query classes
Extending PHP’s reflection API to write XMI
Typehints for properties and return values
Implement roundtrip engineering
Implement a script packaging extension
Extend PHP with the keyword ‘package’
Marcus Börger PHP meets UML 23
What else?
Using PHP to script UML tools
Generate PHP code from Activity Diagrams
Validating generated PHP code
Marcus Börger PHP meets UML 24
LinksThis slides
http://somabo.de/talksPHP
http://php.netDoxygen
http://doxygen.orgArgoUML
http://argouml.tigris.orgPoseidon
http://www.gentleware.comUmbrello
http://uml.sourceforge.netWaterproof
http://www.waterproof-software.com/uml/PowerDesigner
http://www.sybase.com/products/enterprisemodeling