AJAX, jQuery, et. al.

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1830
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

AJAX, jQuery, et. al.

Post by DavidIQ » Wed Dec 16, 2009 3:50 am

Well someone had to bring it up...

I think one of the bigger/noticeable nuisances of current and previous versions of phpBB is all of the page loads required to do trivial tasks. Using AJAX or jQuery or both together for some of the actions performed on a forum would IMO make phpBB take a big leap forward.

Some of the places that I can think of that could benefit from this are:
  • Posting - Quick Reply was added but you still get a screen stating that the post was successful. I suppose that by just simply posting up your message would make it "Quicker Reply"... :lol:
  • Pagination - Maybe the entire page doesn't really need to be reposted to see the next page. This would need a bit more thought.
  • MCP Actions - A lot of them could use without having to reload the page in its entirety.
  • Some ACP actions - Enable/Disable in several ACP areas comes to mind here.
  • Others
I left the last point open as I'm sure there's plenty of other places that could benefit from some dynamic rendering instead of full page postbacks. The standard way of reloading the entire page could be used as a fallback when javascript is disabled.

There might be some other technologies in the works that can accomplish the same thing but that's up for discussion I guess.
Image

User avatar
onehundredandtwo
Registered User
Posts: 33
Joined: Mon Feb 02, 2009 6:55 am

Re: AJAX, jQuery, et. al.

Post by onehundredandtwo » Wed Dec 16, 2009 5:24 am

How about GMail, the way it gives you the option to undo an action (like if you change a setting)?
I really hate the login success screen though - it's not like you could accidently log in. That's definitely a feature I could do without.
Need help preventing spam? Read Preventing spam in phpBB 3.0.6 and above

Sam
Registered User
Posts: 31
Joined: Fri Jan 23, 2009 10:24 pm

Re: AJAX, jQuery, et. al.

Post by Sam » Wed Dec 16, 2009 6:06 am

AJAX and other javascript can be used for multi moderation, where you can manipulate a large amount of topics at one time from the viewforum view. What would really be nice, from a moderator standpoint, some sort of 'in-your-face' alert when a post is reported or someone posts on queue.

idiotnesia
Registered User
Posts: 29
Joined: Thu May 22, 2008 2:46 am

Re: AJAX, jQuery, et. al.

Post by idiotnesia » Wed Dec 16, 2009 6:38 am

Ajax can be used in many places for example for inline editing, registration page to check the account availability, in admin page to drag and drop forum (forum order) and many mores.

The undo feature is also cool much better than using warning message box in new page.
idiotnesia wuz here

User avatar
Eelke
Registered User
Posts: 606
Joined: Thu Dec 20, 2001 8:00 am
Location: Bussum, NL
Contact:

Re: AJAX, jQuery, et. al.

Post by Eelke » Wed Dec 16, 2009 3:26 pm

DavidIQ wrote:Using AJAX or jQuery or both
Maybe when you say "AJAX" you are thinking of a specific framework I'm unaware of, but to me "AJAX" is a generic term to describe a technology. jQuery is one of several JavaScript frameworks that allows you to (among other things) "do" AJAX.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1830
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: AJAX, jQuery, et. al.

Post by DavidIQ » Wed Dec 16, 2009 3:32 pm

You don't need jQuery to do AJAX calls. Likewise you don't need AJAX to perform jQuery functions. You can combine the two and create some "pretty" things on the screen like fade outs or smooth auto-completes, etc. but they're both separate.
Image

User avatar
Eelke
Registered User
Posts: 606
Joined: Thu Dec 20, 2001 8:00 am
Location: Bussum, NL
Contact:

Re: AJAX, jQuery, et. al.

Post by Eelke » Wed Dec 16, 2009 3:40 pm

You're right, I shouldn't have said that jQuery allows you to do AJAX. However, it does contain functions to make life of a developer a lot easier when doing AJAX, as opposed to doing it "manually" (what I meant was, it can help you to do AJAX). My point was, "jQuery" is a specific JavaScript framework, whereas "AJAX" is a technology that does not imply a specific implementation, other than that somewhere down the line the JavaScript XMLHttpRequest is used..

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1830
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: AJAX, jQuery, et. al.

Post by DavidIQ » Wed Dec 16, 2009 3:56 pm

I think my reason for including jQuery here was to maybe have further discussion on what to do with it. For instance it could be a possibility to do some auto-complete in the search fields kind of like what Google does. Or making a post be rendered smoothly as opposed to just displaying it right after you submit your form as would be the case with just using AJAX. In this regard jQuery is just for show.

Of course the devs could decide to use AJAX with some functions of their own (not that hard) and ditch jQuery alltogether so that there is no dependency on an externally managed library. But that's going to be their call I guess.
Image

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: AJAX, jQuery, et. al.

Post by naderman » Wed Dec 16, 2009 3:59 pm

We should certainly aim for an API that can deal with both a plain HTML frontend and AJAX.

ToonArmy
Registered User
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK
Contact:

Re: AJAX, jQuery, et. al.

Post by ToonArmy » Wed Dec 16, 2009 5:13 pm

DavidIQ wrote:Of course the devs could decide to use AJAX with some functions of their own (not that hard) and ditch jQuery alltogether so that there is no dependency on an externally managed library. But that's going to be their call I guess.
What and write our own cross browser JS library? I think not.
Chris SmithBlogXMOOhlohArea51WikiNo support via PM/IM
Image

Post Reply