Class Notes (837,623)
Canada (510,370)
CS 100 (117)
Dan Brown (12)
Lecture

Module 6 notes.docx

13 Pages
68 Views
Unlock Document

Department
Computer Science
Course
CS 100
Professor
Dan Brown
Semester
Winter

Description
Module 6 notes Module 6 Introduction So far we have considered the Web as a medium in which publishers organize materials for consumers to read. Wikis were introduced to the Web in 1995 as an application in which every user could be an author and editor, as well as a reader, of content. The most significant wiki to date is Wikipedia, which began in 2001 as an open encyclopedia and today has several million articles[1] on topics covering historical events, scientific achievements, global and local geographic information, and a host of trivia. Wikis provide users with a shared electronic notebook that can grow as large as needed. Contributors can easily start a new page in the notebook, or add information to a page that’s already there. Importantly, they can also go back to see previous versions of any page, see who made each change (and why), and easily restore any page to any of its previous versions. 6.1 Browsing Wikis You have likely read articles on Wikipedia, but perhaps you have not examined the organization of that Web site in much detail. Open Wikipedia’s main page in your browser. Notice the sidebar, a menu of choices on the left side of the page. The first entries in the sidebar provide some aids for navigating the site, including a search box. These are followed by some links to further information about Wikipedia, a toolbox of helpful links, and links to Wikipedia entries in other languages. Among the navigation links, Main page links to the home page for Wikipedia, Contents gives some potential entry points into the wiki’s articles,Featured content highlights a few of the organizers’ favourite articles, Current events brings you to some recent news articles, and Random articledisplays an article chosen at random. Explore these links to get a sense of what’s available. Type federation of students into the search box in the sidebar and click on Go. You are taken to a special kind of page known as a disambiguation page, created to allow you to choose from several alternative articles with similar names. Click on the link labelled University of Waterloo Federation of Students. The title at the top of the article is Federation of Students, University of Waterloo, below which is the statement “Redirected from University of Waterloo Federation of Students.” (By clicking on the link in this line, you can see the corresponding redirect page.) Such redirects help to reduce redundant information on Wikipedia while still providing many ways to get to the information you are seeking. Across the top you see tabs entitled article, discussion, edit this page, and history: Click on the tab edit this page to see an example of wikitext, the markup language for wikis. Notice, also, that you could change the contents of the page if you wished to do so. Do not edit this page, but instead click on your browser’s back button to return to the article itself. If you wish to try your hand at editing a page on Wikipedia, use the Sandbox, an area specially established for experimentation. You should notattempt to edit Wikipedia articles until you are more proficient. Because everyone is granted permission to edit wiki articles, it is important to be able to see what changes were applied and by whom. You can see the history of changes that have been applied to an article by clicking on the history tab. From that tab for the UW Feds page, for example, you can see that on December 8, 2007, MatttK changed the article and commented: “Removed the bit about ending the Fed Bus - this was solved over a year ago http://feds.ca/good_news_for_the_fed_bus.” The wiki keeps track of every edit to every page. All your contributions (including any vandalism) will be viewable by all the wiki users, and your identity will be revealed to all other wiki users. Practice Exercises 1. Use the search box provided by Wikipedia to find the article on vandalism. Notice that this article is protected: you can view the wikitext source, but you are not permitted to update it. Notice the structure of the page and the wealth of links to related pages. 2. Wikis have been created on many topics and for large and small communities. The articles in the wikis specializing in Colorado Hiking Trailsand in popular music look much like those in Wikipedia; those in wikis dedicated to Dungeons and Dragons and to aviation are somewhat similar; and those describing Marvel comics and a chemistry textbook are superficially less similar, although you can still see many of the features available. Look at some other examples of wikis, all of which use the same MediaWiki software. Special Pages As well as ordinary articles, wikis also include several classes of special pages that serve specific functions. These articles have titles that are preceded by a namespace, a designator indicating the special nature of the page. User pages For every registered user on a wiki, there is a page in the User namespace on which information about the user can be recorded. For example, ifJaneSmith were a registered user, there would be a page User:JaneSmith on which she (or others) could record personal data. Category pages Articles can be classified into categories to support the users’ ability to browse the wiki, since each category has a corresponding page in the Category namespace. Categories will be examined in more detail in the next module. Image pages Images stored in the wiki are addressed by referring to the image file in the Image namespace. For example, Image:Sparky.jpg refers to a JPEG image file. Discussion pages With so many potential content editors for each article, there may be conflicts among their viewpoints, and this could result in changes being applied and undone repeatedly. Therefore, every article in a wiki has a corresponding discussion page, on which users can debate the article’s contents. For example, corresponding to the Wikipedia article entitled Nunavut, there is a discussion page labeled Talk:Nunavut. There is also a corresponding discussion page in the Talk namespace for every page in the User, Category, and Image namespaces; for example, the page that holds a discussion about User:JaneSmithis at User talk:JaneSmith, and the discussion page for Image:Sparky.jpg is at Image talk:Sparky.jpg. 6.2 Introduction to Wikitext Just like other webpages, wiki articles can include paragraphs, headings, bulleted and numbered lists, italic and bold text, and images. However, instead of using HTML to represent various text components, wikis use an alternative markup language known as wikitext. A summary of MediaWiki’s wikitext codes can be found in Table 2-1 in MediaWiki (pp. 21-22) or on Wikipedia’s cheatsheet; more details are provided in Chapter 4 in MediaWiki. The equivalent of Jane Smith's homepage from Module 5 can be created as a wiki article entitled Jane Smith. (Use your browser to open this link to the wiki article in a separate tab or window. You will need to log in using your WatIAM username and password.) Links on that page are shown in blue if they are external (indicated by the small icon after the link) or if they refer to an existing article within the wiki; links are shown in red or maroon if they refer to an article that does not (yet) exist on the wiki. As with any webpage, if you click on a link, the browser attempts to display the page at the target of the link. However, unlike the HTTP protocol, following an internal link to a non-existent article does not result in an error. Instead, following such a link leads to an invitation to create the target page. This functionality is intended to encourage wiki users to insert links into articles freely when serving as an author and to contribute to the wiki immediately when serving as a reader. In fact the roles of author and reader become strongly intertwined. While looking at the wiki article on Jane Smith, click on the tab labeled view source to examine the wikitext that produces the formatted article. Notice that wikitext markup is unlike HTML in that it does not reserve a character (such as :''Kitcherloo, ON'' :''N8U Z3Y'' The colons (:) at the beginning of the lines indicate that the text is to be indented, where the number of colons beginning a line indicates the level of indentation. The use of two apostrophes in a row around a piece of text indicates it is to be set in italics, three apostrophes would indicate bold text, and five apostrophes would be used for bold italics. The markup is identical to the tag in HTML and indicates a line break. The most complex markup on the sample page is the wikitext that creates a table: {| border="1" ! Ages !! Home |- | 0-3 || [[Cranmore]], [[Alberta | AB]] |- | 3-8 || [[Carleton, New Brunswick| Carleton]], [[New Brunswick | NB]] |- | 8-15 || [[Chelsea]], [[Quebec | QC]] |- | 15-now || [[Courtenay]], [[British Columbia | BC]] |} The table’s content is delimited by outer braces (using both braces and pipes, as shown: {| … |}), and the text border="1" specifies that each cell should be surrounded by a border. (Recall that the square brackets indicate a link.) Header entries are indicated using exclamation points (!) and other entries use pipes (|). The turnstile markup (|-) separates rows in the table. Practice Exercises 1. Open the CS 100 wiki (you will need to be logged in using your WatIAM username and password), and click on your user name at the top of the page. You will be invited to create your User page. Create a heading and a paragraph of text. Preview the page to see that it looks as you expect 2. Create a subpage named Sandboxunder your User page by opening the page with the following URI: https://www.student.cs.uwaterloo.ca/~cs100/wiki/User:yourname/Sandbox (i.e. by appending /Sandbox at the end of the URI for your User page in your browser’s address bar or URL box). Use this Sandbox page to experiment with wikitext, checking that you can create multiple paragraphs, italic and bold phrases, bulleted and numbered lists, and lists within lists. Preview the page before saving it. Examine the page after it has been saved. Re-edit the page to add more content or change the formatting. 3. On your Sandbox page, create a simple 3-column table that lists the city, state or province, and country of four places that you have lived, visited, or might visit some day. © 2009, University of Waterloo 6.3 Editing an Article The essence of wikitext was described in the previous module. Much like KompoZer provides a point-and- click interface to mark up a document with HTML, MediaWiki provides an interface to enter wikitext markup codes. After clicking on the edit tab for a page, you see the existing wikitext displayed in an edit panel. Above that panel is a toolbar that provides several buttons for inserting wikitext. For example, highlighting some text and then clicking the second button inserts two single quotes (wikitext to indicate italics) around the highlighted text. Alternatively, clicking on that button with no text highlighted inserts new text (''Italic text'') at the current cursor position, after which you can replace the highlighted words by the text you wish to be rendered in italics. Notice that the editor is not a WYSIWYG editor: the text you highlighted or entered is not displayed in italics on the edit page. Nevertheless, the interface provides a convenient way to enter some commonly used wikitext. At the bottom of the edit page, you can find a Summary box in which you should always enter a brief explanation of the changes you have made: You will also find a row of three buttons and two additional options. You should always choose Show preview before choosing Save page, to ensure that your updates will produce the article in the way you intended; this step is needed because the editor is not WYSIWYG. Of course, if you decide that you do not want to edit the article after all, you should choose Cancel. The third button, labelled Show changes, causes MediaWiki to create a side-by-side display for every line in the article that you have changed. For each such line, the left panel (Current revision) shows the wikitext as it existed before your update and the right panel (Your text) shows the wikitext after your update. The wikitext in the edit box contains the text with all your changes included, and you can continue editing in light of seeing the changes you have already made or you can go on to preview how the revised article will actually appear. Practice Exercises 1. Open the sandbox page that you created earlier: https://www.student.cs.uwaterloo.ca/~cs100/wiki/User:yourname/Sandbox (by either typing the URI directly into your browser’s address bar or, like before, opening the CS 100 wiki (and entering your WatIAM credentials if asked), clicking on your username at the top of the screen, and then appending /Sandbox at the end of the URI for your User page found in your browser’s address bar or URL box.) Click on the edit tab to prepare to edit. Use the toolbar to make some text bold (first button), to insert an internal link (third button), and to insert a table (second button from the right). Click on Show changes to see the updates you are about to make. Preview the article to see the effects of your changes, insert a brief explanation in the Summary b
More Less

Related notes for CS 100

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit