AJAX-Framework in Joomla?

For Joomla! 1.0 Coding related discussions.
User avatar
darb
Joomla! Guru
Joomla! Guru
Posts: 993
Joined: Thu Jul 06, 2006 12:57 pm
Location: Stockholm Sweden
Contact:

Re: AJAX-Frameworks...

Postby darb » Sat Sep 01, 2007 7:27 am

Here is some good info about various Ajax frameworks..

http://ajaxexperience.techtarget.com/west/html/frameworks.html#JResigIntro
Success in the long run Its not about the code its about the people and community that's make it!
Its not what you say its what you do that matters!

Darb - aka ssnobben

User avatar
binhle410
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Mar 24, 2010 10:08 am
Contact:

Re: AJAX-Framework in Joomla?

Postby binhle410 » Thu Mar 25, 2010 12:39 am

How re you guys doing with the project ? it s been a long time, any result yet ?
free Joomla Tutorials for everyone http://joomla101.org (ver 1.6.x) joomla tutorials
Let's help spread the word of Joomla. I love it.

User avatar
Hackwar
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3748
Joined: Fri Sep 16, 2005 8:41 pm
Location: NRW - Germany
Contact:

Re: AJAX-Framework in Joomla?

Postby Hackwar » Thu Mar 25, 2010 12:47 am

This thread is 5 years old. In the meantime we released more than 30 versions of Joomla. Of course we have a JS/Ajax framework implemented. Look at mootools.
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.

Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.

User avatar
binhle410
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Mar 24, 2010 10:08 am
Contact:

Re: AJAX-Framework in Joomla?

Postby binhle410 » Thu Mar 25, 2010 12:57 am

Yes, I can see about mootools, but how is the server directory/files structures of Ajax handling files, where should we place it in a com_xxx ?

Other dimensions can also be discussed such as security and scalability but I think security s of more issues. Many of my websites got hacked recently.

By the way, do you guys know any Joomla Security Auditing Expert ?

http://pnt.edu.vn some hacker got into this and installed the virus.
free Joomla Tutorials for everyone http://joomla101.org (ver 1.6.x) joomla tutorials
Let's help spread the word of Joomla. I love it.

User avatar
darb
Joomla! Guru
Joomla! Guru
Posts: 993
Joined: Thu Jul 06, 2006 12:57 pm
Location: Stockholm Sweden
Contact:

Re: AJAX-Framework in Joomla?

Postby darb » Thu Mar 25, 2010 7:44 am

Hackwar wrote:This thread is 5 years old. In the meantime we released more than 30 versions of Joomla. Of course we have a JS/Ajax framework implemented. Look at mootools.


Hackwar, can you simply explain w h y Joomla have chosen Mootools over Jquery? (that for example Drupal have standardized on)

Bcs this conflicting ajax libereries conflict is a "hell" for ever site developer and site owner when you have different addons and conflicts.

So why?
Success in the long run Its not about the code its about the people and community that's make it!
Its not what you say its what you do that matters!

Darb - aka ssnobben

User avatar
nibra
Joomla! Guru
Joomla! Guru
Posts: 588
Joined: Wed Nov 16, 2005 2:02 am
Location: Breklum - Nordfriesland
Contact:

Re: AJAX-Framework in Joomla?

Postby nibra » Thu Mar 25, 2010 12:31 pm

jQuery is just a DOM manipulation library, while MooTools is Object Oriented JavaScript.
See jQuery vs MooTools

Regards,
Niels

User avatar
darb
Joomla! Guru
Joomla! Guru
Posts: 993
Joined: Thu Jul 06, 2006 12:57 pm
Location: Stockholm Sweden
Contact:

Re: AJAX-Framework in Joomla?

Postby darb » Thu Mar 25, 2010 2:47 pm

Thanks Niels appreciate your info and link from this good reference article but as the author said it could be a little Mootools biased though.

Its much to read but that didn't answered the analysis question still: w h y? So what's the reason that Joomla have chosen Mootools (and Drupal have chosen Jquery)?

Some fragment from the article but you have to read all of it.

"The MooTools developers include a robust framework that is easy for you to extend with your own functionality with the intention that people who include the framework in the page are going to use it, not some other framework."

=We are intend and developers are intend to only use one framework - Mootools not Jquery if not we are going that have problems (conflicts)?

"Reusing Code with jQuery

It's very tempting when you're working on a web project to write code this way. Just add some logic on the page that selects the DOM elements and "sets them up" by hiding some, altering others, and adding event listeners for click or mouseover. Developing code this way is very efficient, very fast. The problem with writing all your logic in domready statements is that you end up with a lot of code that does the same thing in different places. If we take the FAQ pattern above we could easily apply the same logic elsewhere on a different page with any list of terms and definitions. Are we going to repeat the same logic every time we find this pattern?

A simple way to make it reusable is to wrap the logic in a function and pass in arguments. Here's what that might look like in jQuery:

function faq(container, terms, definitions) {
$(container).find(terms).hide().end().find(definitions).click(function() {
$(this).next().slideToggle();
});
};
$(document).ready(function() {
faq('#faq', 'dd', 'dt');
});

This is much better for two really big and important reasons:

1. If tomorrow we need to change how these lists work (maybe we want to add click tracking logic so we can measure it in our web logs or maybe we want to fetch the definitions via ajax) we can just change our main faq method and everywhere we use it just gets updated. Or if there's a new version of jQuery released that changes the way things work, we can just go update our one method instead of a dozen copies everywhere. I call this keeping a small footprint in my application. By keeping the points where my application touches my more generic code as small as possible, it makes it easier for me to fix bugs, upgrade frameworks, add features, or alter functionality.
2. The second reason is that it's less code. By reusing the same method over and over again, I don't repeat myself and this is valuable in any programming environment. It also makes the code my visitors have to download smaller.

jQuery actually has a slightly more refined system for writing reusable "widgets" like these. Rather than encourage you to drop them into functions like the above example (which is really rather crude) it encourages you to write jQuery plug-ins
."

etc etc... for both libraries compared in this article.

So Niels, do you mean that Joomla need a MooTools Object Oriented JavaScript for some reason and Drupal only need a just a DOM manipulation library tool?

Joomla still struggles with old Mootools 1.11 and its update problems and Drupal just fly away with its Jquery library that is continuously no updating problem with it. Is it so?

Again, so where is the analysis w h y its better to use Mootools instead of Jquery as a standard java script library for Joomla? I still dont understand by your and the articles explanation maybe I am stupid.
Success in the long run Its not about the code its about the people and community that's make it!
Its not what you say its what you do that matters!

Darb - aka ssnobben

User avatar
nibra
Joomla! Guru
Joomla! Guru
Posts: 588
Joined: Wed Nov 16, 2005 2:02 am
Location: Breklum - Nordfriesland
Contact:

Re: AJAX-Framework in Joomla?

Postby nibra » Thu Mar 25, 2010 3:24 pm

I don't know the exact reason for that decision. And I don't need to know it, because it does not matter.

For the first - the decision is made. That is good. Everybody should stick to that and not try to introduce concurrent solutions.

Second, I personally think that MooTools indeed is the better choice. There is nothing you can do with jQuery that cannot be done with MooTools, but the OOP approach of MooTools offers opportunities you'll not find with jQuery.

Regarding the 1.11 issue: Yes that's a problem, but there are solutions - you can exchange 1.11 by 1.2 together with a compatibility layer to avoid breaking current extensions. BTDT.

Regards,
Niels

User avatar
darb
Joomla! Guru
Joomla! Guru
Posts: 993
Joined: Thu Jul 06, 2006 12:57 pm
Location: Stockholm Sweden
Contact:

Re: AJAX-Framework in Joomla?

Postby darb » Thu Mar 25, 2010 6:08 pm

This is the problem Everybody should stick to that and not try to introduce concurrent solutions. and I understand that you can do "more" things with Mootools that Jquery can not bcs its OOP but what are these extra "things" that Joomla need and not other open source scripts like example Drupal? And creating extra layers that is exactly the problems you want to avoid isnt it?
Success in the long run Its not about the code its about the people and community that's make it!
Its not what you say its what you do that matters!

Darb - aka ssnobben

User avatar
Hackwar
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3748
Joined: Fri Sep 16, 2005 8:41 pm
Location: NRW - Germany
Contact:

Re: AJAX-Framework in Joomla?

Postby Hackwar » Thu Mar 25, 2010 6:34 pm

Why should there be anything that Joomla needs that Drupal doesn't need or the other way around? The decision was made years ago and we are sticking with Mootools, as does Drupal with jQuery. So where is the problem? There is no special reason why we chose mootools.
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.

Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.


Return to “Joomla! 1.0 Coding”

Who is online

Users browsing this forum: No registered users and 2 guests