Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Filter_Minify_Javascript Component Proposal

Proposed Component Name Zend_Filter_Minify_Javascript
Developer Notes
Proposers Nick Daugherty
Zend Liaison TBD
Revision 1.0 - 23 April 2010: Initial Draft. (wiki revision: 14)

Table of Contents

1. Overview

Zend_Filter_Minify_Javascript is a filter to minify Javascript code, reducing it's size while keeping all functionality intact

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will minify Javascript.
  • This component will accept strings as input to the filter() method.
  • This component will implement Zend_Filter_Interface
  • This component will generate valid Javascript code
  • This component will implement an adapter system allowing for different methods of minification
  • This component will provide options for control of minification (such as opting not to remove comments, for example)

4. Dependencies on Other Framework Components

  • Zend_Filter
  • Zend_Filter_Interface
  • Zend_Filter_Exception

5. Theory of Operation

Minifying Javascript leads to faster load times on the client by reducing the overall size of Javascript code. This component aims to perform the work of removing comments, extra whitespace, etc while retaining the familiar Zend_Filter interface.

This component can be integrated into other framework components, such as HeadScript view helper for automatic Javascript minification.

The component is used like any other Zend_Filter_* component, passing the string to be minified to the filter() method.

6. Milestones / Tasks

  • Milestone 1: Working prototype checked into the incubator supporting minification of Javascript strings
  • Milestone 2: Working prototype checked into the incubator supporting minification of Javascript files (and optionally writing output to a file)
  • Milestone 3: Unit tests exist, work, and are checked into SVN.
  • Milestone 4: Initial documentation exists.

7. Class Index

  • Zend_Filter_Minify_Javascript
  • Zend_Filter_Minify_Javascript_JsMin
  • Zend_Filter_Minify_Interface

8. Use Cases

UC-01 Minifying a string of javascript

9. Class Skeletons


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.