August 2016 In Brief

Posted by admin on 2019-12-30 10:29:46 in Monthly Summaries (167 views)

8011. Client reported that EPPMS was locking them out after reporting a fatal error and we created and emailed an update.

8022. Met staff of prospective cooperative for further discussions on their web-based accounting software requirements. Explored more PHP tools, looking for a RAD we could use to quickly put up a demo application for the cooperative software.

8033. Downloaded more PHP development tools: Eclipse for PHP, phpFormGenerator 2.08.

8044. Checked out three PHP form generator applications we downloaded (phpFormGenerator 2.08, phpdbform, phpFormBuilder 1.7) and they all reported code errors, but the fourth that had “GUI” in its description, PHPDevShell, appeared most promising, and we successfully installed and linked it up to a MySQL database and began checking out the themes available.

8055. On a Windows XP system, we got phpFormGenerator working after changing code in a couple of files, later saw how the form code it produced could actually update a MySQL database.

8066. Completed one of the three requirements in the Labelwriter 2016 revision—including custodian name on the merged packing summary report and adjusting the report a bit so it took less number of pages—and half of the third and last one—entry of extra subject quantities from what was initially imported. On the XP system one of the PHP form programs (phpdbform) worked (probably because the PHP there was older than the one on the first Windows 7 system) though complained of a feature that was turned off in the ini file.

8070. Worked on Labelwriter all day, completing the entry and processing of extra subject quantities then moving on to revising the Launcher application to handle backing up and registering the last existing program version in its versions list automatically via a command line call to be made by the installer.

8081. Worked on the installer for Labelwriter and its Launcher, mailing the download link for the installer to the client. We first considered learning more about NSIS (Nullsoft Scriptable Install System)—that we have been using for years to create installers—to know how it could read and write values to and from an ini file, but as this would probably take more time we decided to upgrade Labelwriter Launcher to be able to do it. Reading and writing ini files were things we’d done before using PowerBuilder. This was all so as to register the existing Labelwriter in the ini file used by the Launcher to load prior versions, before the new one gets installed in its place. By the time we were done a command like “lwlauncher.exe /mrsetup 8.05\App title\App description” would copy the existing program db, log and exe files to a new subdirectory LW805 and register the ODBC DSN for the backed up database as lbwriter805, both tasks we were doing manually via NSIS scripts before. It would then create the ini file for Labelwriter to use to start up the backup database (another thing we did manually before), and finally an entry would be made at the top of the list of prior-version applications that would be displayed when Labelwriter Launcher is opened, using the version, title and description specified on the command line.

As we tested the new installer we learned a thing or two about NSIS all the same. Relative jumps only consider run-time instructions, not lines of code. This means if you have comments and blank lines, they won’t count, as well as commands executed by the compiler. Secondly, ExecWait is necessary rather than plain Exec, if the command you are executing should be allowed to complete before the next instruction in the script. We realized this when the backing up of the old program files (by executing lwlauncher.exe) mixed up the files, because the script didn’t wait for all the three old files to be copied before installing the new files.

Later in the day, the main work we did was try to use PHPDevShell to set up a menu, not making progress as there was no step-by-step user manual at hand. We downloaded and installed the PHP edition of Netbeans IDE, and searching the web on “create database form php” landed at the promising website phpdatabaseform.com, deciding to explore it further.

8092. We marked the 19th anniversary of the installation of EPPMS at the client site. Zoltan reported Gerian still not working and we discovered this was because the update didn’t install successfully; the temporary file it used could not be created due to Windows security restrictions on his “Program Files” directory, so we made one more suggestion to him failing which we would make available to him either another update that didn’t use a temporary file or a complete fresh installer.

We more or less completed evaluating phpDatabaseForms Lite with the conclusion that we could use it for setting up forms to update the database in the coop demo we would set up, but while investigating why some things didn’t work as specified, like inability to display an existing record on a form, we came across phpGrid Lite that appeared to have been created by the same people and on downloading and investigating it we decided it too could be used for the data display to complement the other product. But later we got phpFormBuilder 1.7 working on an XP system and also evaluated it for several hours, pleased that we could adjust the code and it too could come in handy in quickly setting up grids and forms to update a database similar to what PowerBuilder does.

