homepage Welcome to WebmasterWorld Guest from 54.242.200.172
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Ultimate Asset Management
httpwebwitch




msg:4578048
 1:47 am on May 27, 2013 (gmt 0)

I'm looking for the best design pattern & solution for asset management. We're using LESS for the CSS, so I'm looking for something robust to handle our jQuery-powered script assets.

I want:
- script versioning
- cache control
- minifying & script concatenation
- dependency management

What's the best way to do all this on a large PHP-based project?

I am a fan of:
- Minify (http://code.google.com/p/minify/)
- Assetic (https://github.com/kriswallsmith/assetic/)

Require.js (http://requirejs.org/) looks promising, but I don't understand how to incorporate it into a PHP project... ?

 

httpwebwitch




msg:4578051
 2:06 am on May 27, 2013 (gmt 0)

"Jingo" is another dependency management tool:

[code.google.com...]

coopster




msg:4581380
 5:32 pm on Jun 5, 2013 (gmt 0)

What's the best way to do all this on a large PHP-based project?


The million dollar question. And the answers will be about as unique and broad as there are developers. It will likely come down to your personal preference. I'll share what I'm using and you can take or leave the pieces, investigate, etc. Fair enough?

Have you ever considered SASS? I prefer SASS (Compass) over LESS. I wrote my own Ant build to automatically compile any and all .sass/.scss in my Eclipse IDE when changes are made. The build monitors updates across a project and makes an exploded and fancy indented copy for development/testing/troubleshooting as well as a compressed version for production. This way I just develop as normal without having to be concerned about using the "create new project" and "watch/compile project" features of these nifty tools. It's open source, on github https://github.com/teeaykay/SassCompassCompiler

I use:
  • version control: git
  • cache-control (cache busting?): Apache configuration ( fairly good read on how to approach this at H5BP: https://github.com/h5bp/server-configs/blob/master/apache/README.md )
  • minifier: YUI [yui.github.io...]
  • dependency management: ?

On that last one I have my projects setup to handle this by default.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved