Monday, July 05, 2021
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.
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.
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.