<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html> <head> <title>Web Content Management FAQ</title> <meta name="Author" content="Mike Meyer"></head> <body> <h1>Web Content Management FAQ</h1> <p>Contributed by Mike Meyer</p> <p><em>Some pointers on using <a href="http://www.perforce.com/">Perforce</a> for Web Content Management, phrased in the form of a FAQ.</em></p> <ul> <li><a href="#wcmfaq1">What is W.C.M.?</a></li> <li><a href="#wcmfaq2">How is W.C.M. different from S.C.M?</a></li> <li><a href="#wcmfaq3">How can I use Perforce to help with my W.C.M. problems?</a></li> <li><a href="#wcmfaq4">How can I ensure that no one edits files in the published branch?</a></li> <li><a href="#wcmfaq5">How can I check my HTML documents?</a></li> <li><a href="#wcmfaq6">How can I update my search engine's database?</a></li> </ul> <h2>Some answers</h2> <h3 id="wcmfaq1">What is W.C.M.?</h3> <p>Web Content Management - W.C.M. - is the maintainence of the content of a web site. Like an S.C.M. task, it involves keeping track of a collection of files being revised by different people for different reasons, and being able to recreate a specific set of those files from any moment in time.</p> <h3 id="wcmfaq2">How is W.C.M. different from S.C.M?</h3> <p>Instead of being a collection of files that go through a build process to create a product that can be tested, a web site is a collection of pages which users access over the web. Some of those pages are just bits of text. Others are programs - possibly compiled - that dynamically generate new text on every access. Any possible variation between those extremes is possible, from pages that are nearly static with a few bits of dynamically generated text, to programming languages that have the same structure as the generated HTML page.</p> <p>The critical difference is that there is only <strong>one</strong> web site - you can't have a copy for each user, and one for testing. This makes testing problematical, because you can't simulate being thousands, or even hundreds, of users all over the world using the same system. This reduces testing to making sure that the web pages have the correct data before making it available to users. This is normally done by running a test server for new versions of the system to run on before they are put into production.</p> <h3 id="wcmfaq3">How can I use Perforce to help with my W.C.M. problems?</h3> <p>By using it to help manage the files, just as you would if they were part of any other product. See the white paper on <a href="http://www.perforce.com/perforce/wcm.html">Web Content Management with Perforce</a> for a detailed description of several plans for doing this.</p> <h3 id="wcmfaq4">How can I ensure that no one edits files in the published branch?</h3> <p>By adding a trigger to the published branch which verifies that the changes which affect files in that branch are branches, integrations or deletions. The <em>checkfor.py</em> script can do this, with a trigger line similar to:</p> <pre>integration //depot/web/published/... "checkfor.py ' - (integrate|branch|delete) change ' %changelist% %serverport%"</pre> <h3 id="wcmfaq5">How can I check my HTML documents?</h3> <p>Strangely enough, Perforce can do this for you. Doing so requires that you have one branch for unchecked files, and a branch for checked files - which is one of the two methods recommended by the white paper on <a href="http://www.perforce.com/perforce/wcm.html">Web Content Management with Perforce</a>. Since files in the published branch should be exact copies of the files in the development branch (see <a href="#wcmfaq4">the question on preventing edits</a>), a trigger on the published branch can get the file from the development branch to check. Since the error messages from the checker will be sent to the change submitter if the check fails, the developer even knows what needs to be fixed.</p> <p>After such an integration fails, the file in the published branch is locked. Fixing the problem will require reverting the file on the published branch before reintegrating the fixed file from the production branch.</p> <h3 id="wcmfaq6">How can I update my search engine's database?</h3> <p>The answer depends on how you are getting files from Perforce to the web server, and how your search engine builds the database.</p> <p>To take proper advantage of Perforce in this case, you need a search engine that can update its database when a single file changes. Once you have that, you add hooks to the W.C.M. system to get a list of files that have changed so the database can be updated.</p> <p>If your production web server is a client which you synchronize to the Perforce depot to update, then the list of new files is immediately available as the output of the <em>p4 sync</em> command. It will need to be massaged into a form acceptable to the search engine, which should be a simple text substitution.</p> <p>If you are using <a href="http://www.perforce.com/perforce/webkeeper.html">WebKeeper,</a> then the list of files isn't quite so readily available. In this case, you set up a review daemon needs to be set up to get lists of changes that involve the web files in the depot, and extract the list of depot files from those changes. From this point, it's again a simple matter of text substitution.</p> </html>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#7 | 217 | Mike Meyer | Rename the WCM FAQ to the top level. | ||
#6 | 208 | Mike Meyer | Split "How can I test my web server" into a separate question. | ||
#5 | 206 | Mike Meyer | Actually get the changes that are in the buffer. | ||
#4 | 205 | Mike Meyer | Changes from Donna Inches. | ||
#3 | 203 | Mike Meyer |
Change differences to note the problems with the environment not being replicable to each developer, etc. |
||
#2 | 200 | Mike Meyer | Include the changes from Baj. | ||
#1 | 199 | Mike Meyer |
Add first version of a WCM faq. Put in checkfor.py for the FAQ to refer to. |