Support

Forums

Contact Me

Posts Tagged 'ajax'

AFC Ajax

Amsterdamsche Football Club Ajax (), also referred to as AFC Ajax, Ajax Amsterdam or simply Ajax (after the legendary Greek hero), is a professional football club from Amsterdam, Netherlands. [http://en.wikipedia.org/wiki/AFC_Ajax]

AJAX for Java developer

IBM has put an interesting online article about  DWR (Direct Web remoting) technology...

In the simplest terms, DWR is an engine that exposes methods of server-side Java objects to JavaScript code. Effectively, with DWR, you can eliminate all of the machinery of the Ajax request-response cycle from your application code. This means your client-side code never has to deal with an XMLHttpRequest object directly, or with the server's response. You don't need to write object serialization code or use third-party tools to turn your objects into XML. You don't even need to write servlet code to mediate Ajax requests into calls on your Java domain objects.
Read more at IBM developerworks
Articles tagged

Joomlacomment 4.0 jQuery optimization

joomla_cms

jocomment I did install yesterday evening the latest version of !JoomlaComment

!JoomlaComment is one of the first extensions for Joomla,that let you comment under articles.

The !JoomlaComment system can be installed on any joomla website within seconds! Make
your website more interactive!

Main Features:

  • ajax-based
  • captcha protection
  • akismet support
  • ubb code support
  • threathed/nested comments
  • multilanguage support
  • mail, website input
  • See more features here

Joomla support templates, depending on which templates you use

  • MTdefault-emotop, these templates MTxxxx use mootols 1.11
  • JQdefaut-emotop, these templates JQxxxx use Jquery
  • ..

You may behind the scene include another additional AJAX library in Joomla!® frontend, this lead to performance issues:

If !JoomlaComment use JQuery 1.1.4 and not the AJAX library of Joomla!, aka Mootools 1.11. Another huge JavaScript files that make my server busier!

Since any static files can be offloaded to another server to gain more speed. For example, any static images, JavaScript or CSS files can be moved to a different server for more speed.

In order to be able to offload this JavaScript library to Google code, you’ll have to do the following:

In the template you are using, for example in components/com_comment/joscomment/templates/JQdefault-emotop/index.html

Search for

{library}
<script type="text/javascript" src="components/com_comment/joscomment/jscripts/jquery-1.1.4.pack.js"></script>
<script>jQuery.noConflict();</script>
{/library}

and replace with

{library}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 
<script>jQuery.noConflict();</script>
{/library}

Note that I use here the latest JQuery version (1.3.2) and not the default version of !joomlaComment (1.1.4), here is why

Optimize Joomla! site

joomla_cms

I did optimize a bit my Joomla! homepage in the last few days. This has been achieved with

  • Enabling Joomla module caching in all 3rd party module where it was missing/ not implemented at all,
  • Starting to offload some assets (JavaScript) to faster hosting,

Click read more to apply the same for your internet site.

Read more: Optimize Joomla! site

SecurityImages 5.2.0 in active development

Following the Preview of SecurityImages 5.2.0, I am currently developing a proof of concept using the Ajax library JQUERY 

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.

smallbox_securityimages

I want to allow generated captcha to be checked asynchronously without needing submit of whole page. This is a major complain since the beginning of SecurityImages, as currently users lost their entries in the form in case the captcha challenge get refused.

A lot more check are also done NOW in the Diagnostics page:

  • Checking existence of system plugin,
  • Ability to display the error message if any of each plugin in one click
  • Reload count configured will be displayed,
  • A way to create automated error reporting (cut and paste) for better support in my forums

AND

A new API inspired from recaptcha.net that will allow me to integrate new system in future without being limited to an image (why not having a flash or video in future?). This API fully use the Joomla! event system so less code to write for all 3rd party developers and less dependencies.

Stay tuned!

OpenComment will use AJAX


I am restarting the development of OpenComment, and found  that the existing code wont be practical without using AJAX. That's why I am now integrating AJAX in openComment where it make sense:
  • Comments rating,
  • Comments filtering,
  • Administration function.

After looking on the market which framework can help me to achieve these goals, I found xajax 0.2.4

is an open source PHP class library that allows you to easily create powerful, web-based, AJAX applications using HTML, CSS, JavaScript, and PHP. Applications developed with xajax can asynchronously call server-side PHP functions and update content without reloading the page.

The xajax PHP object generates JavaScript wrapper functions for the PHP functions you want to be able to call asynchronously from your application. When called, these wrapper functions use JavaScript's XMLHttpRequest object to asynchronously communicate with the xajax object on the server which calls the corresponding PHP functions. Upon completion, an xajax XML response is returned from the PHP functions, which xajax passes back to the application. The XML response contains instructions and data that are parsed by xajax's JavaScript message pump and used to update the content of your application.


Articles tagged

Joomla Mootools and jQuery Compatibility

In this series of post I will outline some common techniques to help Joomla extensions development.

As you know Joomla is shipped with Mootools library which assign $ also to Ajax. Here is 2 tips that will allow you to use jQuery scripts without any modifications (most of the time you will find tips to assign jQuery to something else than $ and rewrite your scripts)

First it is recommended to include always mootools first to avoid jQuery conflict issues

JHTML::_('behavior.mootools');
$document = JFactory::getDocument();
$document->addScript(JURI::root() . "media/com_cedtag/js/jquery.1.7.2.min.js");

then to run jQuery in noConflict mode. Note that here I do not assign jQuery to any alias.

$document->addScriptDeclaration("jQuery.noConflict();");

Till here, this is what you will find on all Joomla forums, posts over the internet. The last tips is what make the difference!

Instead of using a different alias for the jQuery object (when using noConflict), you can write your jQuery code by wrapping it all in a closure. This can be done in the document.ready function

$script = "jQuery(function($) { $();

});"; $document->addScriptDeclaration($script);

This way you are not force to rewrite your scripts to use another alias (replacing $ with jquery alias for example in all your scripts). This make inclusion of jQuery really easy!

Happy Coding!

Donations

Thank You for supporting my work