Difference between revisions of "WebIssues/Web Client"

From MiMec
Jump to: navigation, search
(javascript)
(javascript)
Line 12: Line 12:
  
 
==javascript==
 
==javascript==
 +
 +
The front end will be mainly driven by [http://extjs.com/ Ext.js]. Its worth taking some time to check out the samples and the extensive API's. The system works more like XUL, Gnome, Qt etc where components are packed into an area so some experience in this area is useful. There's hardly any HTML in there.
 +
 +
As the web client will really heavily on javascript, then we need to be pretty careful about name space, and Ext comes with its own "namespace manager" etc.This is currently being researched.
 +
 +
All JavaScript needs to pass the [http://jslint.com jslint] test, which means that global variables need to be declared at the top of any js file with <code>/*global Foo, Bar */<code> - note no space /*g
 +
 +
 +
 
===$JS_LIBS===
 
===$JS_LIBS===
 
There is a <code>$JS_LIBS</code> variable in the <code>config.local.php</code> file and points to the "js" subdirectory of the webissues directory.  
 
There is a <code>$JS_LIBS</code> variable in the <code>config.local.php</code> file and points to the "js" subdirectory of the webissues directory.  
  
One optimization trick is to locate the javascript libraries/style sheets on another domain. For example a http://libs_sub.domain.com can be optimized with compression and caching enabled. The rationale is that normally a browser out of courtesy will only make around five concurrent connections to a server, so having some material on another domain, even serving from the same machine really does speed things up.
+
One optimization trick is to locate the JavaScript libraries/style sheets on another domain. For example a http://libs_sub.domain.com can be optimized with compression and caching enabled. The rationale is that normally a browser out of courtesy will only make around five concurrent connections to a server, so having some material on another domain, even serving from the same machine really does speed things up.

Revision as of 00:17, 25 February 2008

Here the overall idea of the web design, and as usual this document is subject to change.

The target web client is based on the following components being available.

apache

database

php

smarty

javascript

The front end will be mainly driven by Ext.js. Its worth taking some time to check out the samples and the extensive API's. The system works more like XUL, Gnome, Qt etc where components are packed into an area so some experience in this area is useful. There's hardly any HTML in there.

As the web client will really heavily on javascript, then we need to be pretty careful about name space, and Ext comes with its own "namespace manager" etc.This is currently being researched.

All JavaScript needs to pass the jslint test, which means that global variables need to be declared at the top of any js file with /*global Foo, Bar */<code> - note no space /*g


$JS_LIBS

There is a <code>$JS_LIBS variable in the config.local.php file and points to the "js" subdirectory of the webissues directory.

One optimization trick is to locate the JavaScript libraries/style sheets on another domain. For example a http://libs_sub.domain.com can be optimized with compression and caching enabled. The rationale is that normally a browser out of courtesy will only make around five concurrent connections to a server, so having some material on another domain, even serving from the same machine really does speed things up.