[Phpmyadmin-devel] GSoC - AJAXify the Interface for phpMyAdmin

Ninad Pundalik ninadsp16289 at gmail.com
Sat Mar 20 22:01:03 CET 2010


Hi All,

After reading through the GSoC Ideas wiki page[0] and the discussion
on the feature request[1] of adding AJAX functionality to phpMyAdmin,
I could think up of a possible implementation as follows, other than
the one already outlined very briefly on the discussion page (of
starting out with the Query page, implementing the common jQuery and
PHP functions and then replicating the process for the other action
pages) :

1. Implement this as an add-on in the initial phase.  Replicate all
the PHP files which operate on the database in a folder, '/ajax/'
making them AJAX endpoints.
2. Modify the PHP code in each of the endpoints, so that we can output
the content in XML, JSON or plain HTML (whichever is decided to be
used).
3. On each action page, add some PHP code, which checks for a
cookie/database setting and confirms that the client supports
JavaScript.  In the if block, add jQuery/MooTools code which will
manipulate the necessary links and forms on the page, carry out the
actual AJAX calls, and also implement callback functions, which will
handle the responses from the AJAX endpoints.
4. In case the client does not support JavaScript, the code inside the
if block will not be executed, and the existing PHP code of the page
will handle the noscript case.

Due to the above steps, we can maintain backward compatibility with
browsers that do not support/have disabled JavaScript.  Also, by
implementing this as an add-on where the AJAX endpoints are maintained
separately, we can ensure that the existing code is modified to the
least possible extent and all changes that occur, are localized in the
/ajax/ folder.  I agree that this will lead to increased work in
maintaining the common code for some months, but it gives me freedom
to play and implement this functionality without breaking the core
code.  Once the modifications are deemed stable enough, the changes
could be merged into the core code.  Also, a quick look through the
/js/ folder shows that the Designer interface already uses MooTools,
as is mentioned in the feature request discussion.  However, a
previous mail on this list by Marc says that jQuery will be used for
this project.

I'd like to know if I'm thinking in the right direction.  If I am, I
will prepare this idea more thoroughly, it's deliverables, with the
proper timeline requirements, as well as work on some patches, as is
required in the Student Checklist[2]. :)

My name is Ninad Pundalik, and I'm a student at the Birla Institute of
Technology and Science, Pilani, India, and I wish to apply for the
Google Summer of Code project with phpMyAdmin.  I have been writing
small websites in PHP, MySQL and jQuery for some student activities on
campus, and have completed an internship last summer, where I helped
in implementing Google Calendar APIs and Google and Twitter OAuth.  As
a result, I have been regularly using PMA for close to two years.
While looking through the ideas for GSoC, I scanned the PMA code, and
found it very easy to understand and of course, well commented and
logically designed.  Hence, I hope to get a chance to give back to
this excellent software.

Waiting for a reply, so that I could further develop this idea and
prepare my application in time.  :)

-------------------
[0] - http://wiki.phpmyadmin.net/pma/GSoC_2010_Ideas_List
[1] - http://sourceforge.net/tracker/index.php?func=detail&aid=2131880&group_id=23067&atid=377411
[2] - http://wiki.phpmyadmin.net/pma/GSoC_2010_Student_Checklist
-------------------

Ninad S. Pundalik
http://twitter.com/ni_nad
http://ninadpundalik.co.cc/blog
GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69




More information about the Developers mailing list