Szczegóły ebooka

PHP 5 CMS Framework Development. For professional PHP developers, this is the perfect guide to web-oriented frameworks and content management systems. Covers all the critical design issues and programming techniques in an easy-to-follow style and structure

PHP 5 CMS Framework Development. For professional PHP developers, this is the perfect guide to web-oriented frameworks and content management systems. Covers all the critical design issues and programming techniques in an easy-to-follow style and structure

Martin Brampton

Ebook
If you want an insight into the critical design issues and programming techniques required for a web oriented framework in PHP5, this book will be invaluable. Whether you want to build your own CMS style framework, want to understand how such frameworks are created, or simply want to review advanced PHP5 software development techniques, this book is for you.As a former development team leader on the renowned Mambo open-source content management system, author Martin Brampton offers unique insight and practical guidance into the problem of building an architecture for a web oriented framework or content management system, using the latest versions of popular web scripting language PHP.The scene-setting first chapter describes the evolution of PHP frameworks designed to support web sites by acting as content management systems. It reviews the critical and desirable features of such systems, followed by an overview of the technology and a review of the technical environment.Following chapters look at particular topics, with:‚Ģ A concise statement of the problem ‚Ģ Discussion of the important design issues and problems faced ‚Ģ Creation of the framework solution

At every point, there is an emphasis on effectiveness, efficiency and security – all vital attributes for sound web systems. By and large these are achieved through thoughtful design and careful implementation.

Early chapters look at the best ways to handle some fundamental issues such as the automatic loading of code modules and interfaces to database systems. Digging deeper into the problems that are driven by web requirements, following chapters go deeply into session handling, caches, and access control.

New for this edition is a chapter discussing the transformation of URLs to turn ugly query strings into readable strings that are believed to be more “search engine friendly” and are certainly more user friendly. This topic is then extended into a review of ways to handle “friendly” URLs without going through query strings, and how to build RESTful interfaces.

