 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
DZone.com: Phar PHP libraries included with a single file
by Chris Cornutt September 23, 2011 @ 11:30:40
On DZone.com today Giorgio Sironi has a new post looking at an interesting, if seldom used, feature of recent PHP releases - packaging applications with phar archives.
Phar is a php extensions that provides the means for distributing code as a single archive, that does not have to be extracted to a folder before usage. The concept is similar to JVM Jars: each archive becomes a virtual directory where files can be accessed. However, the virtual folder is not limited to class loading, but you can open and read internal files as if it were decompresse into a directory.
He includes a brief "hello world" example of packaging up a script into a phar archive and executing it via PHP. He also shows how easy it is to create an archive from current code, making an archive containing the latest Doctrine 2 release for simple inclusion. Phars also allow compression and hashing but has issues with resource management and access external files.
voice your opinion now!
phar archive file compress doctrine2 tutorial
Sander Marechal's Blog: A YuiCompressorFilter for Phing
by Chris Cornutt August 02, 2011 @ 09:16:37
Sander Marechal has been working with Phing in some of his recent development and has created something useful for compressing Javascript and CSS files on the deployment of your application - a YuiCompressor task.
I am going to write several useful extensions, the first of which is a YuiCompressorFilter. Phing already has support for a JavaScrip minifier in the form of the JsMinTask, but the yui-compressor is more useful. Not only does it usually compress better than JsMin, it can also compress CSS files. Also, because my YuiCompressor extension is implemented as a filter instead of a task you can do fancy things like minifying and concatenating files in a single step.
He includes both a sample of the task and it's configuration (the XML) in the post as well as a link to its source over on github.
voice your opinion now!
javascript compress phing task css
Thomas Weidner's Blog: Compression and Decompression for ZF
by Chris Cornutt September 23, 2009 @ 10:26:40
As Thomas Weidner mentions in a new blog post, starting with the 1.10 release of the Zend Framework there'll be a new component to help with compressing and decompressing files - Zend_Filter_Compress/Decompress.
The new components Zend_Filter_Compress and Zend_Filter_Decompress provide a unified API for several compression formats. Actually the formats BZ2, GZ, LZF, RAR, TAR and ZIP are implemented: You can not only work with Strings, but also with Files and also with complete Directories.
He includes a quick example of how it will work with both data (like a string) and writing out the information to a compressed file. You can find out more about the component from Thomas' proposal on the Zend Framework wiki.
voice your opinion now!
zendframework compress decompress
Michael Caplan's Blog: Don't Forget to Flush
by Chris Cornutt January 08, 2009 @ 12:09:15
In this recent post to his blog Michael Caplan looks at a feature of PHP that's sometimes forgotten when pushing out larger chunks of data - flushing.
As a recluse who prefers hiding behind servers rather than dancing around your web browser's canvas, I was intrigued with their server side recommendations - however sparse they may be. In particular, flushing generated head content early to speed up overall page delivery and rending time was a technique new to me.
Michael looks at what "flushing generated head content" means and includes a scenario - pulling the top palettes from the COLOURlovers site - and some performance stats on page load time and response time directly from the server (complete with graphs).
voice your opinion now!
flush chunk compress head content load time statistics response
Mike Willbanks' Blog: Performance Tuning Overview
by Chris Cornutt January 31, 2008 @ 11:11:00
Mike Willbanks has posted an introduction he's written up giving some helpful hints at tuning your servers and PHP applications for performance.
The focus of this post is not to show performance related items to specific PHP frameworks since many bottlenecks actually apply before running the framework itself that should certainly be solved up front. Therefore in this posting I attempt to look at simple items that can be deployed in order to produce finer tuned systems.
He talks about a few different aspects:
- PHP Performance Tuning (opcode caching, apc file priming, includes, loops, etc)
- RDBMS Performance Tuning (indexes in queries, query caching, archiving)
- HTTP Performance Tuning (content compression, css sprites, limit modules, etc)
voice your opinion now!
performance tuning http rdbms server cache compress
|
Community Events
Don't see your event here? Let us know!
|