title: Develop a web application framework in C#
body: <p>I'm planning to develop my own simple and elegant web application framework in C# 3.5. I have some ideas, but not yet the best practice how it should be implemented. Maybe you can help?</p>
  
  <p>My ideas:</p>
  
  <ul>
  <li>It is a C# Library (DLL)</li>
  <li>It needs to use XSLT as templating language, so XML must be the output of my data-/model-layer</li>
  <li>It needs to connect to different databases, like MySQL en SQL Server and ODBC</li>
  <li>It needst to be command base, like the Command Design Pattern, so I can post a command with some parameters grouped to that command and do 'stuff'</li>
  <li>All commands and database actions from 1 post need to be in 1 transaction, so everything can be rolled back</li>
  <li>It needs to have a security/authorisation model (what is good?)</li>
  <li>It needs to have some kind of URL resolving, like /a/b/c resolves to /?id=33</li>
  <li>It needs to be pluggable, so when I'm creating a web-app for someone with specific needs, I don't need to alter my base Engine Library</li>
  <li>It needs to have caching and/or compression techniques inside</li>
  <li>It needs to be fast and threadsafe and performing</li>
  <li>It needs to have debug-logging</li>
  <li>It would be nice to have some kind of dynamic scripting, like IronPython, implemented into the data-/model-layer for dynamically scripting my output to the XSLT, so adjustments can be made quickly, without entering Visual Studio and adjusting my DLL.</li>
  </ul>
  
  <p>Would you have ideas what is the best way to start setting up such a framework? Or is there already a framework like this in C#?</p>
  
  <p>This is one small idea, when you have the tables 'Customer' and 'Address', and you want to post a html-form for adding a record into the database and mail him, you need to post these fields in 1 postaction:</p>
  
  <pre><code>Customer.ACTION = add
  Customer.Name = "John Smith"
  Customer.Email = "john.smith@emailaddress.com"
  
  Address.ACTION = add
  Address.CustomerId = #Customer.ResultId#
  Address.Street = "Mainstreet"
  Address.Number = "1"
  
  Mail.ACTION = send
  Mail.AFTER = Customer
  Mail.To = #Customer.Email#
  Mail.From = "test@case.com"
  Mail.Subject = "Welcome"
  Mail.Body = "Welcome new customer!"
  </code></pre>
  
  <p>The engine receives the post, and by Reflection it collect the class for the command it needs, in this case the DatabaseCommand and MailCommand and runs it. You see, I want to use some kind of queuing with sorting. In this case the Customer-command needs to be the first, after that the Mail (see the Mail.AFTER) and/or the Address (see the dependency #Customer.ResultId#).</p>
  
  <p>So what are your ideas about this project?</p>
  
  <p>Regards</p>