News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Getting Started with Assetic
April 14, 2014 @ 10:37:00

The SitePoint PHP blog has a new post from Lukas White today looking at the Assetic asset management library and how you can get started using it in your application.

There was a time when asset management meant little more than inserting a <link> tag or two and a couple of <script> tags into your HTML. Nowadays, though, that approach just won't cut it. There's performance, for one thing. [...] Also, as client-side applications have become more and more sophisticated, managing dependencies amongst scripts and libraries has become increasingly complex. Furthermore, technologies such as Less, Compass and Coffeescript require assets to be compiled, adding yet another step to the process of managing assets. In this article I'm going to look at a PHP package called Assetic which helps manage, compile and optimize assets such as scripts, stylesheets and images.

He briefly discusses asset management first, just to get everyone on the same page as far as what "assets" are and some considerations about their use. Next is an introduction to the Assetic library itself and the install/usage of a simple "AssetCollection" object. He also shows how to add assets to the object and how to configure compression and generation of the files (like with LESS). He also shows how to use the AssetManager and FilterManager object types along with the AssetFactory handler. Finally, he talks about some of the sample output and caching the tool can do with file-based cache handling.

0 comments voice your opinion now!
assetic introduction asset tutorial javascript css less compress

Link: http://www.sitepoint.com/getting-started-assetic

blog comments powered by Disqus

Similar Posts

The Bakery: ToniAcl Component Tutorial

Padraic Brady's Blog: Zend Framework Blog Tutorial - Part 6: Zend_Form & Zend_Auth

PHPBuilder.com: PHP Development on the Facebook Platform: Building Your First App

PHPBuilder.com: Building RESTful APIs with the Slim Microframework

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 8)


Community Events





Don't see your event here?
Let us know!


conference list introduction series threedevsandamaybe symfony laravel community interview podcast version framework configure composer release language api opinion unittest voicesoftheelephpant

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework