The Basics

There is a WCF web service. It has several methods, but we're going to simplify it as:
  • GetSnippet( int id )
  • AddSnippet( CodeSnippet snippet )
  • FindSnippet(string searchTerms )

The CodeSnippet

The CodeSnippet class is part of the WCF contract (and there will be a New-CodeSnippet cmdlet) and has the following properties:
int          Id { get; }                // only when they come from the db
string       SourceCode { get; }        // inserted in the constructor and can't be changed
string       Author { get; }            // interesting questions ;)
SnippetType  Type { get; set; }         // Script|Function|Cmdlet|Class|Template|Snippet
string       Name { get; set; }         // The name of this script|function|whatever
int          Version { get; set; }
DateTime     Created { get; set; }
string       Description { get; set; }
CodeLanguage Language { get; set; }     // { LanguageName, LanguageVersion }
List<int>    Dependencies { get; set; } // reference to other snippets
List<int>    Parents { get; set; }      // reference to other snippets
List<int>    Children { get; set; }     // reference to other snippets
List<string> Tags { get; set; }         // free strings, with expectation of one or more "noun:*" and "verb:*"

The Database Diagram

PoshCode.png

The Class Diagram

{Todo}

Last edited Jan 24, 2008 at 5:36 AM by Jaykul, version 2

Comments

No comments yet.