I have an ajax application or website, what’s the best way to monitoring user interaction?
Google Analytics! (you can use it also if your webapp is an intranet app: GA API sends data to google server from javascript! Then you need just that your application user got an internet access)
How to use Google Analyitics API to log dynamic page events?
Need a test environment to test your DHTML webapp?
This kit is very useful: it’s based on a vmware virtual application packaging technology and gives to you a clean and standalone installation of all major browser, including:
Yes i know, i’m for GWT, Ext, Dojo, Zk, and all the other frameworks that made life easy to web developers abstracting the HTML/CSS and most part of the Js layers, but I come from hard and deep JS/DHTML/CSS hand-programming (HttpXMLRequest sweet HttpXMLRequest) then somethimes i help my collegues to solve classic HTML/Js problems…
One of this is the Interent Explorer buggy way of manage div heights: Any height less than 20px is rendered as 20px.
I just give to you some techniques to hack this annoying IE bug:
1) Put a comment inside an empty div:
<div style="height: 10px;"><!-- --></div>
2) Put a inside the div and add this to its style: font-size:1px;
line-height:0.
In fact, thanks to the Google Document List API and the Google Data Protocol, you can edit your document (replacing strings in the template) via an update of the HTML body of the Google Doc Format. I said HTML body, yes , not Postscript-like formats or hard binary data…
It’s official: I love Google.
This is little demo screencast, enjoy: (is a PDF2FAX application written for my enterprise.)
This is a new message counter demo javascript and html code (at each new message received the new message count is highlighted and magnified for a while.
The function animateFontSize(nodeid,duration) is a little wrapper of 2 nested dojo.animateProperty calls (opportunely delayed)
... New messages (<span id='newmessagecount'>0</span>)
var newMessageCount=0;
function newMessageArrived(msg){
// ....
newMessageCount++;
dojo.byId('newmessagecount').innerHTML=newMessageCount;
animateFontSize('newmessagecount',2000);
}
<?php
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {
$pageURL .= "s";
}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
session_name('MYAPP');
session_start();
if (!isset($_SESSION["user"])) {
include("LdapAuth.inc.php");
$ldap=new LdapAuth();
$ldap->setSessionAttr("user","uid");
$ldap->setSessionName("MYAPP");
$ldap->setRedirectPage($pageURL); //page where we get redirected after login (in this case self)
include("LdapStandalonePageProtector.inc.php");
}
else {
echo "Logged In As: ".$_SESSION["user"]."</hr>";
//paste here the old page code (or write the new page to protect)
}
?>
Configuration:
/* Configuration section: */
private $serviceUser="cn=LdapAuthenticator,ou=Groups,dc=mydomain,dc=com";
private $serviceSecret="serviceUSERpassword";
/* Tip: a service user is required (keeping enabled anonymous access is a bad thing)
* and you are supposed do write some ACL to limit the service user to read-only the cn
* and the uid attribute in the People tree
*/
private $BaseDn="ou=People,dc=mydomain,dc=com"; //where are the users in the tree?
private $UIDAttributeName="uid"; // what attribute you wanna search for the search & bind login?
//e.g. "mail" let users to login with their email address and password
private $ServerList = Array(
/* Multiple LDAP Servers: for load balancing/ HA redundancy mode, not for multi-ldap auth!!!!
* (Server MUST have some user tree synchronization mechanism e.g. <a class="zem_slink" title="OpenLDAP" rel="homepage" href="http://www.openldap.org/">OpenLDAP</a> syncrepl ) */
Array(
"ip"=>"123.123.123.123",
"name"=>"ldap-master",
"sslport"=>636,
"port"=>389
),
Array(
"ip"=>"ldap125.mydomain.com",
"name"=>"ldap-replica",
"sslport"=>636,
"port"=>389
)
/* You can add or remove LDAP server entries (But this is not multi-ldap:
* servers MUST have the same user tree */
);
private $accessLogFile="ldap.access.log"; //file where access will be logged
/* Optional parametes (keep it to empty or wrong string if you don't want AuhtZ attributes: */
/*
* Note: all attribute names MUST be written in lowercase e.g. givenName -> givenname
*/
/* Optional*/ private $AuthorizativeAttrName="member"; //can be multi-value
/* Optional*/ private $AuthorizativeJSONAttrName="x-garr-authoritativejsondata"; //single valued JSON String attribute e.g. {"myappLevel":"admin","yourappLevel":"guest"}
/*
* Other configuration options can be set programmatically, check
* for the setters methods of this class and call it before
* calling the method authenticate() into a page to protect.
*/
/* End configuration. */
L’Alta Formazione dei Laboratori Nazionali del Gran Sasso parte con quattro nuovi corsi destinati ad imprenditori, dirigenti e tecnici delle piccole e medie imprese abruzzesi su Competenze per l’e-tutoring, Sistemi di telecontrollo del territorio, Fonti rinnovabili di energia e Servizi informatici.
This is a pure Javascript/DHTML version of Firebug, it’s a little limited and slower than the Firefox Plugin but is very useful for web-developers because you can embed Firebug in any webapplication and then debug it on all browsers:
For Google Chrome there is also a Firebug Lite Extension (is just a wrapper button), to install it just search firebug in the Chrome Extension directory.