<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
Zend_Filter_Minify_Html is a filter to reduce the size of Html strings and files, resulting in faster client downloadsZend Framework: Zend_Filter_Minify_Html Component Proposal
Proposed Component Name
Zend_Filter_Minify_Html
Developer Notes
http://framework.zend.com/wiki/display/ZFDEV/Zend_Filter_Minify_Html
Proposers
Nick Daugherty
Zend Liaison
TBD
Revision
1.0 - 23 April 2010: Initial Draft. (wiki revision: 15)
Table of Contents
1. Overview
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
4. Dependencies on Other Framework Components
5. Theory of Operation
Minifying html leads to faster load times on the client by reducing the overall size of html code. This component aims to perform the work of removing comments, extra whitespace, etc while retaining the familiar Zend_Filter interface.
Zend_Filter_Minify_Html will use the ZF Css and Javascript minifier components to handle any internal <script> and <style> tags encountered when performing minification. This will ensure that all Javascript and Css is kept valid and the resulting html is as minified as possible.
The component can be used by other ZF components, such as Zend_View itself, to (optionally) automatically minify html (and js/css) when rendering output.
The component is used like any other Zend_Filter_* component, passing the string (or filename) to be minified to the filter() method.
6. Milestones / Tasks
- Milestone 1: design notes will be published here
- Milestone 2: Working prototype checked into the incubator supporting minification of Html strings
- Milestone 3: Working prototype checked into the incubator supporting minification of Html files (and optionally writing output to a file)
- Milestone 4: Unit tests exist, work, and are checked into SVN.
- Milestone 5: Initial documentation exists.
7. Class Index
- Zend_Filter_Minify_Exception
- Zend_Filter_Minify_Html
8. Use Cases
| UC-01 |
|---|
| UC-02 |
|---|
| UC-03 |
|---|
This filter could be implemented in a late running plugin or as on option for Zend_View and layouts to automatically minify Html before sending it to the client.
1 Comment
comments.show.hideAug 24, 2010
Ryan Mauger
<ac:macro ac:name="note"><ac:rich-text-body><p><strong>Community Review Team Recommendation</strong></p>
<p>The CR Team recommends this component be included as is for 1.11 and 2.0 into the Zend_Filter_Minify namespace</p>
</ac:rich-text-body></ac:macro>