Landing : Athabascau University

Group members: this is the place for your learning diary. Use this to post your zipped-up site at least once each unit, and your reflections as often as you wish (at least once per unit). Please write your reflections directly in the post, not as attached files. Where you do need to attach documents, such as for unit 1 designs, use PDF, PNG or JPG formats. You can attach files using the 'Embed content' link in the editor.

QUICK COURSE LINKS:  Add blog post - Read latest group postsFAQs: Course process : Site design : HTML : CSS : JavaScript : JQuery : AJAX : MiscPodcasts for each unit

Updated resource pages:  Unit 1 - Unit 2  - Unit 3Units 4 & 5 - Unit 6 - Unit 7

mportant notice: the student web server is unavailable. Until this is fixed, we do not require you to upload your site to the student server. See Running a web server on your local machine for details of how to meet the requirements for the final unit

Unit 4: Script Use and Augmentation

Unit Four went smoothly for me, with our tasking being to introduce some JavaScript to our site that would improve the experience of the personas created in Unit One. One of the reoccurring themes of the personas was the ease of being able to find information in an organized and timely manner. However, I am cognizant that my site is small in scale and it will take time to build content over the years. A problem requiring solving is to address both the needs of the personas in a way that doesn’t minimize the content my site provides, while providing organized and effortless access to outside resources.

I felt the solution was obvious. I needed a search box on the review page to ensure people could search for a trail externally if I had no information on a trail. This clearly deals with both issues. Firstly, it deals with the issue of information being organized and easy to access for my personas. If the trail isn’t listed, they do not need to go to Google itself, they can simply search right on the website and move on, getting the information they need. Lastly, the issue of my small scale is deal with appropriately by relying on Google and the information one can find using a Google inquiry. The world is, figuratively, at your fingertips through a web search with tons of information coming back.

This is not without issue, as sometimes the information returned can be overwhelming, or it can be difficult to know what result to follow. Still, some mitigation is issues is better than nothing. But, what about the code itself?

The code is slightly shorter than what is required and expected in the process guide, but this is by design. My preference is almost always to start from scratch or heavily modify existing code to clean it up, make it easier to follow, and have e a more efficient implementation. The code that I used from http://hawkee.com/snippet/7068/ works on current versions of Chrome, Opera, and Edge. I did not test it on Safari. <script language="Javascript"> is not used, but the proper form <script type="text/javascript"> is used. However, that being said, at https://www.w3schools.com/js/js_whereto.asp it suggests this is not required. It suggests that as JavaScript is the default scripting language, only <script> is required. No type declaration required.

Some online validators of the code itself indicated a missing semi-colin on the window.location.replace(replaced) line. However, other validators were fine with the omitted semi-colon. Having recently taken an introductory Java course, I preferred to see it present. It seems my opinion itself is validated with the discussion at https://stackoverflow.com/questions/444080/do-you-recommend-using-semicolons-after-every-statement-in-javascript where an example of code breaking due to omission of semi-colon is presented and top rated comment is to put in a semi-colon. An interesting read is at https://code.likeagirl.io/why-the-heck-do-i-need-to-use-semi-colons-in-javascript-4f8712c82329. Now, after reading both links in detail and without being a JavaScript expert, it is easy to see that there are reasonable arguments from both sides of the camp.

I also took this moment to clean up the contact form from a CSS implementation standpoint, but I plan to legitimately work on it once I start using my own JavaScript. I don’t really consider it part of my site at this time aside from the fact it was a requirement of a previous unit.

Comments