Thursday, October 15, 2015

WEB GIS Lab 4

Introduction
This lab exercise is designed to introduce the required languages needed in developing Web GIS applications with the ArcGIS API for JavaScript. Specifically, syntax and basic methods of Hypertext Markup language (HTML), cascading style sheets (CSS), and JavaScript, which are commonly used in the development of webpages. The main goal of this lab is the development of a website using the three languages simultaneously.



Methods            
Part one of the lab focused on developing a web page using HTML tags. The program Notepad++ is where the lab first begins starting with naming and saving the HTML document. The name of the document is expressed on the first and second line. It is important to note that the computer needs to know what kind of language you are using because it can now translate, present the language on the web. Saving the document under html file helps the computer identify the codes correctness. Once naming and saving is complete, giving the web page a title and three level header is next. The title is placed in the head division and the headers are placed in the beginning of the body division. A division is used to help break each part into a section making it easier to read and understand. Each header has its own size, <h1> being the largest and <h6> being the smallest. In the next division came an unordered list of six hobbies, but before creating the list a comment line was formed to help the audience follow my steps. The comment line is always in green so it is easy to make out of the script. To create an unordered list you begin with <ul> (unordered list) then tagging each hobby inside the list tag, <li></li>. To complete the unordered list you end with a </ul> tag. The final task to part one included inserting a source reference link in the footer. The href attribute is used to reference a source on html. After the href attribute you include an equal sign then in quotes you enter the link. The link is then hyperlinked to any text that comes after the link. We now have a simple web page with no style.
            
Part two of the lab will fix the simplicity of the web page. To create styles on the web page we use CSS. To use CSS a new notepad page is required and saving the document as a CSS file is also required. The body is first section to be styled and within the section the background color as well as the font family is customized. The other sections, which consist of the wrapper, header, main, sidebar, and footer are customized as well. The other properties that are used in the CSS file are margin, padding, color, width, and float. Once establishing the properties to their specific section it is time to link the CSS file to the html file. To link the two files together you must use the link tag with using the rel and href attributes. The rel attribute is used to define the relationship that it has to the document, in this case stylesheet and the href uses the files link to connect to two together. Now we have a web page with some color and style.

After linking the two files together we can now import pictures that can be displayed on the web page. Two photos are inserted on the html file, one being UW-Eau Claire’s logo and the other being the web application I created on Web AppBuilder. The img tag is used to embed photos that is followed by the attribute src=”” and the link of the photo is entered in-between the two quotes.

The last language, JavaScript is also created into a new file and is saved as a JavaScript file. The goal for this script was to display text, and configure the input, summit box created in the html file. Before each line of code a comment line is inserted so it is easy to follow the steps because JavaScript can sometimes be hard to follow. Each line of code starts with a keyword, var (variable) then a name is assigned, which should describe the variable. The JavaScript is then linked to the html file by incorporating id words in the html file to the JavaScript file.

My first web page development
Once completing all three languages I was asked to design my own web page of a company just starting and provides Web GIS solutions to customers. The web site followed much of the same as the test page, but required a change in style, two web GIS applications from ERSI JavaScript website, a ordered list of services, and inserting more photos. The web page I designed is to help people who are first learning and understanding web GIS. 


My designed web page
Conclusion
This lab has been extremely valuable when it comes creating a web page. After completing this lab I feel more confident about my ability to read and write code in html, CSS, and JavaScript. I plan to use these skills in the future for web applications I design and I hope to learn more about each language.

No comments:

Post a Comment