0%

Managing Assets and Dependencies ID: PM-CP-AD

This lesson explains several ways to add assets to packages, as well as how to manage the assets and dependencies already in the package for maximum usefulness.

 

  1. Interface overview
  2. Options for managing assets and dependencies
  3. Shortcuts for adding assets
  4. How to get back to the assets and dependencies interface

 

As long as your version is a draft, you can modify assets and dependencies. The assets that you work with while drafting a new version are live, meaning that the assets that you see are how they are currently saved on the source site (not how they are published). Any changes you make on the source site will be visible in the draft version, although some changes might not be visible until the draft is either edited, activated, or pre-activated.

 

Update, and Trashed assets indicate primary “ownership” of the asset and can only be included in a single package. To include that asset in a second package the first package must be added as a dependency instead. Note that this ownership is determined by the latest version of each package and does NOT take into account old or draft versions.

Ignored, InstallOnly, MapRequired, and MapOptional assets indicate a looser “relationship” between a package version and an asset and may be included in as many packages as desired.

Dependencies must be installed at the same time or before the package version that defines it as a dependency.

 

The only assets you should typically need to manage most of the time are InstallOnly and Update assets. When a new draft is created, and when a draft is pre-activated, Marketpath will automatically curate your Trashed, MapOptional, and MapRequired assets - although adding and updating the descriptions will be up to you.

You do not have to manually track all of the Map (Optional) and Map (Required) assets since these will automatically be added, updated, and removed for you as necessary prior to activating the new version. You may want to review the mapped assets prior to activating a new version in order to consider 2 things:

  1. Should the asset (or dependency) be included in the package directly?
  2. Would adding or updating the asset's description help users select mappings when installing your package?

 

Dependencies

Oftentimes, one part of a website is dependent on another. In this way you can build complex and flexible sites very quickly from a variety of reusable components. In Marketpath CMS Package Manager we define these components using dependent packages.

When installing a package with dependencies, the dependent packages must either already be installed on the site or may be installed at the same time.

However, it is common for packages to change over time so that new features or components are added and old ones removed. When you define a dependent package, you can select the minimum version for that package. The most common values are either to allow any version (no minimum version) or to require the latest version of a dependent package at the time that your package is released.

Because of the dramatically increased complexity, Marketpath CMS does not allow you to define a maximum version for a package - which means that future updates to dependent packages could potentially break your package. There are generally three ways to handle this challenge:

  1. Ignore it entirely. This may be an acceptable option for simple and stable dependencies or for packages that you only intend to use for a short time.
  2. Actively maintain your package. When new dependent versions are released, check to see if they break your package. If they do, fix it and release a new version. In your changelog, cite the new dependent package version as the reason for the change.
  3. Maintain both your package and all dependent packages. If you control all of the code, then it will be easier for you to prevent breaking changes in dependent packages. Of course, at the same time it may be more work for you to maintain all of the components yourself. If you attempt this, make sure you follow all applicable copyright and intellectual property guidelines.


Feedback?

Please fill out the form below with your feedback or any questions you may have after working through the "Managing Assets and Dependencies" lesson.

Your Name
Email 
Feedback / Questions