Tags:
delete_me1Add my vote for this tag create new tag
view all tags
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 History Action Size Date Who Comment
Texttxt VIEW.txt r1 manage 4.6 K 2003-05-09 - 00:01 UnknownUser Text of view tree
PNGpng twiki.bin.view.png r1 manage 38.6 K 2003-12-06 - 12:49 UnknownUser Graphic of tree view
Compressed Zip archivezip twiki.bin.view.png.zip r1 manage 37.6 K 2003-05-09 - 00:28 UnknownUser Graphic of tree view
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2006-05-04 - SamHasler
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.