1
farshid
an Ajax approach in xoops
  • 2007/3/12 16:15

  • farshid

  • Just popping in

  • Posts: 34

  • Since: 2004/11/9


Hi;

It's some time I am thinking of a way to make XOOPS work in an Ajax environment, so that all modules get to work without modifications, this may also lead us to a new SOA(Service Oriented Architecture)

right now you can view a demo site at: http://www.fanafzar.com/xoops/
mention that the demo site works just with Firefox (is will be implemented later)
log in using:
user: demo
pass: demo

this is not the last work I have done, I will update it as soon as possible.

Features are:
1- we have both HTML and AJAX formats together
2- due to previous item search engines still index every thing as they see the HTML version
3- we can share data and blocks across different sites (not implemented yet)
4- all forms (GET & POST) will be sent via Ajax requests (working good now but has some problems, to test this try a search for get method and post some news for post method in the demo site)

I just want to know your ideas about the matter, and if there is anyone interested in such a thing!

2
zeroram
Re: an Ajax approach in xoops
  • 2007/3/12 17:16

  • zeroram

  • Friend of XOOPS

  • Posts: 326

  • Since: 2004/6/30


very interesting, keep the good work!!!


3
rlankford
Re: an Ajax approach in xoops
  • 2007/3/12 17:23

  • rlankford

  • Not too shy to talk

  • Posts: 158

  • Since: 2004/8/27


I swear I'm not trying to be negative -- in fact I applaud your effort! But (you knew there was a but, didn't you) wouldn't an approach like this remove the ability for people to bookmark various pages on the site, or am I missing something?

4
rabideau
Re: an Ajax approach in xoops
  • 2007/3/12 22:03

  • rabideau

  • Home away from home

  • Posts: 1042

  • Since: 2003/4/25


frashid,

We have a similar project underway at:http://helpxoops.info Would you like to collaborate and/or merge our efforts and materials?

btw. I, also, posted a link on this site looking for AJAX enabled XOOPS modules here.
Pax vobiscum,
...mark

may the road rise to meet your feet!

http://treemagic.org

5
Defkon1
Re: an Ajax approach in xoops
  • 2007/3/12 22:24

  • Defkon1

  • Not too shy to talk

  • Posts: 151

  • Since: 2005/1/27


i'm extremely interested in an ajax-oriented xoops!

more info?

6
wizanda
Re: an Ajax approach in xoops
  • 2007/3/12 22:52

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


My site is includeq JavaScript’s instead of html files.

Now just trying to speed up the processing in MySql.

That is why i started experimenting with exchanging our block html system files for JavaScript files and if included by Smarty, they render twice as quick as normal anyways, without being Ajax yet....

Extra part of Ajax Smarty is call-back JavaScript files, these can contain our html and smarty can include these....
still haven't got all of it yet….. it is a part way there in getting XOOPS 5x 6x faster, so far
especially on IE which sort of can look like Ajax, it loads so quick….

Yet still feel it’s missing something...

so maybe this will find the solution, as somewhere, some how? i do believe smarty and Ajax, plus XOOPS can do it internally, without to much extra effort in comparison to some of the methods....
also on me searching found a CMS using Smarty and Ajax already, all ideas are welcome at core level where if we can, it will be far more effectiveness and less server load....

as many of the methods are to go so much outside of XOOPS in added packages, more server loads with XOOPS is a no, no; i am finding lately and trying to reduce server loads to make Smarty run as fast it can.
plus updating Smarty helps as it has been updated a few times again lately.....

Yet tell me if you can figure a way out on a site where $xoops_content is even in an JavaScript file and then includeq by Smarty…it feel like on the tip of my tongue, yet don’t understand it yet

7
farshid
Re: an Ajax approach in xoops
  • 2007/3/13 7:11

  • farshid

  • Just popping in

  • Posts: 34

  • Since: 2004/11/9


Hi all;

