Tuesday, April 18, 2017

CST336 Week 7

CST336 Week 7

This week we learned the basics of AJAX, XLM, and JSON. AJAX is a javascript code that allows for updating of web pages dynamicallys. It stands for Asynchronious Javascript and XML. We learned to use the XMLHTTPREQUEST to fetch data and export database info into JSON format. We also learned how to process JSON data in a web page and how to submit form data using AJAX. For the assignment we were tasked with creating a webpage using AJAX to change a webpage dynamically.

Here is a screenshot of a before and after shot of clicking through a database and the data automatically showing on the page without it having to reload:



Tuesday, April 11, 2017

CST 336 Week 6

CST 336 Week 6

This week was fairly light compared to the previous 2 weeks. We learned the basics of JavaScript and JQuery and I am now able to distinguish between the two codes. We were able to import JQuery libraries and create JQuery functions. We then learned to update HTML elements and styles using JQuery. I found Javascript more to my liking as it utilizes several concepts and syntax that I was already aware of. Here is a screenshot of the webpage created in the lab to utilize what we learned:


It is a simple vocabulary quiz that perhaps an elementary school student could take to test their basis Spanish. The first question asks the user to click on "El Pollo". When the mouse is hovered over the image, the image gets larger. The second question asks the user what is cat in Spanish. The user then types it in via a form. The third question consists of radial buttons asking the user to select what dog is in  Spanish. The submit quiz button grades the quiz. This web page is built on the foundations of Javascript and JQuery.

Wednesday, April 5, 2017

CST Week 5

CST Week 5

This week we learned about being able to distinguish between cookies and sessions. We had to implement creating sessions in PHP and store and retrieve data in a session. We also learned how to stop a session and how it is implemented with logins and passwords.

We finalized our team project which implemented a database to create a webpage. This was challenging as our team consisted of various levels of knowledge in these areas. We were able to finish the task on time.

Our project is a PC game Catalog
The project has met all of the requirements. There is a login screen to begin. We decided to make the color an appealing blue with a picture showing what the database is about.
There is one form per table allowing users to see information for each game or users of the catalog.
We have functions to find the most expensive game, total cost of all games in the database, and the average cost of the games.
You can filter the games by publishers or genres and filter the user by first letter of their last name.
Finally you can update or delete user entries. We would have liked to put this in a table if we had more time to make the page shorter.
Here is a screenshot of the first page:
Game catalog web page

Wednesday, March 29, 2017

CST 336 Week 4

CST 336 Week 4

This week we implemented an SQL database on a server to create web pages. We had to create a webpage that connected to the database through PHP using PDO's. We then retrieved the data from the database through PHP. We also learned about joining tables and conducting aggregate functions. Finally we were able to figure out how to insert, update, and delete records from a user on a website.

We also began work on our group project which consists of implementing all we have learned so far in creating a webpage that utilizes databases. We will be creating a webpage catalog that consists of pc games that different users can purchase and have access to. The database will consist of a user table and a game table. A third table linking the purchased products and users will be created as well. We have not begun work on the website but will begin starting tomorrow.

Saturday, March 25, 2017

CST 336 Week 3

CST 336 Week 3

This week was all about learning HTML forms. We learned about the various input types of HTML forms such as buttons, text areas, radio buttons, etc. I then differentiated between GET and POST methods and how they are implemented in processing data in PHP. Finally we learned about PHP arrays and using array functions. 

This week I created web page for a geometric calculator for picking either a rectangle or triangle and then figuring the area for both as well as the perimeter of the rectangle by inputting the appropriate length and width of the objects. The calculations were done using various array functions such as array_product and array_sum.

Here is an example of the web page:


Tuesday, March 14, 2017

CST 336 Week 2

CST 336 Week 2

This week was all about PHP implementation in creating web pages. I learned how to use PHP variables and implement loops and conditions in PHP. I also learned the syntax of defining functions in PHP and generate randomization within PHP.
For the lab we had to generate a 10x10 table consisting of random numbers between 1 and 100. We were then tasked to color code all of the even and odd numbers differently. Finally the web page should count the number of even and odd numbers and display their corresponding percentages.
Here is a same of the web page:


Then for the next assignment we were tasked with creating our own idea to implement what we have learned this week. I decided to make a random BINGO card generator. It was fun and challenging trying to figure out how to go about solving this problem. In researching the problem I found that shuffling an array and then using array_pop() was the best way to randomize the numbers while also making sure not to use them twice. Here is an example of the program output.

Tuesday, March 7, 2017

CST 336 Week 1

CST 336 Week 1

This week was all about learning the basics of HTML, CSS, and creating webpages by learning how they work together. I was also able to upload the webpages to a sever to remain for web viewing. Here are examples of the webpages I created this week: