1 (edited by Lucas Malor 2008-02-18 22:43)

Topic: Why no Ajax?

I noticed also in PunBB 1.3, Ajax methods are not used, in spite of they speed up and ease the navigation (not telling about bandwidth). Why this?

Re: Why no Ajax?

Because there are browsers that don't properly support it.

Re: Why no Ajax?

Because it would very much go against the PunBB idea of being fast, small, and simple. And as Bekko said, some browsers don't support it, some users don't use Javascript, etc. Extensions are certainly free to implement AJAX-ish features, but I doubt we'll see them in the core.

Re: Why no Ajax?

AJAX should be considered an enhancement, not a requirement - therefore it is well suited for extensions.

my mind is on a permanent tangent
byUsers forum

5 (edited by Lucas Malor 2008-02-19 09:10)

Re: Why no Ajax?

Because it would very much go against the PunBB idea of being fast, small, and simple.

I admit it's not very simple, but it's decidedly a fast and small technology.

And as Bekko said, some browsers don't support it, some users don't use Javascript, etc.

Well, 90% of browsers are Firefox 1.5.x - 2.0.x, or Internet Explorer 6 - 7.All of them support Ajax (IE6 through  ActiveX, ok... but what works with IE6? tongue). I don't know about OSx browsers, but I think the majority supports it.

Furthermore, much people doesn't allow cookies by default too, but they allow trusted sites. I am one of them, I don't allow javascript nor cookies by default.

Anyway there's a way to use Ajax without xmlhttprequest() with PHP

Re: Why no Ajax?

That isn't in any way AJAX.

And 90% of the browsers... that still leaves 10%.

Re: Why no Ajax?

That isn't in any way AJAX

? I'm pretty sure it is. The article describes a way to update dynamically a page, this is what Ajax techniques do. This is the example in the article.

Re: Why no Ajax?

It outputs something from PHP in a Javascript file. That's it. It isn't even asynchronous. AJAX = Asynchronous JavaScript and XML.

9 (edited by intedinmamma 2008-02-19 19:17)

Re: Why no Ajax?

AJAX = Asynchronous Javascript And XML, this solution is more like AJAH. ((X)HTML instead of XML)

But I think this would be a lot better as an extension, and done with unobtrusive JS instead. *strong semi-elitistic opinion*

Edit: Dämmn, elbekko was faster. tongue

Re: Why no Ajax?

But I think this would be a lot better as an extension, and done with unobtrusive JS instead

It's also my opinion. But if you want to be 100% compatible you must use PHP instead of XmlHttpRequest

Anyway, about asynchronous/synchronous, xml/html... do you read also the other 2 pages of the article? wink

Re: Why no Ajax?

Lucas Malor wrote:

But I think this would be a lot better as an extension, and done with unobtrusive JS instead

It's also my opinion. But if you want to be 100% compatible you must use PHP instead of XmlHttpRequest

If you want to be 100% compatible you shouldn't use JS at all, as there are browsers that doesn't support it. wink

12

Re: Why no Ajax?

Just whilst we're on this JS/AJAX type discussion, big_smile is there a non JS method for the go back link used in the message function, (is that still used in 1.3, btw?), other than the back button in the browser? big_smile

Re: Why no Ajax?

The Javascript in PunBB is merely there to improve usability. It isn't required in any way.

Matt: They've been removed in 1.3 AFAIK.

Re: Why no Ajax?

It's just the way IMHO Ajax must used, only to improve usability without being required.

Actually some Ajax techniques are already used, as validateForm, without XmlHttpRequest. But punbb could improve very much more usability with XmlHttpRequest or an alternative PHP method like the one I signalled.

Just think about quick edit, or a "on the fly" form validator. This could be a big, official preinstalled extension.

Re: Why no Ajax?

If it doesn't use XmlHttpRequest, it isn't AJAX. It's Javascript, or if you prefer the very old name, DHTML.

16 (edited by Lucas Malor 2008-02-20 11:19)

Re: Why no Ajax?

Ufff.... this is a pointless discussion... anyway:

AJAX (Asynchronous JavaScript and XML), or Ajax, is a group of inter-related web development techniques used for creating interactive web applications. [...]

JavaScript is the scripting language in which AJAX function calls are usually made. [...]

Data is retrieved using the XMLHttpRequest object that is available to scripting languages run in modern browsers, or alternatively Remote Scripting in browsers that do not support XMLHttpRequest. [...]

In some Ajax frameworks and in certain situations, an IFrame object is used instead of the XMLHttpRequest object to exchange data with the web server, and in other implementations, dynamically added <script> tags may be used.

from Wikipedia

Ajax has a wide sense, further than you think.

Anyway. It's not very interesting how I must name it, or not? wink

Re: Why no Ajax?

Ok, can we please stop arguing about word/acronym choice? Whether or not something is "really" Ajax is not the point.

The general philosophy of PunBB is that it contains the minimum features to run a pleasant, usable forum.

Yes, Ajax-based features might seem nice for some. But then again, without Ajax-based features PunBB works great for thousands of forum users around the world. Only a minority of users "need" Ajax-based features.

From what I can tell, only a minority of users would feel the need for PunBB to use Ajax. As such, I agree with others that Ajax is best used in extensions, not PunBB core.

Looking for a certain modification for your forum? Please take a look here before posting.

18 (edited by Lucas Malor 2008-02-20 22:37)

Re: Why no Ajax?

pogenwurst wrote:

Ok, can we please stop arguing about word/acronym choice? Whether or not something is "really" Ajax is not the point.

Thanks ^_^

pogenwurst wrote:

I agree with others that Ajax is best used in extensions, not PunBB core.

But it's also my opinion, as you can read in one of my previous post.

Anyway, IMHO Ajax methods could improve very much the goal of this forum distribution: simplicity, speed and usability. If anyone is interested, I think I'll start to code something for the first PuBB 1.3 stable release.

PS: I finish with an interesting link: an Ajax framework for PHP under development, that do not need Javacraps at all ^_^ (whops, forget this, I wrong. It do not need js coding sad)

http://tigermouse.epsi.pl/

Re: Why no Ajax?

Lucas Malor wrote:

esting link: an Ajax framework for PHP under development, that do not need Javacraps at all ^_^ (whops, forget this, I wrong. It do not need js coding sad)

http://tigermouse.epsi.pl/

That's not an AJAX framework (like prototype/jQuery), it's an application framework. (like CakePHP, Symphony, etc...) And very few of those requires any JavaScript coding to be able to use AJAX. smile

Re: Why no Ajax?

why not make it as an option for extensions ...

i mean if the browser support it then it should work as it is ajax

but if it doesnt support it ... it should go throught normal type... for example

like quick edit .. if the browser support ajax then it should go to ajax mode ...but if it dosen then the page should go to full edit type

MyFootballCafe.com  is Now Online!

Re: Why no Ajax?

Extensions can add AJAX features. There's nothing to stop them from doing so.

Re: Why no Ajax?

Smartys wrote:

Because it would very much go against the PunBB idea of being fast, small, and simple. And as Bekko said, some browsers don't support it, some users don't use Javascript, etc. Extensions are certainly free to implement AJAX-ish features, but I doubt we'll see them in the core.

On some cases, AJAX is lighter and faster than pure HTML (which one has to have, to degrade gracefully).

One Pun example on the top of my head is item sorting: when you reorganize your forum, it would be faster to just click and drop forums in the correct order than to input sorting key by hand, one by one.

Ok that one is not something done everyday so a full ajax framework written just for that isn't probably a good idea,  but you get my point. AJAX is not, by itself, automatically slower smile

Re: Why no Ajax?

Smartys wrote:

Extensions can add AJAX features. There's nothing to stop them from doing so.

yes i know ... i was talking about extensions too

MyFootballCafe.com  is Now Online!

Re: Why no Ajax?

Jérémie wrote:
Smartys wrote:

Because it would very much go against the PunBB idea of being fast, small, and simple. And as Bekko said, some browsers don't support it, some users don't use Javascript, etc. Extensions are certainly free to implement AJAX-ish features, but I doubt we'll see them in the core.

On some cases, AJAX is lighter and faster than pure HTML (which one has to have, to degrade gracefully).

One Pun example on the top of my head is item sorting: when you reorganize your forum, it would be faster to just click and drop forums in the correct order than to input sorting key by hand, one by one.

Ok that one is not something done everyday so a full ajax framework written just for that isn't probably a good idea,  but you get my point. AJAX is not, by itself, automatically slower smile

Why overdo it. Use javascript to reorder items, fine, but leave the save button. This wouldn't require AJAX.

25

Re: Why no Ajax?

It was probably a bad example because it wouldn't actually be quicker if you only have a couple of forums and certainly wouldn't be quicker for anybody who couldn't use a mouse.

The only area where I see any real benefit would be form validation and error message handling.