Front and Center: Never Underestimate the Power of a Snippet

Take a look at the HTML or script of any page in your site. Notice how often the same batches of text and tags are repeated over and over? Even simple things such as the same text link can be found several times on a page or site, and for most developers, each instance is entered by hand.

Some smart coders use cut and paste for this kind of process, but that shortcut still requires going back and forth between your code to find the item. When used properly, Code Snippets can speed up any design project considerably.

If you are taking on a Web project of any size, you could easily identify a number of elements that will be used over and over again on your site. From items as basic as internal hyperlinks to issues a bit more complex such as client-side form field validation scripts, if an element is going to be used throughout a site, its addition as a Code Snippet should be considered.

In addition, if you design using CSS, the ability to place your styles as Code Snippets can quickly expedite your design process.

There are limits to the Code Snippet tool.

You can't save, export, or share your snippets. In some ways, this is good because it encourages each developer to create her own library, but it certainly discourages the combined efforts that could come from a team working together on a shared library.

In addition, because there is no external storage or archive system, your library will die if your system does. As a result, make sure that your system is backed up on a regular basis should something go wrong.

This is why we created the SnipView product mentioned previously in this chapter and located on the CD that comes with this book.

Not only do you have the upper hand with FrontPage 2003 and Code Snippets, but you just made it better by buying this book.



Special Edition Using Microsoft Office FrontPage 2003
Special Edition Using Microsoft Office FrontPage 2003
ISBN: 0789729547
EAN: 2147483647
Year: 2003
Pages: 443

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net