Published 2008-06-18 23:23:00

CSS hackers needed.


Yes, the first test version of roojs1 is built and working you can have a look here to see the old ExtJS1 examples (which where sourced from a 0.40 release licenced under a BSD licence)
http://www.akbkhome.com/roojs1/examples

Warning this may break occasionally as I do daily builds of the library

Most of the main layout, windows, grid and tree work pretty well, but there are some problems with toolbars, menus and forms. Basically I could not find complete licence free sources for any of them. So if you know anyone who can create CSS for the missing parts (and can illustrate reasonably well that it was not based on the original ExtJS CSS) send them over this way. That will help RooJS2 as well, as the CSS is probably pretty similar.

Have a look at http://www.akbkhome.com/roojs1/css/roojs-debug.css for details on the status of the css build..

A big leap forward in building a truely free high quality JS UI toolkit.

Anyway onto my geeking techo fun.

Rooscript compressor


As part of the whole build toolkit, I've ported the yui compressor to rooscript (the dmdscript based Javascript interpreter), The results are pretty good.

The current output from the compressor is 8K less that the ~497K that ExtJS 1.1.1 files are (built I presume using yui compressor).  Along with this, it's pretty easy to tweak, and remove Files and add your own application (eg. create an all in one  javascript file for your application)

Speedwise I've been trying to get the compressor to go faster (It normally caches the minification result to a file and can do a 'reparse' in arround 2 seconds, but for a fresh build it takes about 6 minutes to parse all the ~100 files in Roojs1

In the process of speeding it up, I've added a few switches to rooscript

  • -p for a very simple profiler (gives you the total time taken for all the opcodes exculuding call/new etc. in each function) along with how many times they where called.
  • -U to turn on Unicode for strings, as I've disabled it by default, although I'm not that sure now, that it produced the speed hit that I thought it might. ** mostly affect things like xx.indexOf("\n")
  • -d (to show all the opcodes as they run) - old but handy sometimes...
The code is reasonably simple, so If you have any great ideas on how to improve compression, it's extremely easy to test how well they work. (rather than the usual compile/run cycle that all the Java versions have)

In looking at the resulting code, one simple opmization that I've started adding to RooJs is changing the constructor code in the object from Roo.data.Connection.superclass.constructor.call(this,....) to Roo.superC(this,....) and Roo.data.Connection.superclass.somemethod.call(this,....) to Roo.superM('somemethod', this,.....)

I'm guessing that's could be ~ 2K of rather wastefull code removed..


Basically since the compressor is working now, I'm going to re-look at the Docs, and sort out the bug's in those - probably replacing the scoping code in jsdoctoolkit, with something closer to the ported yui compresser version.


Mentioned By:
www.planet-php.net : Planet PHP (57 referals)
google.com : december (40 referals)
www.phpeye.com : Roojs1 - working - needs some help, compressor - better than ExtJS - Alan Knowles|PHP教程|PHP新闻|PHP5|PEAR|PHP框架|PHPEy (22 referals)
google.com : yui compressor php (7 referals)
google.com : better than ExtJS (4 referals)
google.com : november (4 referals)
google.com : roojs1 (4 referals)
google.com : zend_view extjs (4 referals)
google.com : roojs2 (3 referals)
planet.dsource.org : Planet D at Dsource (2 referals)
google.com : 1861322 (2 referals)
google.com : call superclass constructor php (2 referals)
google.com : call yui compressor from php (2 referals)
google.com : call yuicompressor from php (2 referals)
google.com : php html compressor (2 referals)
google.com : PHP planet (2 referals)
google.com : php YUI Compressor (2 referals)
google.com : roojs (2 referals)
google.com : working of compressor (2 referals)
blog.astrumfutura.com : Example Zend Framework Blog Application Tutorial - Part 9: Exploring Zend_View and Displaying Blog Entries - Maugrim The Reaper (2 referals)

Comments

CSS Help
I know nothing about your project, except that it appears to be a JS library. I actually got here via php-planet.net , and my eyes were caught by "CSS hackers needed." Well, I'm a CSS hacker, and a pretty good one at that. If you can show it to me on paper, I can make it happen with clean, maintainable, cross-browser, etc. etc. code. Anyway, shoot me an email with the specifics and I'll get back to you.
#0 - Thomas ( Link) on 2008-06-19 03:24:12 Delete Comment
super concepts
looks like I did not think through the super concept all the way..

The best option is to actually use the compresser to re-write the parent calls to the actually method
eg.
b extends a
b.superclass.constructor.call(..)
->
a.call(...)

#1 - Alan Knowles ( Link) on 2008-06-23 12:27:11 Delete Comment

Add Your Comment

Follow us on