Tuesday, April 14, 2015

Extra Blog; HTML to CFM

On April 12th (starting on April 10th), I completed the first and second phase of the Independent Component work assignment. This involved creating a database table for user profiles and converting my previously made HTML programs of JIIS into ColdFusion (CFM) programs.


For the first phase of the independent component, I created a new database table in the PL/SQL Developer and named it "JIIS_User_Profiles". Here, I added in user ID's, user passwords, first names, last names, phone numbers, security levels, and password status. Then, using SQL code, I retrieved information, added new records, updated existing information, and deleted records from the table. I then turned my work assignment over to my mentor to perform acceptance testing for phase 1. Once she completed, I moved on to the next phase.



After using existing FRS ColdFusion programs that were given to me by my mentor that allowed the application to connect to the database tables, I was able to complete this phase 2 swiftly. Some versions of the code weren't working so I had to debug the programs. Some programs worked after renaming the specified table to the one I made in the database. Others were more complicated. One major problem I ran into was updating a user's password from the default password, "12345". At first, I thought that the problem was due to a few lines of code that converted the user ID from lower case characters to upper case characters to check against the user ID's in the database. Since the user ID's were lower case  in the database (an 'e' followed by a number), I decided to remove that part of code. Unfortunately, it was late at the time, and I could not fix the problem.

The next day, I started working on it again. I decided to make the user ID's upper case in the database table and re-entered the lines of code that I deleted the day before. After testing it, the program worked fine and I confirmed that the user's password was updated in the the database table correctly.

Once I fixed this problem, I needed to convert my previously made HTML programs to ColdFusion programs. This part was pretty easy as I had a clear idea of what to do. First, I copied and pasted my HTML programs into the ColdFusion "CFM_Code" folder and changed their file extensions to .cfm. Then, I decided to update the directories of the images and hyperlinks in the programs to match the new locations of the program files. Once I started doing this, I realized I should make two new programs for the header and footer bars so that, instead of altering every hyperlink and directory path of the images repetitively in each program, I could instead just modify them once.

After making separate programs for the header and footer, I altered the "JIIS_Functions" program to match the directory paths in the folders as well. I then entered the <cfinclude> tag into each of the programs where the header and footer were used. After performing unit testing, the result displayed the header and footer correctly.

After converting all the programs from HTML to ColdFusion, I performed the final acceptance test to ensure that all the buttons and hyperlinks worked. After changing some minor bugs, I was finally able to get the program to work completely. I turned over my work assignment to my mentor and she checked all of my programs and performed validation testing to ensure that all the requirements for the second phase of the work assignment were met.

Now that I have completed phase 2, I will be starting on phase 3, the final part of my independent component. It will consist of creating a new entry form that would allow users to add, delete, update, and view user information. 

No comments:

Post a Comment