Open Source PHP RAD Framework with UI.

Single js file when calling multiple js files/plugins

Reported by TitanKing on 2012-06-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PHPDevShell
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.

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) on 2012-07-18
Changed in phpdevshell:
importance: High → Wishlist
Greg (gregfr) on 2013-06-11
Changed in phpdevshell:
milestone: 3.2.1-stable → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers