We read:
Planet PHP
Planet MySQL
Exciting E-Commerce
E-Commerce Blog
Fischmarkt
fukami
Lars Jankowfsky
Themenblog
Thomas Bachem
Matt Asay on OpenSource
Joel on Software
Ibrahim Evsan
Hasematzel
Techcrunch
Indiskretion Ehrensache
Sichelputzer
Alexander Schwinn
Managing Tech
F-LOG-GE
trycatchfinally
PHProjekt V6, our little beastbee and Open Source project management software, kicks out of the door on March 18th as GA. It's a complete rewrite (and thus, a major version update was needed) with Zend Framework and dojo and now licensed under LGPL (earlier versions were licensed under GPL). You may ask what you want to do until March 18th? Well, besides eating popcorn for Film@11:
The bee is watching you!
dojo.xhrPost({
url: myUrl,
error: function(error, handle) {
handleError(myUrl, error);
},
load: function(response) {
if (false != response.data) {
showToaster(response.data);
}
},
handleAs: 'json'
});
$counter = 0;
$maxLoops = 4;
$data = array();
while ($counter != $maxLoops) {
$counter++;
$data = $this->getMessage($userId); // get data from database
if (false === empty($data)) {
return $data; // there is something new, return immediately
}
sleep(5); // nothing is new, sleep for 5 sec.
}
return $data; // return the empty array

We are pleased to host the next dojo.beer session in our office in Munich!
This event is again organized by uxebu. Please check for more information the blog posting at dojo campus.
If you want to join the gathering, post in the IRC channel #dojo, mail to rsvp {at} dojotoolkit.org or just drop a comment to this blog posting.
As
my last projects were mostly web 2.0 online applications I had to do
a lot of javascript programming. Using JS-Frameworks like JQuery or
Dojo the size of all necessary javascript files had added up to more
than one megabyte. Even today with highspeed internet connections one
megabyte needs several seconds to be transferred, so I had to find a
way to reduce the size of the code. For all my previous projects I
used Dean
Edwards Packer. This amazing packer was able
to reduce it to appr. a fourth of the original size. Getting this
nice result I was wondering if the tool delivered with Dojo – the
Dojo
Shrinksafe – or other minification tools
like JSMin
and the YUI
Compressor could do this as well. After some
tests, however, I realized that they couldn't.
Searching
the web for more information about the best way I found a cool tool /
website that shows the transfer sizes of well known javascript
libraries after minification / packing. It is also possible to let
the tool calculate the results for your own piece of code:
http://compressorrater.thruhere.net/
In
addition, the tool also calculates the size of a transfer with
http-compression (gzip). Before I found this website I did not see
the size after minification / packing and compression in combination.
Perhaps I should have done this before...
Analyzing
the results of CompressorRater it seems that Dean Edwards Packer
might really be the best choice – even with zip compression. Very
interesting is the fact that the results of packing and minification
is nearly the same after zip compression.
Yet
the size of javascript files and their transfer speed is only one
aspect which affects the loading delay of websites. The other aspect
is the time the browser needs to interpret those scripts. As packed
files have to be interpreted twice – first to eliminate the eval
and second to interpret the generated code – their loading delay is
higher than those of minified files.
After
taking a closer look at the loading time of those minimized
javascript files it turned out that the Packer is not always
the best choice: In case of bigger javascript files, the Packer
needs up to several seconds to d'eval the code. This doesn't matter
so much in web applications where javascript is only loaded and
interpreted once at the beginning but it will slow down a typical
website even more because javascript has to be interpreted at each
site request, even if it is in the browser's cache. Using a minified
script avoids this.
Summarizing
I suggest to use Packer only if it is not possible to realize an
http-compression.
Eine API-Referenz auf dem Desktop - das kennt man.
Primitives HTML. Manchmal gepresst in eine CHM-Datei. (Compiled HTML Help).
Getoppt wird dieser klassische Ansatz von Desktop-Referenzen jedoch durch eine
Webapplikation, welche mittels Adobe AIR direkt auf den Desktop gebracht wurde.
Es handelt sich dabei um ein durchaus nützliches Tool, das Dojo-Entwicklern
das Leben leichter machen soll: SitePen's Dojo Toolbox.
Sie vereint Dojo API-Referenz, Dojo Release-Builder und KnowHow-Linkliste in einem und
kann einem Webentwickler auch in ihrer frühen Version 1.0.1 schon durchaus
einiges "Gegoogle" ersparen ;-)
Gestern wurde endlich die Version 1.0 von Dojo released (http://dojotoolkit.org). Im Vergleich zu Dojo 0.43 hat sich in Version 1.0 einiges getan, die wichtigste Änderung: es werden nun die Funktionalitäten sauber getrennt in drei kleinere "Projekte". Persönlich freue ich mich, dass in Sachen Performance sich einiges getan hat und die Engine massiv beschleunigt wurde. Bereits in PHProjekt 5 haben wir Dojo für einige Teile eingesetzt, für die Version PHProjekt 6 nutzen wir nun neben einigen Widgets auch die Möglichkeiten des Event- Handlings und der DOM- Manipulation von Dojo, sowie natürlich die Ajax- Funktionalität. In PHProjekt 6 wird eine MVC- Architektur auch auf Seiten des Clients umgesetzt. Unabdingbar für die Entwicklung des Client- MVC ist für mich ebenfalls die Tatsache, dass Dojo ein "normales" objektorientiertes Interface für JavaScript zur Verfügung stellt, das Klassen und Vererbung anbietet. Um es in den Worten von Kollege Hartmann auszudrücken: „Dojo ermöglicht dadurch ernsthafte Programmierung mit JavaScript!“
Leider ist auch mit dieser Version das Problem der Dokumentation nicht endgütig verbessert worden, es bleibt einem nicht erspart, sich durch das „Dojo- Book“ auf den Webseiten zu kämpfen. Hoffentlich gibt sich das im laufe der Zeit, denn das ist immer noch ein großes Manko.
With the advent of Web2.0 and more and more AJAXian applications popping up, there has been a tremendous trend to move from classical desktop applications to web based applications. While you can use an approach of offloading the whole application to the desktop (i.e. with Microweb and the like), more and more JavaScript toolkit libraries offer "offline" functionality. That means there will be functionality for offloading the data to the client and care for the synchronisation to the server later on.
These features are especially useful for application usage where you don't always have Internet connection, but need to synchronize the data later to the server. Dojo, a very powerful JavaScript toolkit, now gives you handy offline features. According to the website:
Dojo Offline is a free, open source toolkit that makes it easy for web applications to work offline. It consists of two pieces: a JavaScript library bundled with your web page and a small (~300K) cross-platform, cross-browser download that helps to cache your web application's user-interface for use offline.
Dojo offline with its small cross-platform, cross-browser download is licensed as BSD, so it's very easy to integrate it into your applications. There's also a video that shows you the usage of the offline tool. Dojo offline is currently marked as Beta. Overall, great work, guys!
5. Dont use javascript global scope in your project
When you develop the application code using dojo and maybe a bit of DOM, avoid using variables outside your function scope. Why ?
If you use Dojo, have a look at the fabulous widgets called TurboWidgets from TurboAjax.com: it's available for non-commercial and commercial usage. One of the great widgets (besides Theme support where you can also create your own corporate theme look and feel) is a data grid which can be customized in a wide variety.
As I've discovered in the TurboWidget forums, they're working on a virtual data grid. Imagine you want to display a list of 100,000 or more items which can be a major pita especially when working with slow internet connectivity. The solution is a real virtual data grid. They showcase a demo here. Release date will be hopefully by end of July, and I'm looking forward to it. :-)
As you can see in the screenshots, while scrolling down the grid will be empty or displaying "..." ....

... while loading the data. After finished loading, it shows the normal grid data:
Unfortunately, we have to wait until end of July, but I hope the guys from TurboAjax will have it ready soon. :-) Combined with a XMLHttpRequest based PHP backend (which will be triggered by the Grid's data model) this will be a very userfriendly solution for displaying large data sets.



















