Zend Framework Getting Started For I5
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Zend Framework Getting Started For I5

  • 9,381 views
Uploaded on

Getting Started with Zend Framework on i5

Getting Started with Zend Framework on i5

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
9,381
On Slideshare
9,367
From Embeds
14
Number of Embeds
2

Actions

Shares
Downloads
209
Comments
0
Likes
3

Embeds 14

http://www.slideshare.net 13
http://health.medicbd.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Internet – Working Your I5 CANCELED GETTING STARTED WITH ZEND FRAMEWORK for i5 ‘Zend Framework QuickStart’ Ed Kietlinski Solutions Consultant Edwardk@zend.com Copyright © 2007, Zend Technologies Inc.
  • 2. ZEND FRAMEWORK AGENDA • I’m Not Larry Bolhuis and Yes PHP is very secure • Some History - Why Zend Framework? • Intro to MVC (Model-View-Controller) design pattern • Let’s look at what it can do for you • Web Services code! • Major features & benefits for the new ZF 1.6 release • Questions? Zend Framework 1.5 Latest Features | 2
  • 3. Zend Framework—In a nutshell The leading open-source PHP framework has a flexible architecture that lets you easily build modern web applications and web services Zend Framework 1.5 Latest Features
  • 4. ZEND FRAMEWORK ADVANTAGES • Best Practices—As an exemplar ZF is best practice. • Productive—reuse code quickly and often. • Simple & Easy—just like PHP, ZF is easy to adopt. • Extensible & Flexible—customize & add your value. • High Quality—rigorously tested + built-in tests to use. • Friendly License—new BSD = reuse code however you like; Apache-like CLA = safety for corporations. • Modern—web services, syndication, AJAX, search, + Zend Framework 1.5 Latest Features | 4
  • 5. PHP Ecosystem Zend Framework 1.5 Latest Features | 5
  • 6. ZEND FRAMEWORK FACTS • 7 Million Downloads • 500+ registered contributors inc Large enterprises • 140,000 lines of PHP code • 87,000 words of documentation translated into 5 major languages Over 520 code examples • 60+ ZF based OpenSource based on SourceForge Zend Framework 1.5 Latest Features | 6
  • 7. 10 Things Every Developer Should Know about Zend Framework 1. Use-at-will architecture 2. Enterprise level development framework 3. Object Oriented, and not ashamed of it 4. Web Services are first-class citizens 5. It’s backed by Zend as well as Community 6. Ajax is not an afterthought 7. Only pure PHP implementation of Lucene 8. A huge community that is just an email away 9. Identity 2.0 10. Documentation up the wazoo ☺ And just in case you forget one of those. . . • Hosting will not be a problem Zend Framework 1.5 Latest Features | 7
  • 8. I5/OS Power Platform Specifics • Zend Framework works the same • Brings the world of MVC to the RPG community • Can use with i5 Toolkit and 5250 API, etc. • PDO for DB2 in beta (See 1.6 RC2) in 1.7 can use PHP/i5 TOOLKIT instead to DB2 PDO DB2 adapter preview version available. • Use PACE Apache port 8000, .htacess critical to ZF Zend Framework 1.5 Latest Features | 8
  • 9. Zend Framework Contributor Process
  • 10. ZEND FRAMEWORK – COMPONENTS Zend Framework 1.5 Latest Features | 10
  • 11. ZF + i5 TOOLKIT + 5250 Bridge API • SBS 5250 API + i5 Toolkit
  • 12. Zend Framework Examples Copyright © 2007, Zend Technologies Inc.
  • 13. Open Source http://magentocommerce.com
  • 14. SELECTED ZEND FRAMEWORK USERS Others: Zend Framework 1.5 Latest Features | 14
  • 15. i5 Specific Example – Beverage Distributor • #1 Wine and Spirits wholesaler in NJ • Application – Web based customer care system. • Problem – Originally a .NET app that was middleware between backend DB2 and frontEnd Web app. Issues with Syncing between FE and BE, data mismatches Finger pointing when problems, different owners at each layer Hard to extend and no onsite expertise
  • 16. MODEL-VIEW- CONTROLLER DESIGN PATTERN Copyright © 2007, Zend Technologies Inc.
  • 17. What is the MVC component? • The heart of ZF web applications Best practice for application workflow CONTROLLER Design pattern that dates back to Smalltalk, circa 1979 • Model: data provider View: user interface VIEW MODEL Controller: request processor • Simple solution in most applications Sensible defaults are built in Flexible and extensible Supports advanced applications
  • 18. RPG Model View Controller (MVC) RPG/Application VIEW (Subroutine) Access/Business Logic 5250 Screen M (DDS) V Presentation logic RPG/Application flow C (Mainline) |16 apr 2008 | 18
  • 19. Option 3: Zend 5250 Bridge Populates Screen values with inputted information using: <?php set_include_path('/usr/local/Zend/5250/API/') ; require_once('Zend/5250.php'); $bridge = new Zend_5250(); $response = $bridge->connect(); $bridge->setInputField('0','user'); RPG/Application $bridge->setInputField('1','password'); // press ENTER VIEW Subroutine $response = $bridge->submit(); $bridge->disconnect(); ?> Access/Business L XM Logic M V t Presentation u es logic r eq I AP 0 52 5 • Reuse Legacy application with new PHP GUI RPG/Application flow C . |16 apr 2008 | 19
  • 20. Option 2: Restructure • Separate business logic from presentation RPG/Application VIEW Subroutine Access/Business Logic M Browser web V Presentation logic • Develop new web services • Develop new GUI infrastructure WEB 2.0 ? PHP + Toolkit C |16 apr 2008 | 20
  • 21. Option 1: Rewrite • Develop new NEW LIFE: business logic VIEW PHP FUNCTION Access/Business Logic M Browser web V Presentation logic • Develop new • Develop new GUI presentation logic WEB 2.0 ? PHP C |16 apr 2008 | 21
  • 22. Options with Zend/PHP • REWRITE • Develop new GUI • Develop new presentation logic • Develop new business logic • RESTRUCTURE • Separate business logic from presentation logic • Develop new web services infrastructure • REFACE w 5250 BRIDGE • Reuse legacy applications with new PHP GUI from 5250 screen . |16 apr 2008 | 22
  • 23. ZF= Developer Best Practices Copyright © 2007, Zend Technologies Inc.
  • 24. 4 ways ZF encourages best practices 1. Object-oriented • Most classes are reusable programming and extensible, allowing you to write less code 2. Testing • User-defined extensions, 3. Documentation plugins, and adapters implement interfaces and 4. Extremely simple should be well-designed classes (i.e.Widgets) • Uses many other design patterns
  • 25. 4 ways ZF encourages best practices 1. Object-oriented • MVC Request and programming Response can be simulated • Built-in testability for 2. Testing Controllers 3. Documentation • Extensive collection of 4. Extremely simple PHPUnit test suites serves as useful example
  • 26. 4 ways ZF encourages best practices 1. Object-oriented • Framework development programming process requires complete manual coverage for every 2. Testing component 3. Documentation • Framework coding standards include complete 4. Extremely simple API docblocks to support reference documentation and development tools • Examples and use cases a requirement for each component
  • 27. 4 ways ZF encourages best practices 1. Object-oriented • Simple interfaces are better programming for: Usability 2. Testing Extensibility 3. Documentation Testability 4. Extremely simple Maintainability • Avoid “AntiPatterns” Functional decomposition Spaghetti code http://www.antipatterns.com/
  • 28. 3 tools ZF offers to improve application security 1. Zend_Filter_Input • Processes values of form fields 2. Zend_Auth • Declares rules for filtering 3. Zend_View and validating input data • Serves as a “cage” for data; only valid data come out • Provides method for escaping values, to make them safer for HTML output
  • 29. 3 tools ZF offers to improve application security 1. Zend_Filter_Input • Abstract interface to login credential storage 2. Zend_Auth *SBS • Provides adapters for 3. Zend_View several directory solutions LDAP File Database table others • Write your own custom directory adapters
  • 30. 3 tools ZF offers to improve application security 1. Zend_Filter_Input • Provides a method to format PHP objects more 2. Zend_Auth safely for HTML: 3. Zend_View *SBS <?= $this->escape($this->var); ?>
  • 31. 5 ways ZF helps to avoid reinventing the wheel 1. Zend_Acl • Manages application roles, resources and privileges 2. Zend_Feed • Roles and Resources may 3. Zend_Log be user-defined classes 4. Zend_Cache • Supports rule inheritance 5. Zend_Config • Supports conditional application of rules
  • 32. 5 ways ZF helps to avoid reinventing the wheel 1. Zend_Acl • Consume RSS feed in a single line of PHP code 2. Zend_Feed • Discover feed links 3. Zend_Log automatically 4. Zend_Cache • Imports feeds from multiple sources 5. Zend_Config • Provides feed building and posting operations
  • 33. 5 ways ZF helps to avoid reinventing the wheel 1. Zend_Acl • Support advanced yet easy logging operations in your 2. Zend_Feed application 3. Zend_Log • Inspired by log4j 4. Zend_Cache • Supports user-defined log formatting and writing 5. Zend_Config
  • 34. 5 ways ZF helps to avoid reinventing the wheel 1. Zend_Acl • Provides an interface to access persisted data 2. Zend_Feed • Supports tagging, 3. Zend_Log manipulating, iterating, and 4. Zend_Cache *SBS removing subsets • Supports multiple cache 5. Zend_Config storage backends (file, database, memcached, etc.)
  • 35. 5 ways ZF helps to avoid reinventing the wheel 1. Zend_Acl • Simplifies usage of configuration data for 2. Zend_Feed applications 3. Zend_Log • Provides a property-driven 4. Zend_Cache OO interface for accessing data hierarchy 5. Zend_Config • Supports multiple storage formats (.INI files, XML) • Supports inheritance of configuration sections • Optional; Zend Framework is configuration-less
  • 36. A SOAP SERVER • Zend_Soap_Server class is intended to simplify Web Services server part development. • It’s OO wrapper around SOAP PHP extension SoapServer class which gives a flexible way to operate SOAP Server object. • Two operational modes: WSDL and non-WSDL.
  • 37. SOAP – Server example
  • 38. SOAP - Client • Zend_Soap_Client class is intended to simplify Web Services client part development. • Two operational modes: WSDL and non-WSDL. • Base for specific clients development (e.g. Zend_Soap_Client_DotNet is under development now).
  • 39. SOAP Client - Example
  • 40. MVC CURRENT APIs & WEB SERVICES Data Web Services Int. BASE Our Technology “We have created a StrikeIron API in Zend Framework because of its Web services consumption capabilities Partners: and the momentum it is experiencing as a platform for developing Web applications. This makes it extremely easy for PHP developers to access multiple StrikeIron services in a consistent way, greatly extending the capabilities of Web apps that utilize Zend Framework.” — Bob Brauer, CEO StrikeIron Web Services we include as a part of simpy del.icio.us Zend Framework: Zend Framework Technology Partnerships | 40
  • 41. THE DEVELOPER’S FRAMEWORK THINGS YOU SHOULD KNOW Copyright © 2007, Zend Technologies Inc.
  • 42. New Features in 1.6 • Dojo 1.1.1 Framework integration in ZF JSON-RPC Server (a rewrite) Dojo.data Envelopes Dijit integration with Zend_Form & Zend_View Can custom build once project done to save bandwidth/space • Better SOAP services (ie WSDL generator) • Unit Test for Controllers (Zend_Test_PHPUnit_ControllerTestCase) • Tooling Project (the CLI Tools) • Paginator Component • Zend_Session has new DB option • Media View Helpers (Flash, QuickTime, Object, and Page)
  • 43. Dojo Demo Example and Code online
  • 44. THE DEVELOPER’S FRAMEWORK Tips on how to get Started Copyright © 2007, Zend Technologies Inc.
  • 45. Zend Studio ZF Project will save lots of setup time
  • 46. http://Framework.Zend.com
  • 47. ZF+ZP for Development and Ops
  • 48. Zend Framework Demos • Demos Feeds Gdata • Blogger.php • Calendar.php • Gapps.php • Gbase.php • Spreadsheet Mail Pdf Lucene Search WebServices • Amazon • Flickr • UPC lookup • Yahoo
  • 49. Zend Framework Reference Guide (in PDF too)
  • 50. ZEND FRAMEWORK BOOKS Non-English language books in Japanese, German, Portuguese: Zend Framework 1.5 Latest Features | 50
  • 51. Zend Developer Zone on Zend.com
  • 52. Zend Framework Support
  • 53. Zend Framework Webinars
  • 54. Zend Smart Start Program = Training + Mentoring • Help customers rapidly SBS adopt PHP for their application needs • Get an Proof of Concept, that addresses a customer’s real business problem, up and running in 30 calendar days • Bridge the learning gap between RPG and PHP • Provide a foundation for leveraging PHP applications to address business objectives
  • 55. Q&A Copyright © 2007, Zend Technologies Inc.