1. Introduction

1.1 What is it?

Simplified ASP.NET (SASP) is a web framework that tries to be both light-weight and (X)HTML centric. The concept of SASP is based on a combination of traditional ASP.NET and the NVelocity templating engine. SASP tries to follow the convention over configuration for the basic SASP project layout, it also adheres to a MVC design very similar to ASP.NET. At the time of writing SASP provides a Page Controller design for the web applications.

A regular SASP page consists out of two parts: a view file and a code behind file. The view contains the basic XHTML code, with specific SASP entities for control manipulation and variable placeholders. The code behind contains the actual controller code, that is all logic that the page executes.

The original concept for SASP was first mentioned on Arne Vandamme's blog.

1.2 Controls

Like ASP.NET, SASP is control driven: you can make certain XHTML elements available to your controller. How SASP is different from standard ASP.NET:

  • as little overhead as possible: no runat="server" required, every element that has an id attribute, will be made available as a server control
  • all controls inherit from SasControl? -> XmlControl? -> HtmlControl?
  • SASP works with special underscore attributes to provider server-side only information

To give you an idea, compare the following ASP.NET approach:

<table>
<asp:Repeater runat="server" id="repPersons">
  <ItemTemplate>
    <tr>
      <td><asp:Label runat="server" id="lName" /></td>
      <td><asp:Label runat="server" id="lAge" /></td>
    </tr>
  </ItemTemplate>
</asp:Repeater>
</table>

With the equivalent SASP code:

<table>
  <tr _id="trPersons" _repeater="person">
    <td>$person.Name</td>
    <td>$person.Age</td>
  </tr>
</table>

1.3 No inline code!

A SASP view can not contain any inline code, it can only contain control declarations, valid XML syntax and variable placeholders. There's a number of special SASP attributes that can be used to show/hide or alter the behavior and rendering of controls, but there's no flow control (if statement, while statement) that can be applied outside of a single element.

1.4 Getting started

To get started with SASP, the easiest thing to do is to download the source code from subversion (licensed under LGPL). The SASP library is a .NET 2.0 assembly. After checking out the repository, compile the SASP solution, configure the WebDemo? website and visit the Index.ashx page. Note that you probably have to specify the .ashx extension manually, otherwise your server will show you the unparsed .html file.

The simple demo site illustrates many of the core SASP features and should be plenty to get you started on site development while in-depth documentation and tutorials are lacking.

2. Configuration & conventions