Modern applications in ICT workshop

register | login

Blog-Feb-2014 RSS logo

Group project plans starting to form...

George Munroe   Fri 14 Feb 2014   updated: Tue 07 Oct 2014

There were some network problems across campus today but we managed to use the time to cover material about setting up MySQL and exploring what a program driven web site could look like, involving processing forms and reading and writing database tables.

We also spent some time reviewing good practice in web page design, considering search engine optimisation, and concluding that what is best for our web site audience will work best for search engines too.

Best of all the groups began to form their workshop project plans. I didn't hear details of them all but the three I was involved in sound excellent!

We've confirmed that using winscp on the university PCs will be the most convenient for communicating with the group servers. You can put a shortcut to this Windows program on your PC desktop and after connecting to your group server for the first time, it's possible to simply save the session configuration then select the saved name for future sessions. The winscp program is in the CS applications portal available in the PC start menu.

With winscp you are able to drag files from the local PC folders to the DocumentRoot of the group web server. Remember that this DocumentRoot is located at /var/www/ on your group server and the first time you connect you will need to use the navigation on the right hand side of the winscp screen to locate it. For sysadm members, winscp will also allow you to open a putty session to log directly into the server and issue commands, rather than just copy files to it.

I've finished installing MySQL on all servers and also phpMyAdmin for easily administering your database through a browser interface. Access this using your server's web address followed by /phpmyadmin.

I have created a database called project on everyone's server, and this currently contains one table called tblUser with 7 fields—log into to see the fields.

Password for the ec2-user on each server was changed yesterday—see me to confirm what it is for your group if you don't already know. You may use this username for transferring files to the server, or if you are eager to add other usernames then you could do that also for team members, but it isn't necessary to progress your project web site.

The username for your project database is simply project. I will tell you the password in the lab tomorrow.

Your group web site currently has a working contact form and another form that will add records to the tblUser table of your project database. Remember, if you change your database format then you will need to modify the Perl code that is currently updating and reading the tblUser table!

Group programmers can edit the Page.pm Perl module methods (in /var/www/cgi-bin/ on the server) to change the menu items currently on your web site—adding new items, activating the two hidden ones I have put there and editing the labels etc. The User.pm module has methods that can be modified to read different database tables or different numbers of fields in the tblUser table. You will also see an example of sending email messages in the JAMBO.pm module.

There is a site CSS file in the web site's DocumentRoot in the css subdirectory. We will address CSS next week in more depth but feel free to experiment with what is there by changing some colors and so on.

Finally I have written a small form validation function in JavaScript and this is stored in the js subdirectory of the DocumentRoot. It is used on your web site contact form and the form which updates the users in your database, ensuring that all required fields are provided in the forms before submission—as well as doing a rough check on the format of the email address.

There is lots to explore and use as a starting base for your projects. Ask for help as you need it!

And have fun :-).

George

3 comments

Chukwuemeka Charles   Fri 14 Feb 2014

Wow, a lot of programmers work here. i will be watching!!!

Edward Johnson Mojiboye   Fri 14 Feb 2014

This is a detailed and interesting package. It makes me feel I should come for a fuller session to make me more put in the know on establishing a complete computer library for my law chambers

Udochukwu John Ochulor   Fri 14 Feb 2014

Drink the coffee as long as you can!!!!!!!!