Thursday, March 6, 2008

Jaxer and ... not possible yet

Unfortunately, my experience with Jaxer has been really cool but this project is too young to be used as a server side project, and this is only my opinion.

First of all, the simple File API is great, but if you look for binary safe in the search form, you'll be redirect in an empty page ... quite hilarious, isn't it?!

Anyway, I did not test the"wb") mode, probably it's working, probably not ... who care about that? Me, because to pre compile projects using MyMin and then Zlib I need to write in binary mode ... no way guys!

At the same time, there's not a true bridge for Java, at least that what I was looking for, since Jaxer could be integrated with TomCat, I wonder what are they waiting for to create an easy interface to call directly Java, or whatever mature server language you want.

It will be an extreme start up improvement for your project, what's not possible yet, will be with some Java, Mono, Python, Ruby, PHP, or whatever is it, wrapper.

Is this in your roadmap? None, I can read about DRW but come on guys, the server before the client!

You can have the best Ajax based solution on client, but if the server could do things that a basic PHP / JS interaction could do since 2000 or before, I wonder why you are putting so much effort on client side, where we have a lot of choice, while what we do not have, is simply Jaxer, but on server ;)

Finally, good stuff, and good project, I wish you all the best but please, think about Ajax after a good bridge ... and of course, I eat JavaScript in the morning and I compile them during the night :lol: ... are you still looking for a JS ninja ?

Enjoy Jaxer, at least for fun, this project will become awesome the day it will integrate JS2 engine!

P.S. I created a parseIni method as well ... this is not probably perfect but hey, about 20 minutes debug included :geek:

MyMin = {Creator:function(){}};
MyMin.Creator.prototype.parseValue = function(value){
var result;
case value instanceof Array:
result = [];
for(var i = 0, length = value.length; i < length; i++)
result[i] = this.parseValue(value[i]);
case /^true$/i.test(value):
result = true;
case /^false$/i.test(value):
result = false;
case /^[0-9]+$/i.test(value):
result = parseInt(value);
case /^[0-9]*\.[0-9]+$/i.test(value):
result = parseFloat(value);
result = value;
return result;
MyMin.Creator.prototype.parseIni = function(fileContent){
var self = this,
pos = 0,
result = {},
trim = /^\s+|\s+$/g,
while(pos < fileContent.length){
pos = fileContent.indexOf("[");
if(pos < 0)
fileContent = fileContent.substr(++pos);
pos = fileContent.indexOf("]");
if(pos < 0)
section = fileContent.substr(0, pos++);
fileContent = fileContent.substr(pos);
pos = 0;
result[section] = {};
fileContent.replace(/(\[.+\]|.+=[^;\n\r]+)/gm, function(match, sub, p){
if(pos === 0 && /^\[.+\]/.test(match))
pos = p;
else if(pos === 0){
value = match.split("=");
name = value[0].replace(trim, "");
name = name.substr(0, name.indexOf("["));
result[section][name] = [];
result[section][name].push(self.parseValue(value[1].replace(trim, "")));
result[section][name] = self.parseValue(value[1].replace(trim, ""));
fileContent = fileContent.substr(pos);
pos = 0;
return result;

No comments:

Post a Comment