@rlankford
Quote:
wouldn't an approach like this remove the ability for people to bookmark various pages on the site


as you may see in the demo site, there is a link to the main page URL which will navigate you to the main page, in fact we can make page bookmark via this link, if you need any further explanation please let me know.

@rabideau
I have seen your good work, and of course I am interested in joining your project, but before that I need to complete this job, at the point I have something useful for the community I will for sure share all code and I will be glad to be with you.

@Defkon1
well nice, I will post some technical data just as soon, as I said the demo site is not the latest thing I have done on the matter. so first I need some time to upgrade it, then, I will post the instruction, sorry I am a little busy these days as we(Persian) are moving to the new year!

@wizanda
I have read your posts on this matter, and that sounds good to me. I am thinking of the same thing as you, but I think we are doing it in different ways.
if you want to know:

loading a normal page the debug data will be like this:
queries (44) blocks (5) extra (0) timers (6)

while loading it in this approach will give us 3 requests to the server:
request for page content:
queries (22) blocks (0) extra (0) timers (6)
left blocks:
queries (37) blocks (4) extra (0) timers (6)
right blocks:
queries (19) blocks (1) extra (0) timers (6)

I am planing to make an Admin account in the demo site so that you can test this there.

but I want you all to mention one thing and that is (in my opinion): this peace of code can lead us to something more than just having an Ajax enabled XOOPS but a portal server with the ability to share data across different sites and more...

I know that this is not very efficient in a CMS, XOOPS is already a great system, with good performance for most of us while there are people like "wizanda" working on performance to make it better, but where it comes to be enterprise ready, then we should be ware, there is work to be done.

and mention I am not saying this will do every thing for us, this is just a little peace of code that could evolve in the XOOPS great ocean.

Thanks all, I will continue the work.

8
Defkon1
Re: an Ajax approach in xoops
  • 2007/3/13 8:42

  • Defkon1

  • Not too shy to talk

  • Posts: 151

  • Since: 2005/1/27


Quote:

farshid wrote:

@Defkon1
well nice, I will post some technical data just as soon, as I said the demo site is not the latest thing I have done on the matter. so first I need some time to upgrade it, then, I will post the instruction, sorry I am a little busy these days as we(Persian) are moving to the new year!


and so... Happy New Year man!

9
farshid
Re: an Ajax approach in xoops
  • 2007/3/18 16:32

  • farshid

  • Just popping in

  • Posts: 34

  • Since: 2004/11/9


Hi all;

I have updated the demo site, you can view it now: http://www.fanafzar.com/xoops/

use:
user: admin
pass: admin
to login as the administrator and see the debug results.
there are many changes in this version:

1- I have designed a new theme, which is table free. some Rico round corners are also applied, wish you like theme.
using this round corners will reduce the bandwidth traffic but it gets extra process time to show the page, any idea about it?
2- now we can send a request to get just one block, this way it seems we are getting ready to have some kind of service server!

and so ...

my next step would be creating another instance of XOOPS so that we can communicate between two XOOPS portals.

I will add some comments and put the files for you to download just as soon.

10
xguide
Re: an Ajax approach in xoops
  • 2007/3/18 17:28

  • xguide

  • Just popping in

  • Posts: 43

  • Since: 2005/5/11


You should verify your script around document.getElementsByClassName to lower the amount of redundancy.

It should gets only child nodes from the node you specify, instead gets all in the entire document.

If it allows you to pass in an element
document.getElementsByClassName('foo', 'bar');

Perhaps it will return all elements descending from the element with the id of bar.

If nothing else, simply replace this function with a wrapper around document.getElementsByClassName to lower the amount of redundancy.

Now you have training Rico which provides some amusing widgets to play with dom fx effects and found new problem. These technics are good to use with a Graphical User Interface plan and improve usability. But to apply on content and reduce wainting time of request why you don't try a library and start a render system with new core and with less security holes?

Good idea to include debug with your theme.

Login

Who's Online

158 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 158


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits