COIN 74 - Assignment Eleven
SOURCE: Robert Cormia's Foothill College online text, Fall 2006
Complete your final project by using a form validation behavior on your form and adding the behaviors listed on the requirements list.
Libraries vs Templates
It is often difficult when building a site to decide which techniques to use to make your site building easier. In the Knowledge Quest lesson, one or more of your classmates presented their findings on Templates and Libraries or Assets. When you create a template, you specify areas of the template that will not change from page to page, such as a copyright statement, a background graphic, etc. You also specify at least one editable region, which will contain the content that will change from page to page. Once you create a template, you can quickly create pages by choosing the File>New From Template command.
Using templates can help you to build a site quickly, especially one containing lots of pages that have the same elements in the same places on each page. The value of using templates for building a site is highest when you're creating a site that needs consistency among large numbers of pages. For example, you might create a site that contains biographical information for all of the members of a trade association. Certain elements, such as the association logo, will always appear on all the bio pages in the same place. You would create an editable region to contain the actual biographical information for each member.
Often, however, templates are not the best tool for building a large site. You may have elements that you want to use on many pages, but you might want pages to be arranged differently. In this case, Dreamweaver's Library feature of the Assets Panel might be a better choice.
Libraries give you the advantage of designating elements that you want to use often as page elements, but they allow you to implement those elements in a more flexible manner. For example, suppose you have a company logo that you want to use on various pages in the site. If you created a page template, you would most likely place that logo on the template, but not in an editable region. You would simply place it in a location on the page, which would be applied consistently to any pages that use that template. Once you do that, however, you really don't have the flexibility of moving that logo anywhere else on the page.
By placing the logo into a library, you can easily add it to the pages on your site in any location on the page.
You might be wondering at this point what advantages the Library feature has, since placing an element from a library seems to be similar to simply inserting an element on the page the "old fashioned way." Here is the main advantage: Once you add an item to a library and then place the item on a page, the library item on the page is linked to the library. Once that link is established, the management of the library items is done within the library, and not on individual pages.
For example, if you place a logo in a library, and then use the library to place that logo on various site pages, all of the pages that use the logo can be updated immediately. Managing repeating elements is much easier in this respect.
Libraries vs. Server-Side Includes
Many experienced web developers also wonder how libraries differ from server-side includes. A server-side include is a common site element that is stored on a web server and is brought onto a page via a script. By using a server-side include, you manage repeating site elements more easily than placing them individually on multiple pages. When you update a server-side include on a web server, the pages using that element will update, since the element is loaded with the pages as they are transferred to the viewer's computer.
However, server-side includes are more difficult to implement. First, a script is necessary to have the web server transfer the element along with the page. The script contains much more code than standard HTML tags, making the download time longer. Second, this strategy can easily tax a web server, since each time a page is accessed the server will also have to execute those scripts.
So, Libraries are just another tool you can use if your site calls for it. If you have a site with dozens of pages that are the same, it might be best to use a template. But, if you need to simply be able to quickly place and manage repetitive elements, then Libraries really could be your ticket.
What about RSS Feeds?
Amy Gahran says that "an RSS feed is a particular kind of XML file that contains information about your new content (headline, description, excert, anything you care to specify." She states that not "a lot of people know about RSS right now, it's getting popular quickly. I wouldn't be surprised if in the next couple of years RSS becomes as widely known and used as the Web and e-mail." What is an RSS Feed? "It stands for Rich Site Summary (or Really Simple Syndication...). It's a new way for people who publish content online to notify people interested in that content whenever fresh content is made available online. - Contentious:
http://blog.contentious.com/archives/000038.html
More RSS Resources
http://www.webreference.com/authoring/languages/xml/rss/intro/
http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html
Copyright © 2006 - 2007 Robert D. Cormia - September 19, 2006