16. Using Personal Web Packages

What Are Web Packages?

Sites can be created with many different structures and formats and for many different purposes. Some formats are applicable to only one particular company or purpose, but many sites consist of one or more reusable parts. For example, a site might have a page that displays data from a database in tabular format, another page that provides a feedback form, another page that lists frequently asked questions, and another page that gives contact information. Such a site could be used by any number of companies or organizations with minimal reconfiguration.

Wouldn’t it be nice to have some way of packaging such a site so it could easily be reused or be used by many companies or organizations? Web Packages were designed to do just that!

A Web Package enables you to package an entire site or parts of a site into a single file. That file can then be imported into a new or existing site. You could, for example, create a web-based forum comprised of several pages, a database, some graphics, some templates, and some style sheets. All the files that make up the forum could then be exported to a Web Package. That Web Package could then be used to easily add a web-based forum to any site.

Creating a Web Package

To create a Web Package, follow these steps:

1. Open the site that contains the files you want to use in your Web Package.

2. Select Site, Export to Web Package to display the Export Web Package dialog shown in Figure 16.1.

Image

Figure 16.1. The Export Web Package dialog lets you easily create a Web Package to use in other sites.

The Export Web Package dialog consists of two panes. At the left is a listing of all files in the current site. At the right is a listing of all files that will be packaged into the new Web Package.


Image Tip

Users who import your Web Package will use the information you enter into the Properties dialog for more information on your Web Package. It’s a good idea to always include this information.


By default, the new Web Package is called My Web Package. If you’d prefer, you can change the title of the Web Package in addition to other properties by clicking the Properties button shown previously in Figure 16.1. When you do, the Web Package Properties dialog is displayed. Figure 16.2 shows the Web Package Properties dialog after entering information about a Web Package.

Image

Figure 16.2. You can further personalize a Web Package by configuring its properties using the Web Package Properties dialog.

To add files to your Web Package, select them in the left pane in the Export Web Package dialog, shown previously in Figure 16.1, and click Add. Alternatively, you can double-click a single file to add that file to your Web Package.

When a file is added, Expression Web also adds any dependencies for that file. If you want to examine the dependencies for a particular file, select the file and click the Show Dependencies button. Expression Web displays all the dependencies for the file, as shown in Figure 16.3.

Image

Figure 16.3. After clicking the Show Dependencies button, you can easily locate files on which the selected files depend. Once you click the button, it changes to a Hide Dependencies button.


Image Caution

Expression Web uses the dependencies displayed to determine which files should be included automatically with the selected files. Therefore, it’s important to carefully choose the correct dependency checking option before adding files to a Web Package.


Expression Web uses the setting in the Dependency Checking drop-down to determine how it should locate dependencies. The following options are available:

Check All Dependencies, Except Hyperlinks—Locates all files on which the currently selected files depend except those files linked to by the selected files

Check All Dependencies—Locates all files on which the currently selected files depend, including files to which the currently selected files link

Do Not Check Dependencies—Performs no dependency checking


Image Caution

After a Web Package has been saved, it can no longer be edited. To alter the files included in the package, you must export a new Web Package with the new set of files.



Image Caution

If your disk-based site contains subsites, rebuilding the metadata converts the subsites to a regular folder. After you rebuild metadata, you need to right-click on folders that should be a subsite and select Convert to Subsite to convert the folder back to a subsite.


After you’ve selected all the files to be included in your Web Package, click OK. Expression Web displays the File Save dialog, where you can select where to save your package.


Image Note

A sample Web Package appears in the ExamplesCh16Files folder on this book’s website at informit.com/register. You can import this sample into one of your sites to examine how a Web Package works.


Importing a Web Package

To import a Web Package, open a site or create a new one. Select Site, Import, Import from Web Package to display the File Open dialog. Browse to the Web Package file and click Open to import it. When you click Open, the Import Web Package dialog is displayed, as shown in Figure 16.4.

Image

Figure 16.4. The Import Web Package dialog displays all the files inside a Web Package. You can either import some or all of the files.

A Web Package can be imported into any existing site. By default, Expression Web creates a new folder in the site for the files in the Web Package. The folder name matches the name of the Web Package by default, but you can use a different folder name by specifying it in the Destination text box.


Image Tip

If you want to import a Web Package into a new site that contains only the files in the Web Package, create a new Empty Web Site and import the Web Package into it.


If you want more information on a Web Package prior to importing it, click the Properties button shown previously in Figure 16.4. Expression Web displays a dialog showing the author, company name, and a description of the Web Package to aid in determining whether you want to import the Web Package.


Image Tip

Keep in mind that Expression Web does not conduct any dependency checking when importing a Web Package, so if you choose to not import all files, carefully test the imported files and import any additional files if necessary.


To import a Web Package, select the files you want to import and click Import. When you do, Expression Web might display a security warning, as shown in Figure 16.5. If you don’t know or trust the source of the Web Package, you can select Don’t Run to cancel importing the Web Package.

Image

Figure 16.5. Web Packages that are not digitally signed display a warning when you try to import them. Import a Web Package only if you know and trust the source.


Image Caution

When you import the sample Web Package on this book’s website at informit.com/register, you see the warning shown in Figure 16.5. In this case, it’s perfectly safe to import the Web Package.


If you click the Properties button, you can configure the properties of your Web Package. This is useful in cases where you might be distributing the Web Package to someone else because it allows them to see specific information about the Web Package while they are importing it.

Capitalizing on Web Packages

Earlier in this chapter, I gave an example of creating a Web Package of a web-based forum. Creating a web-based forum is not a simple task and requires quite a bit of programming knowledge. However, the example should not be dismissed because it demonstrates the enormous opportunity that Web Packages provide to an innovative designer.

I get a lot of email from people looking for solutions to web design problems. The problems I see are almost never related to HTML code or how to design a particular page element. Instead, most people ask about adding large-scale functionality to a site, such as a feedback form that submits into a database and sends email.

If you’re the kind of person who likes to write web applications or create innovative designs, Web Packages represent an enormous opportunity. You could easily open an e-commerce storefront offering Web Packages that provide snap-in capability to a site. Such an endeavor would be highly lucrative.

As you develop your sites, keep in mind which parts might be useful to others. Package those parts into Web Packages, and use the power of the Internet to market them to other designers. If you’re going to pursue this route, however, you should get a digital certificate and sign your Web Packages so they don’t generate the security dialog shown previously in Figure 16.5.

To get a digital certificate, you’ll need to work with a certificate authority such as Verisign, Inc., and obtain a Class 2 digital certificate. Purchasing one of these certificates is fairly expensive, but it’s a necessity if you want to enter into the realm of selling Web Packages.

Verisign, Inc., has a lot of information (including comprehensive guides) on its site. You can read more by visiting www.verisign.com/products-services/security-services/code-signing/digital-ids-code-signing/index.html.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.230.107