r8 - 04 May 2006 - 00:53:54 - SamHaslerYou are here: TWiki >  Codev Web > EditCgiScript > EditPreviewViewWorkflow > ViewCgiScript
Tags:
delete_me 1 Add my vote for this tag, , create new tag
Module name view ViewCgiScript
Location TWIKIROOT/bin/view
Summary Handles viewing of Topics
Primary Author PeterThoeny

CVS history http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/twiki/twiki/bin/view
CVS alpha http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/twiki/twiki/bin/view?rev=HEAD&content-type=text/vnd.viewcvs-markup
Contributing authors (see CVS History)
IsClass? NO
First TWikiRelease to be filled out

Purpose

This script handles the scenario where the user views the site. It is responsible for calling and invoking TWiki.

Used by

Code outline:

  1. load template
  2. complain if web or topic not valid
  3. handle canceled (from EditPreviewViewWorkflow)
  4. retrieve $topicText from TWiki::Store
  5. read skin and templates for displaying page
  6. ensure user has permission to view the topicText
    1. bounce them to authenticate if not
  7. unless want raw text, call renderer to convert topicText into HTML
  8. mirror stuff
  9. formatting footer stuff

TWiki Modules used

This CGI script depends on the following TWiki modules for functionality:

External Modules used

This CGI script also depends on the following external modules

PublicMethods?

This section lists the methods that can be used by the scripts and by other modules
  • main - used on invocation by CGI

PrivateMethods?

These do not need to be not documented yet

Please see CodevDocumentationProject and CodevDocumentationProjectDev for comments on the format of these pages.

-- MartinCleaver - 23 Jun 2002

I'm attaching the visual call graph produced by running "bin/view" on my server.

  • It show what subroutines get called from where.
  • It does not preserve anything about order.
  • It does not show parameters
  • It does not show indirect calls
  • It does not show Object References. See perl's 'Xref" tool for that.

I used the Deparse option to reduce it to the raw parse, wrote a small perl hack (scrappy as hell but it did the job) to produce the indented listing, then imported it into a graphics tool to show as a visual tree. Yes, it could be automated; the hack could output some kind of postscript, but I don't write postscript any more. (It takes a month to turn my brain around to think in RP, and then I talk funny too, then a month to warp my brain abck so I can relate to 'notrmal' people and things.)

The tree shows that there are some bits of code that are parsed but not called from "main".

I'm attaching the graphic (you'll need a big screen) and the basic text file.

I hope this helps people with an understanding of the structure of TWiki's code.

There are some ramifications of this that impact overall efficiency that I'll comment on later and reference back to here.

-- AntonAylward - 08 May 2003

Anton, can you rerun this for CairoRelease please? Since Crawford performed the SlimDownFatCgiScripts the architecture has changed considerably.

-- MartinCleaver - 02 Oct 2004

Topic attachments
I Attachment Action Size Date Who Comment
txttxt VIEW.txt manage 4.6 K 09 May 2003 - 00:01 AntonAylward Text of view tree
pngpng twiki.bin.view.png manage 38.6 K 06 Dec 2003 - 12:49 WillNorris Graphic of tree view
zipzip twiki.bin.view.png.zip manage 37.6 K 09 May 2003 - 00:28 AntonAylward Graphic of tree view
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r8 < r7 < r6 < r5 < r4 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo