spacer.png, 0 kB
Personal Blog


My Camera Equipment

« Virtual Classroom - Hardware Equipment | Main | Recent Hardware Upgrades »

Monday, July 05, 2021

Syncing AJAX and JDBC- Too Powerful to Ignore

Several weeks ago, I completed work on a process that pulls comment counts for this blog from the QiSoftware.com installation of Commentics.

The first step in this project was to replicate the qisoftware.com Commentics database in my local development environment.

I then developed the inner join SQL call I needed for efficient retrieval of the counters. Initially, I developed a php program using the SQL call, however later decided I wanted a less open program for the online version, so opted to use Java Servlet/JDBC technology. I also believe, Java JDBC/Servlet technology is more efficient than php.

The following diagram, illustrates the AJAX/JavaScript used to call the Java JDBC/Servlet and the XML data response returned from the AJAX call.

This project is notable, because it utilizes AJAX which I have not wanted to incorporate into my programs.

Why? AJAX data prep is open source for one, but the other big problem- older browsers did not support AJAX. Though, I have done very little with AJAX in the past, I found this to be one of the easiest parts of this project and I am glad I had the opportunity to work with this very powerful resource.

So you want to know why I have not installed the counters on this blog? Initially, I felt I was providing a lot of open source technology using AJAX, however after I setup everything, decided that because only one blog post had comments (my test comments), the earlier work to install comments on this blog was enough for now.

If I leave everything as is and fail to get more feedback in the way of comments, most of the main pages will appear as they do now, a comment png image with the word Comments, with a link to the entry post. I only update the Comments link text if there is a comment count greater than zero. If there is only one comment, the update also changes the word from Comments to Comment.

I only wanted to make one call to the database (per page visit) even though there are several entries on each page. The counts are on the pages with category, archive or main page entries. Any page with multiple entries. Individual entry post pages have the comment area rather than the link.

Setting up HTML <div>s and syncing innerHTML updates were the main efforts for this project. I am happy with how this project turned out and will probably install the program online if I begin to get more comments.

Most of my projects use Java Servlets to do the "heavy lifting". In this case, JavaScript is doing a lot of the work. The inner join SQL call is hidden along with the generation of the XML data response within the servlet.

I feel as if I am entering a new phase and have to get used to providing so much in the open area. AJAX and JQuery are too powerful for me to ignore and these days- most browsers support these two powerful resources.




Business Directory

spacer.png, 0 kB



Contact | Accessibility | Products | CSS and XHTML
Disclosure Policy
© Copyright 2011-2025 QiSoftware
You may not copy this work.


    Sponsors
    Things I Heart
    Computer Electronics/Home Office
    Items I Have
    Just Want
    Gift Ideas
    Home Furnishings & Kitchen
    Back to School
    Coach

    Shop My Sale






    Community





    MarylandBloggers

    My Instagram Feed

    Calendar

    Archives
    Search
    Categories
    Credits
    Powered by
    Thingamablog 1.5.1

    Owner/Blogger
    Regina Thomas
             Follow

    Subscribe To My Channel


    As an Amazon Associate I earn from qualifying purchases.






spacer.png, 0 kB