World is Welcome To The World of Linux

Journey into the world of linux

Menu
  • About
  • Welcome
Menu

How To Use Ajax Within Joomla! MVC Framework-I

Posted on May 29, 2010 by Ganesh Sharma

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Ajax, which stands for Asynchronous JavaScript, is getting popular day by day because of it’s capabilities of displaying data without refreshing the page. The use of ajax is a headache for the absolute beginner, specifically when we want to use it within Joomla! MVC Framework. The article is the first in the series of how to use ajax within Joomla! MVC Framework.

Here is very short introduction to how Ajax Works within Joomla MVC. There are three parts to it:

  1. Javascript file which contains Ajax code.
  2. Some template file in Joomla! View(V of MVC). e.g default.php, default_search.php etc.
  3. Controller where absolute action is taken after calling functions from the model.

Let me go over the process how ajax functions in Joomla! MVC Framework.

  1. The view, template file will have a form which will have a submit button and a division for getting data from the ajax response.
  2. When we click this button, this will call Ajax code from some file included in the html header.
  3. When that ajax code is called, that code in turn calls some task in the default controller controller.php or some custom controller. Which controller, that depends upon the component in question.
  4. Then that controller calls some function from the component model as per the requirements.
  5. This controller then returns the response to the ajax code.
  6. The ajax code returns the data to the pre-defined division of the view template file e.g default.php.

That is the whole working of the ajax for Joomla! MVC Framework. Now whatever we do in Joomla! regarding ajax work is the expansion of this base work.

Tomorrow I’ll start with actual code of files and explain, how each piece of code works.

I hope this will be useful for the Joomla! Ajax adventurists.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Date Command Tutorial(Video)
  • grep Command Tutorial – 1(Video)
  • Introduction To ls Command(Video)
  • Chapter 3
  • Set Position Of Poll Module Into Joomla

Recent Comments

  • Kansas City Trailer Proz on Physical Volume In AIX – A Primer
  • Create volume group in AIX | myunixsheet on How To Create Volume Group
  • Restore of AIX backup on other Unix system - TecHub on What is mksysb And What Are Its Components
  • Firewall Unleashed - InfoSec Institute on Packet Filtering Firewall: An Introduction
  • Manwendra on Proxy Firewall and Gateway Firewall: Introduction

Archives

  • January 2019
  • June 2010
  • May 2010
  • February 2010
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008

Categories

  • 30 Days To Joomla WebSite Setup
  • A Journey To The World of Linux System Administration
  • Aix
  • Backups
  • Books
  • Firewalls
  • Introduction
  • Joomla
  • Joomla Backup
  • Joomla Web Technology
  • Linux
  • LPAR and Virtualization
  • LVM
  • Pluggable Authentication Modules
  • section navigator pro
  • Security
  • Security Knowledge Base
  • Tips and Tricks
  • Uncategorized
  • World is Welcome Products

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
©2023 World is Welcome To The World of Linux | WordPress Theme by SuperbThemes