<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 21:07:54 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[LineshJose.com: How To: Create A Simple CSS Compressor Using PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18053</guid>
      <link>http://www.phpdeveloper.org/news/18053</link>
      <description><![CDATA[<p>
In <a href="http://tech.lineshjose.com/how-to-create-a-simple-css-compressor-using-php/">this recent post</a> to his blog <i>Linesh Jose</i> shows you how to create a simple PHP-based compressor for your CSS (using some string replacement methods and a regex or two).
</p>
<blockquote>
CSS or Cascading Style Sheets is a language used to describe the presentation of a document written in a markup language. If you're developing a very complex design for your site, CSS scripts become very long, and takes too much time to load. But a compressed CSS script can help your website load faster and easily maintain its functionality. Here, I've created a very simple CSS compressor using PHP to compress or reduce CSS script size.
</blockquote>
<p>
You can read through the example code and see how it all works or you can <a href="http://files.lineshjose.com/files/get/u8qkQWsAJs/css-compressor.zip">download the code</a> and <a href="http://demo.lineshjose.com/php/css_compressor/">see a live demo</a> of it in action. His script does the compression on the fly, but it's not a far stretch to get it set up as a part of a build to output to a file on deployment.
</p>]]></description>
      <pubDate>Wed, 06 Jun 2012 08:44:26 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Automatic CSS3 Prefixer and Compressor]]></title>
      <guid>http://www.phpdeveloper.org/news/17700</guid>
      <link>http://www.phpdeveloper.org/news/17700</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing how to use a little PHP magic to <a href="http://phpmaster.com/automatic-css3-prefixer-and-compressor/">compress your CSS</a> automatically.
</p>
<blockquote>
There are many ways to compress CSS files or automatically generate browser-specific CSS3 prefixes, but usually extra tools are used which is very annoying. I'd like to show you how such tasks can be done using only PHP. 
</blockquote>
<p>
Complete code for this small script is included in <a href="http://phpmaster.com/automatic-css3-prefixer-and-compressor/">the article</a>. It uses some regular expressions to parse the CSS and does some replacement and removal of things from the CSS content to slim it down and format it all as one line. There are <a href="http://cdn.phpmaster.com/files/2012/03/css-regex1.png">some</a> <a href="http://cdn.phpmaster.com/files/2012/03/css-regex2.png">images</a> <a href="http://cdn.phpmaster.com/files/2012/03/css-regex3.png">illustrating</a> the <a href="http://cdn.phpmaster.com/files/2012/03/css-regex4.png">process</a> also included.
</p>]]></description>
      <pubDate>Tue, 20 Mar 2012 12:38:30 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: Phar: PHP libraries included with a single file]]></title>
      <guid>http://www.phpdeveloper.org/news/16900</guid>
      <link>http://www.phpdeveloper.org/news/16900</link>
      <description><![CDATA[<p>
On DZone.com today <i>Giorgio Sironi</i> has a new post looking at an interesting, if seldom used, feature of recent PHP releases - <a href="http://css.dzone.com/articles/phar-php-libraries-single-file">packaging applications with phar archives</a>.
</p>
<blockquote>
<a href="http://php.net/phar">Phar</a> 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.
</blockquote>
<p>
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.
</p>]]></description>
      <pubDate>Fri, 23 Sep 2011 11:30:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: How to Use the Nettuts+ Phing Build Script]]></title>
      <guid>http://www.phpdeveloper.org/news/16751</guid>
      <link>http://www.phpdeveloper.org/news/16751</link>
      <description><![CDATA[<p>
NetTuts.com has come up with a <a href="http://phing.info">Phing</a> (the automated build tool written in PHP) build script that designers can drop in as a part of their deployment process to <a href="http://net.tutsplus.com/tutorials/tools-and-tips/how-to-use-the-nettuts-phing-build-script/">compress, concatenate and Prefixize</a> all of their stylesheets and scripts.
</p>
<blockquote>
We've created a build script for <a href="http://phing.info/">Phing</a> that will give designers the ability to automatically compress, concatenate, and Prefixize all of their stylesheets and scripts - simply by typing five characters. I'll show you how to use it in this quick tip video.
</blockquote>
<p>
The post includes <a href="http://net.tutsplus.com/tutorials/tools-and-tips/how-to-use-the-nettuts-phing-build-script/">a screencast</a> showing you how to get it all set up and working with the rest of your Phing install. They don't help you set up Phing - you'll need that already set up and running to use the task. You can grab teh script <a href="https://github.com/NETTUTS/Phing-Build-Script-for-Web-Designers">directly from github</a>.
</p>]]></description>
      <pubDate>Mon, 22 Aug 2011 11:50:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sander Marechal's Blog: A YuiCompressorFilter for Phing]]></title>
      <guid>http://www.phpdeveloper.org/news/16663</guid>
      <link>http://www.phpdeveloper.org/news/16663</link>
      <description><![CDATA[<p>
<i>Sander Marechal</i> has been working with <a href="http://phing.info">Phing</a> in some of his recent development and has created something useful for compressing Javascript and CSS files on the deployment of your application - <a href="http://www.jejik.com/articles/2011/07/a_yuicompressorfilter_for_phing//">a YuiCompressor task</a>.
</p>
<blockquote>
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.
</blockquote>
<p>
He includes both a sample of the task and it's configuration (the XML) in the post as well as a link to <a href="http://github.com/sandermarechal/phing-ext">its source</a> over on github.
</p>]]></description>
      <pubDate>Tue, 02 Aug 2011 09:16:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: How to Roll Your Own JavaScript Compressor with PHP and the Closure Compiler]]></title>
      <guid>http://www.phpdeveloper.org/news/15051</guid>
      <link>http://www.phpdeveloper.org/news/15051</link>
      <description><![CDATA[<p>
On the SitePoint PHP blog today there's <a href="http://www.sitepoint.com/blogs/2010/08/31/compress-javascript-with-php/">a quick new post</a> showing you how to create a Javascript compressor tool with PHP that uses the <a href="http://closure-compiler.appspot.com/home">Closure Compiler</a> from Google.
</p>
<blockquote>
In my previous post, I discussed the <a href="http://www.sitepoint.com/blogs/2010/08/30/compress-javascript-closure-compiler-rest-api/">Closure Compiler's REST API</a>. In this article, we'll develop a small PHP program that shows how the API can be used to compress JavaScript code whenever you need it.
</blockquote>
<p>
He shows how to compress three "script" tags down into one that defines multiple files for the engine to grab and compress. This is passed into a PHP file that <a href="http://php.net/file_get_contents">grabs the file</a> and passes the data off to the Closure Compiler for handling (via curl). The result is then passed back and served up with a content type of "text/javascript" back to the browser.
</p>]]></description>
      <pubDate>Tue, 31 Aug 2010 12:51:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Thomas Weidner's Blog: Compression and Decompression for ZF]]></title>
      <guid>http://www.phpdeveloper.org/news/13272</guid>
      <link>http://www.phpdeveloper.org/news/13272</link>
      <description><![CDATA[<p>
As <i>Thomas Weidner</i> mentions in <a href="http://www.thomasweidner.com/flatpress/2009/09/20/compression-and-decompression-for-zf/">a new blog post</a>, 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.
</p>
<blockquote>
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.
</blockquote>
<p>
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 <a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Filter_Compress+-+Thomas+Weidner">Thomas' proposal</a> on the Zend Framework wiki.
</p>]]></description>
      <pubDate>Wed, 23 Sep 2009 10:26:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Zend Platform Performance Tuning on IBM i]]></title>
      <guid>http://www.phpdeveloper.org/news/11986</guid>
      <link>http://www.phpdeveloper.org/news/11986</link>
      <description><![CDATA[<p>
The Zend Developer Zone has <a href="http://devzone.zend.com/article/4275-Zend-Platform-Performance-Tuning-on-IBM-i">a new article posted</a> looking to help you squeeze the most performance you can out of the Zend Platform application from <a href="http://zend.com">Zend</a> on your IBM i machine.
</p>
<blockquote>
Zend Platform on IBM I provides many benefits including monitoring and advanced debugging. One of the more confusing issues that customers face with Zend Platform on IBM i is the impact on development machines. Most will try out Zend Platform in a development environment or on a development LPAR.
</blockquote>
<p>
There's three things they suggest to tweak to help you get the most out of Platform - code acceleration, dynamic content caching and code compression.
</p>]]></description>
      <pubDate>Thu, 19 Feb 2009 13:49:03 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Michael Caplan's Blog: Don't Forget to Flush ]]></title>
      <guid>http://www.phpdeveloper.org/news/11702</guid>
      <link>http://www.phpdeveloper.org/news/11702</link>
      <description><![CDATA[<p>
In <a href="http://www.eggplant.ws/blog/php/dont-forget-to-flush/">this recent post</a> to his blog <i>Michael Caplan</i> looks at a feature of PHP that's sometimes forgotten when pushing out larger chunks of data - flushing.
</p>
<blockquote>
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, <a href="http://developer.yahoo.com/performance/rules.html#flush">flushing</a> generated head content early to speed up overall page delivery and rending time was a technique new to me.
</blockquote>
<p>
<i>Michael</i> looks at what "flushing generated head content" means and includes a scenario - pulling the top palettes from the <a href="http://www.colourlovers.com/">COLOURlovers</a> site - and some performance stats on page load time and response time directly from the server (complete with graphs). 
</p>]]></description>
      <pubDate>Thu, 08 Jan 2009 12:09:15 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Friday afternoon toying: eZ Components as phar]]></title>
      <guid>http://www.phpdeveloper.org/news/10505</guid>
      <link>http://www.phpdeveloper.org/news/10505</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> <a href="http://derickrethans.nl/friday_afternoon_toying_ez_components_as_phar.php>finished off</a> last week by playing with a compression and distribution tool that's going to be built into the core release of PHP 5.3 - <a href="http://php.net/phar">phar</a>. More specifically, he tried it out on the eZ Components framework, trying to make a complete release package.
</p>
<blockquote>
A phar is to PHP what a jar is to Java. I spent a little time to see how easy it would be to make our latest <a href="http://ezcomponents.org/">eZ Components</a> release into a workable phar.
</blockquote>
<p>
He includes the few lines of code to make a package (four in his case) and a one-liner on how to use it in your application. Building the package is as easy as running a PHP command line call. 
</p>
<p>
Others in the community have picked up on <a href="http://derickrethans.nl/friday_afternoon_toying_ez_components_as_phar.php">Derick's post</a> and have checked into phar themselves - <a href="http://sebastian-bergmann.de/archives/799-Phar.html">Sebastian Bergmann</a> and <a href="http://feeds.feedburner.com/~r/StuartHerbert/~3/71761987/">Stuart Herbert</a> (on benchmarking phar).
</p>]]></description>
      <pubDate>Mon, 30 Jun 2008 07:56:21 -0500</pubDate>
    </item>
  </channel>
</rss>