8103. The client reported a lock-out issue with EPPMS and we told them they should be informing us when the warning started so we would prepare for it, instead of waiting until they could no longer log in; later sent another temporary update. We started drafting the database structure for the coop demo and later drafted the menu structure on paper.

8114. Visited client for the Labelwriter 2016 installation.

8125. We completed creating the initial database tables for the coop demo, completed customizing phpFormbuilder 1.7 and used it to create the editing script files for several lookup tables. We found some of the old official documentation for PHPDevShell archived at another website, and saved several pages in pdf format.

8136. Following the tutorial we printed from the archive site for PHPDevShell, we quickly saw how a PHP script could be linked to its menu for execution, how the new menu item could be assigned for access to certain users only. By trial and error we saw how submenus could be created. Then we ran one of the table update scripts generated yesterday by phpFormBuilder and it behaved and looked differently, too rough for our liking. Add to this the unappealing clunky face presented by PHPDevShell with its prominent logo image—not something you want to use to convince non-IT-savvy users that you had a beautiful application lined up for them—and we then began looking at other options for the coop demo application. We would need to come up with a simple but nice-looking application by hand and quickly, so turned to the NetBeans and devPHP editors, but not getting anywhere.

Eventually, we went back to a web-based demo application we did for a client ten years ago, that they didn’t take up. It still looked good on a browser and had a menu bar, so we started adapting it for the coop application. First we created new images, starting with a logo from the prospect’s scanned stationery. We quickly chose to name the demo as the Cooperative module of MoneyBooks and so modified one of the images for MoneyBooks to use for it. Then we turned attention to replacing the menu structure, improving on the security system and finally hooking up the table editing scripts to the menu. We would implement user security manually now rather than relying on a framework, so we added a table for users for later use. Finally we uploaded the application files to our website, encountering a big MySQL version issue that we will need to do something about later, inability to create some foreign keys. We visited https://www.microsoftwareresearch.com/mrcoop/ and our nice looking brand new application appeared and performed without any issues. When we visited shortly from a smartphone we saw that navigating the menu was near impossible so we would need to provide an alternative for mobiles.

MoneyBooks Cooperative module
MoneyBooks Cooperative module with open Process menu

8140. We resolved the foreign key creation difficulty of yesterday and then went on to achieve some important data entry features for the demo application. What caused the foreign key creation difficulty with the internet web server’s version of MySQL but not the ones on two local computers was the fact that while the tables referencing data in lookup tables were managed by the InnoDB engine that made foreign keys possible, the lookup tables containing the data being referenced were not themselves managed by the InnoDB engine. Once we changed the engines for those tables, we could then create all the foreign key indexes.

Then we turned attention to implementing the first big data entry feature for the demo, new member application data. We’d thought we could use phpDatabaseForms whose form creation interface impressed us, but then we’d forgotten their 6-element restriction for the free version. The member table involved almost two dozen columns, and after we’d finished setting up the form using phpDatabaseForms, it refused to update the database. So we had to resort to using another form application or doing the form manually. We did it manually and it was a slow process, but when the debugged version worked after many hours we were glad as we learned a few things. Unlike SQL Anywhere, BLOB columns in MySQL didn’t require any separate statement to put them in the table, and also get them out. There was no special PHP function to display an image on a form, so it was the same trick we’d sometimes used before with PowerBuilder that worked—writing the image to a temporary file and then assigning this to an image element. At first the image didn’t show and we wondered if it was corrupted somehow, until we viewed the files outside the browser and they displayed fine via Windows Explorer. Then we suspected maybe it was their location that was the issue. We had them created in the web application’s directory rather than somewhere outside the local web server, and this solved the issue.

8151. Worked on the Coop demo, tackling the image storage errors we’d received earlier during testing. We’d been impressed yesterday that MySQL didn’t have dedicated commands for uploading and retrieving BLOBs like images from its database but today we realized it was a handicap rather than a strength. When we tried to upload a jpg image, it failed. We saved it as bmp and uploading succeeded and we didn’t understand why until we went reading the manual. We saw where the mysql_query() function was said not to be ideal for binary data updates, because binary data could contain the zero (NULL) character that was treated as string terminator (by C language-based programs). Instead they recommended mysql_real_query() but when we tried this the error report said it was undefined. We now realized the strength in SQL Anywhere’s approach of using a dedicated UPDATEBLOB command. The image updates were failing probably due to the existence of the zero character in the image string; if an image’s representation didn’t have it the update would succeed. We searched the web on “mysql image update” and in virtually all the responses they were updating the image file names at the server’s end in the database rather than the images. One person went as far as saying he read somewhere that images didn’t belong in the database and he wanted everyone to stick to this approach. Eventually, this was what we did to save time, because the alternative as far as we could see was replacing each character in the string representation of the image with a 3-digit decimal, or at best a two-digit hexadecimal which would double the size of the image when stored. Along with the size overhead, there would also be a slight delay during reading and writing of the image for the conversion and reverse conversion to take place.

8162. Implemented member data display and editing in the Coop demo, completing the initial version and uploading the recent files to the website. The script for the member table editing was the biggest of them all. We eventually didn’t use phpGrid Lite as it didn’t allow data editing (in the free version). We made further adjustments to phpFormBuilder and used it, spending time further customizing the generated code. After linking up the script file to the menu, we felt the demo was now good enough.

8173. Tested the Coop demo on the intranet—visiting from another computer on the LAN—and the internet, visiting the website, and it worked fine, so we then asked the prospect for a meeting, agreeing for Friday. Turned attention to Labelwriter, implementing the new feature the user requested of being able to add new schools, and then starting the next feature, adding three more pairs of extra quantity columns.

8184. Worked on the Labelwriter revision, completing two more features and now remaining to test, compile and document.

8195. Visited the prospect for the Coop demo and after some discussion agreed on a demo presentation date in September.

8206. Revised MoneyBooks Cooperative and Labelwriter.

8210. Improved on the image uploading for the Coop demo so that both signature and passport photo could get uploaded at the same time instead of one after another. Did final testing and revision of Labelwriter, uploaded the installer.

8302. Visited a Printwiser client to provide technical support, getting the Printwiser database up and running on their server that had crashed, though their last good backup of the database was four months old.

The first version of this post appeared here on September 2, 2016.

Summary

Concluded preliminary research on open-source development tools and applications, and a demo MoneyBooks Cooperative was created. Mainly administrative work was done on EPPMS. Technical support was provided for a Printwiser client whose server crashed, and Labelwriter 8.15 revision for 2016 was completed and installed.

If you like this post please register or log in to be able to subscribe and be notified of new posts by admin.

 

Tags

2016    2019    admin    August 2016    BLOB    December 2019    DevPHP    Eclipse for PHP    EPPMS    foreign key    InnoDB    Labelwriter    Labelwriter 2016    Labelwriter 8.15    Labelwriter Launcher    MoneyBooks    MoneyBooks Cooperative demo    MySQL    Netbeans IDE    NSIS    NULL    PHP    phpdatabaseform.com    phpDatabaseForms Lite    phpdbform    PHPDevShell    phpFormBuilder 1.7    phpFormGenerator 2.08    phpGrid Lite    PowerBuilder    Printwiser    SQL Anywhere    Zoltan Gertner   

Comments

No comments yet.

Add Comment

(All values are required.)

 (Will not be published.)

Similar Posts

July 2016 In Brief  |   September 2016 In Brief  |   January 2016 In Brief  |   October 2016 In Brief  |   June 2016 In Brief  |   February 2016 In Brief  |  

 Close
Tweet