Changes between Version 1 and Version 2 of WikiStart

Show
Ignore:
Timestamp:
01/27/14 11:17:15 (10 years ago)
Author:
smagi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v1 v2  
    1 = Welcome to Trac 0.11.2.1 = 
     1= Clavis: Security, Type-safe URLs for ASP.NET = 
    22 
    3 Trac is a '''minimalistic''' approach to '''web-based''' management of 
    4 '''software projects'''. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress. 
     3Clavis is a simple class library for use with ASP.NET. It provides primitives for secure parameter passing between pages, with compiler-verified taint-checking for any insecure parameters. For an overview of the rationale or the operational details behind Clavis, see [http://higherlogics.blogspot.ca/search/label/Clavis the Clavis blog posts]. 
    54 
    6 All aspects of Trac have been designed with the single goal to  
    7 '''help developers write great software''' while '''staying out of the way''' 
    8 and imposing as little as possible on a team's established process and 
    9 culture. 
     5You need only understand a few concepts to use Clavis: 
    106 
    11 As all Wiki pages, this page is editable, this means that you can 
    12 modify the contents of this page simply by using your 
    13 web-browser. Simply click on the "Edit this page" link at the bottom 
    14 of the page. WikiFormatting will give you a detailed description of 
    15 available Wiki formatting commands. 
     7 1. IContinuation for specifying page parameter types 
     8 1. Unsafe<T> for specifying unsafe/insecure page parameters 
     9 1. Continuation.ToUrl overloads for generating URLs from continuations + arguments 
     10 1. Continuation.TryParseX for parsing page parameters 
    1611 
    17 "[wiki:TracAdmin trac-admin] ''yourenvdir'' initenv" created 
    18 a new Trac environment, containing a default set of wiki pages and some sample 
    19 data. This newly created environment also contains  
    20 [wiki:TracGuide documentation] to help you get started with your project. 
     12== Typed Page Parameters == 
    2113 
    22 You can use [wiki:TracAdmin trac-admin] to configure 
    23 [http://trac.edgewall.org/ Trac] to better fit your project, especially in 
    24 regard to ''components'', ''versions'' and ''milestones''.  
    25  
    26  
    27 TracGuide is a good place to start. 
    28  
    29 Enjoy! [[BR]] 
    30 ''The Trac Team'' 
    31  
    32 == Starting Points == 
    33  
    34  * TracGuide --  Built-in Documentation 
    35  * [http://trac.edgewall.org/ The Trac project] -- Trac Open Source Project 
    36  * [http://trac.edgewall.org/wiki/TracFaq Trac FAQ] -- Frequently Asked Questions 
    37  * TracSupport --  Trac Support 
    38  
    39 For a complete list of local wiki pages, see TitleIndex. 
     14A typed page parameter list is specified via an IContinuation<...> declaration, like so: 
     15{{{ 
     16public class SomePage : System.Web.Page, IContinuation<int, string> 
     17{ 
     18  ... 
     19} 
     20}}} 
     21This declares a page that accepts a protected Int32 as the first argument, and a protected string as the second argument. By default, all types specified in an IContinuation<...> declaration will be protected, which means they cannot be changed by clients. If you wish to declare that a certain page parameter is unprotected, then you need only wrap it with Unsafe<T>. For instance, suppose the integer argument from the above example should be unprotected: 
     22{{{ 
     23public class SomePage : System.Web.Page, IContinuation<Unsafe<int>, string> 
     24{ 
     25  ... 
     26} 
     27}}} 
     28Any type can appear as an argument to IContinuation<...>, not just primitive values. In fact, it's good practice in Clavis not to use primitive types since parameter names are generated from the class name by default: 
     29{{{ 
     30public class SomePage : System.Web.Page, IContinuation<Unsafe<Project>, Customer> 
     31{ 
     32  ... 
     33} 
     34}}} 
     35Clavis can also handle lists of values by specifying IEnumerable<T> as a parameter type: 
     36{{{ 
     37public class SomePage : System.Web.Page, IContinuation<IEnumerable<Project>, Customer> 
     38{ 
     39  ... 
     40} 
     41}}} 
     42IEnumerable<T> and Unsafe<T> can also be nested, so you can have an unsafe list of objects as a parameter: 
     43{{{ 
     44public class SomePage : System.Web.Page, IContinuation<Unsafe<IEnumerable<Project>>, Customer> 
     45{ 
     46  ... 
     47} 
     48}}}