Single js file when calling multiple js files/plugins

Bug #1018825 reported by TitanKing
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PHPDevShell
Confirmed
Wishlist
TitanKing

Bug Description

Had this great idea, just like Smarty creates templates, we could too create templates when multiple js files are called from within the view. Say for instance I have this;

<?php

class fileManagerView extends PHPDS_view
{
 public function execute()
 {
  $template = $this->template;

  $template->jqueryUI('selectable');
  $template->jqueryUI('draggable');
  $template->jqueryUI('droppable');
                $template->sendJSFileToHead('someurl');
               $template->sendJSToHead('<!-- someurl -->');
 }
}

Instead of calling 4 files, the system creates a fileManagerView.tmp.js file inside the write/compile directory and calls only this single js file. It does inspect changes and overrides the tmp file if needed.

Revision history for this message
Greg (gregfr) wrote :

This look like a makefile having a good system could be a huge task.
Furthermore it's what spdy is made for (http://en.wikipedia.org/wiki/SPDY).

I'm not sure it's our job to do that, although I can clearly see the immediate benefits

Greg (gregfr)
Changed in phpdevshell:
importance: High → Wishlist
Greg (gregfr)
Changed in phpdevshell:
milestone: 3.2.1-stable → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.