ajax and 1.9

i havent kept up with or read in awhile about the improvements coming in 1.9 (or a predicted release date).  But whats the latest?  and plan in the works for ajaxing (pagination would be extremely nice)?


  • probably not the best one to answer this but will give it a shot from a non coder.....you can call ajax in 1.8.14 or 1.9 and dont believe it to a full architecture change, it is just adding/changing a little of the framework.  So instead of every plugin that wants says ajaxed pagination and have 10-20 scripts, it would be a part of the core to call.

  • Main problem with ajaxification is initializing all JS stuff for newly downloaded content (ie. music player that is on the second page of pagination). That becomes big problem when you have lots of code that uses document ready event and don't really care about possiblility to be loaded dynamically.

    Add to it dynamic loading of missing assets (you didn't download JS of music player on every page - did you?)

    Additionally when dealing with lots of such JS, things become very messy. Frameworks that give you ability to dynamically synchronize model changes with view back and forth make complex stuff a lot cleaner. +1 for AngularJS for that (AFAIR it's one of the fetures it has)

    Personally I like having all communication put through single channel (provided by core hopefully) as it let's you aggregate multiple requests into one and can secure proper order of callbacks being fired, not to mention single core load for handling them.

  • thats what i meant to say....   :)

  • @@Pawel, we were expecting elgg 1.9 on Ajax do you not think right now only feature elgg is lacking is AJAX. My concern here is we already have some very good plugin on 1.8 now if we move on 1.9 lot of plugin will not work. And if we move to 1.10 there will be again issue.. I understand enhancement is always require but back work compatibility is really very important..

    Here my suggestion is can we not make elgg 1.9 on AJAX first may be first version will be unstable but gradually we will enhance or make is stage with minor version.. because plugin in the elgg make it number 1 social network.

  • @@ Pawel,  I am talking about the elgg engine to be made Ajaxify. Even I did same in my current website. Using AJAX i am getting the DIV(HTML which needs to be displayed after page load) in the AJAX response and printing it on the page without page refresh and its working for me. So i am not very clear why can't we implement AJAX in current 1.8 elgg engine

  • @Saurabh - the devil is in the details. So many things can break if you're not careful. I'm using angular with elgg on a production site right now and there just are a lot of little issues that come up. JS menus aren't extensible, menu items don't update when the page changes, need a restful api for everything, seo is a nightmare, how do you automate tests for it, etc. I have ideas to solve all these things but the solutions just need time to bake. Most likely we won't support ajax navigation, but rather provide a bunch of reusable components that plugins and themes can use.

  • @ Evan Thanks for your Explanation I understood the issue. I will wait for the 1.9 . I am not familiar with angular  js.

  • In general I'm not sure what people exactly mean by "AJAXify Elgg". Is it just "do simple actions like adding likes without reloading the page", is it pagination or even ajax prowsing of whole pages, is it adding some comet technology to push data from server in real time?

    For me all these stuff are closely connected to what I mean by "AJAXIfied" (sic!) page.

    Question is what exactly do we expect? I've seen some plugins for AJAX pagination in plugin repository already. It's possible now to try to write such plugins already without new Elgg version, so what's the problem? For me the problem is exactly in details of such implementation, when you realize that some other JS stuff just stopped working.

    Other problem is to not end up with a _lot_ of "rest api" calls. This can be solved by good standard. Have a look at our site http://www.velocitychess.com it uses single standard to execute most operations and in fact that are around 3-4 main endpoints for data retrieval, but still data representation is the same (yes, fetching bare HTML sucks - we don't do it). We actually do all template rendering on client side. Have a look at it (as we're currently on beta, you won't be able to login immediately, but check some of the bottom links ie.). In my opinion standardizing JS stuff is a must to do anything more sophisticated or even not breaking other plugins (that you don't know what will do). In general: it's not trivial to do.

  • @srokap - dude, awesome site!  I'm a huge chess nerd and have thought on many occasions an elgg-chess site would be a great idea, just no time to work on one of course :)

    Looking forward to the launch of that and seeing what you've got going on.

    Anyway, sorry for the offtopic post - back to your regular AJAXification discussion.

  • Ajaxifying Elgg 1.9 is very important. But ensuring backward compatibility of most Elgg 1.8 plugins is most important. Because at the end of the day, our users do not care about all these nitty gritty but simply want something stable and enjoyable.

Feedback and Planning

Feedback and Planning

Discussions about the past, present, and future of Elgg and this community site.