The final chapter discusses the key issues that affect a wide range of specific content handlers and explores a practical example in detail.
  • PHP 5 CMS Framework Development
    • Table of Contents
    • PHP 5 CMS Framework Development
    • Credits
    • About the Author
    • Acknowledgement
    • About the Reviewers
    • Preface
      • What this book covers
      • What you need for this book
      • Who this book is for
      • Conventions
      • Reader feedback
      • Customer support
        • Errata
        • Piracy
        • Questions
    • 1. CMS Architecture
      • The idea of a CMS
        • Critical CMS features
        • Desirable CMS features
        • System management
      • Technology for CMS building
        • Leveraging PHP5
        • Some PHP policies
        • Globalness in PHP
        • Classes and objects
        • Objects, patterns, and refactoring
        • The object-relational compromise
        • Basics of combining PHP and XHTML
        • Model, view, and controller
      • The CMS environment
        • Hosting the CMS
        • Basic browser matters
        • Security of a CMS
        • Some CMS terminology
      • Summary
    • 2. Organizing Code
      • The problem
      • Discussion and considerations
        • Security
        • Methods of code inclusion
        • Practicality in coding
      • Exploring PHP and object design
        • Autoloading
        • Namespaces and class visibility
        • Singletons
          • Objections to use of singletons
      • Framework solution
        • Autoloading
          • The smart class mapper
        • Finding a path to the class
        • Populating the dynamic class map
        • Saving map elements
          • Obtaining class information
      • Summary
    • 3. Database and Data Objects
      • The problem
      • Discussion and considerations
        • Database dependency
        • The role of the database
        • Level of database abstraction
        • Ease of development
        • Keeping up with change
        • Database security
        • Pragmatic error handling
      • Exploring PHPindirect references
      • Framework solution
        • Class structure
          • Connecting to a database
        • Handling databases easily
          • Prefixing table names in SQL
          • Making the database work
          • Getting hold of data
          • Higher level data access
          • Assisted update and insert
          • What happened?
        • Database extended services
          • Getting data about data
          • Easier data about data
          • Aiding maintenance
        • Data objects
          • Rudimentary data object methods
          • Data object input and output
          • Setting data in data objects
          • Sequencing database rows
        • Database maintenance utility
      • Summary
    • 4. Administrators, Users, and Guests
      • The problem
      • Discussion and considerations
        • Who needs users?
        • Secure authentication
        • Secure storage of passwords
        • Blocking SQL injection
        • Login
        • Managing user data
        • User self service
        • Customizing for users
        • Extended user information
      • Exploring PHParrays and SQL
      • Framework solution
        • The user database table
        • Indexes on users
        • Keeping user tables in step
        • Achieving login
        • Administering users
        • Generating passwords
      • Summary
    • 5. Sessions and Users
      • The problem
      • Discussion and considerations
        • Why sessions?
        • How sessions work
        • Avoiding session vulnerabilities
        • Search engine bots
      • Session data and scalability
      • Exploring PHPframeworks of classes
      • Framework solution
        • Building a session handler
      • Creating a session
        • Finding the IP address
        • Validating a session
        • Remembering users
        • Completing session handling
        • Session data
        • Session data and bots
        • Retrieving session data
      • Keeping session data tidy
      • Summary
    • 6. Caches and Handlers
      • The problem
      • Discussion and considerations
        • Why build information handlers?
        • The singleton cache
          • The disk cache
          • Scalability and database cache
        • The XHTML cache
        • Other caches
      • Exploring PHPstatic elements and helpers
      • Framework solution
        • Abstract cache class
        • Singleton object cache manager
        • Creating the base class cached singleton
        • Generalized cache
      • Summary
    • 7. Access Control
      • The problem
      • Discussion and considerations
        • Adding hierarchy
        • Adding constraints
        • Avoiding unnecessary restrictions
        • Some special roles
        • Implementation efficiency
        • Where are the real difficulties?
      • Exploring SQLMySQL and PHP
      • Framework solution
        • Database for RBAC
        • Administering RBAC
        • The general RBAC cache
        • Asking RBAC questions
      • Summary
    • 8. Handling Extensions
      • The problem
      • Discussion and considerations
        • An extension ecosystem
          • Templates in the ecosystem
          • Modules in the ecosystem
          • Components in the ecosystem
          • Component templates
          • Modules everywhere
        • More on extensions
          • Templates
          • Modules
          • Components
            • Component for the administrator
            • Component for the user
            • Component standard structure
          • Plugins
        • Extension parameters
      • Exploring PHPXML handling
      • Framework solution
        • Packaging extensions
        • Module interface and structure
        • The logic of module activation
        • Component interface and structure
          • A standardized component structure
        • Plugin interface and structure
        • Invoking plugins
        • Applications
        • Installing and managing extensions
          • Structuring installer tasks
          • Putting extension files in place
          • Extensions and the database
          • Knowing about extension classes
      • Summary
    • 9. Menus
      • The problem
      • Discussion and considerations
        • Page management by URI
        • Menu database requirements
        • Menu management
        • Menu construction
        • Menu presentation
      • Exploring PHParray functions
      • Framework solution
        • Building the menu handler
        • Interfacing to components
        • The menu creator
        • An example of a menu module
      • Summary
    • 10. Languages
      • The problem
      • Discussion and considerations
        • Character sets
        • UTF-8 and XHTML
        • Specifying languages
        • Handling multiple languages in code
        • Languages in CMS extensions
        • Handling languages in data
      • Exploring PHPcharacter sets
      • Framework solution
        • The gettext implementation
          • File formats for gettext
          • Functions for gettext
          • The PHPgettext classes
          • The language class
          • Administrator language application
            • Language details
            • Translation
        • Handling extensions
          • Managing extension translations
          • Installing translations with CMS extensions
          • Handling multilingual data
      • Summary
    • 11. Presentation Services
      • The problem
      • Discussion and considerations
        • Differing points of view
        • Model View Controller
        • XHTML, CSS, and themes
        • PHP for XHTML creation
        • GUI widgets and XHTML
        • Page control and navigation
        • WYSIWYG editors
        • XHTML cleaning
        • The administrator interface
      • Exploring PHPclarity and succinctness
      • Framework solution
        • Using "heredoc" to define XHTML
        • Using templating engines
        • Some widgets
        • Building page control
        • Supporting editors
        • Cleaning up XHTML
        • Administrator database management
        • Customization through subclassing
      • Summary
    • 12. Other Services
      • The problem
      • Discussion and considerations
        • Parsing XML
        • Configuration handling
        • WYSIWYG editing
        • File and directory handling
        • Sending mail
        • Parameter objects
        • Administrator ready-made functionality
        • Exploring PHPfile issues in web hosting
          • Basic file and directory permissions
          • Hosting and ownership
          • Living with split ownership
          • Avoiding split ownership
      • Framework solution
        • Reading XML files easily
        • Storing configuration data
        • Incorporating a WYSIWYG editor
        • Dealing with files and directories
        • Compound parameter objects
        • Administrator ready-made table handlers
      • Summary
    • 13. SEF and RESTful Services
      • The problem
      • Discussion
        • Transforming query strings
        • Direct URI handling and REST
        • Mechanics of URI handling
        • Essential HTTP result codes
        • The importance of metadata
        • Exploring PHPPHP and HTTP
      • Framework solution
        • Efficient lookup of very long keys
        • Cache and database transformation
        • Looking at SEF transformation code
          • Decoding an incoming URI
          • Encoding an outgoing URI
        • Direct URI handling
          • The future of direct URIs
      • Summary
    • 14. Error Handling
      • The problem
      • Discussion
        • PHP error handling
        • Database errors
        • Application errors
        • Exploring PHPerror handling
      • Framework solution
        • Handling database errors
        • 404 and 403 errors
      • Summary
    • 15. Real Content
      • The problem
      • Discussion and considerations
        • Articles, blogs, magazines, and FAQ
        • Comments and reviews
        • Forums
        • Galleries, repositories, and streaming
        • E-commerce and payments
        • Forms
        • Calendars
        • Integrators
        • RSS readers
        • Other categories
        • Exploring technologyaccessibility
          • General good practice
          • Use of JavaScript
          • Validation
      • Framework solution
        • A simple blog application
          • The database table for blog
          • A blog data object
          • Administering blog itemscontroller
          • Administering blog itemsviewer
          • Showing blogs to visitors
          • Menu building
      • Summary
    • A. Packaging Extensions
        • The XML setup file
        • Parameters
          • Parameter types
    • B. Packaging XML Example
    • Index
  • Tytuł: PHP 5 CMS Framework Development. For professional PHP developers, this is the perfect guide to web-oriented frameworks and content management systems. Covers all the critical design issues and programming techniques in an easy-to-follow style and structure
  • Autor: Martin Brampton
  • Tytuł oryginału: PHP 5 CMS Framework Development. For professional PHP developers, this is the perfect guide to web-oriented frameworks and content management systems. Covers all the critical design issues and programming techniques in an easy-to-follow style and structure.
  • ISBN: 9781849511353, 9781849511353
  • Data wydania: 2010-08-18
  • Format: Ebook
  • Identyfikator pozycji: e_3c59
  • Wydawca: Packt Publishing