gc on May 14th, 2009

Hi all,
so much time since my last post! I’ve been involved into so many interesting projects that I could’t even login.

In the meantime a brand new side project idea is born.. All stats looking at the bleeding edge of the CMS/CMR/Framework panorama that I’ve encountered in the last month. None of them is really well suite for rapid application developement inĀ  L(W)AMP environments. What is missing actually is a real visual IDE that fits into your browsers, and helps you deploy a consisten, secure, fast paced application starting from a simple set of tables/relations.

Something like the old visual basic stuff, but integrated with all the latest AJAX widgets and user experience. why should people still develop every single template/form/interface instead of simply concentrate in business logic?

so stay tuned, first lines of code are ready, as usual with prototype & usual suspects in the frontline.
I will publish one module/element/schema/idea per week, any help is greatly appreciated!!

Tags: , , ,

gc on January 26th, 2009

just like my previous script, but with a neat support for <form> tags.
As previous script did, just add TARGET attribute with the ID of your AJAX target.

window.onload=function(){
Event.observe(document.body, ‘click’, function(event) {
var element = Event.element(event);
if (’A’ == element.tagName){
if ($(element.target) != undefined){
new Ajax.Updater(element.target,element.href,
{method:”post”,evalscripts:true})
Event.stop(event);
}

}
});
formz=document.getElementsByTagName(”form”);
for (i=0;i<formz.length;i++){
if ( formz[i].target!=undefined && formz[i].id!= “”){
el=formz[i].id
tar=formz[i].target
Event.observe(formz[i].id, ’submit’, function(event) {
$(el).request({
onSuccess: function(t) {
$(tar).update(t.responseText);
}
})

});
}
}
}

Tags: ,

gc on December 11th, 2008

most web applications have to deal with user provided files. Being them photos, word files, compressed archives, the big problem is what can happen when they become to be so many that become to reach the system limits of your filesystem.
Just think about sites like myspace, hacebook, flikr: they must provide upload features for millions of files/day and every each node of their webfarm cluser should be able to get it in milliseconds.
The solution I usually provide in such case, creates a n-levels of directoryes generating a unique 32-chars wide filename foreach file uploaded and then storing it. this method can fulfill the usual requirements for a medium sized high traffic application, and can store millions of files with no fear for performances.
Each file can be retrieved with a simple numeric ID or a supersecret 32bit key adding security or applications requiring privacy protection.
Also ther’s thumbnail generating method with caching mechanism if eeded.

here you can find it: too much code to explain, but if you don’t understand something, let me know

Tags: , ,