Hi,
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?
My ideas:
- It is a C# Library (DLL)
- It needs to use XSLT as templating language, so XML must be the output of my data-/model-layer
- It needs to connect to different databases, like MySQL en SQL Server and ODBC
- 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'
- All commands and database actions from 1 post need to be in 1 transaction, so everything can be rolled back
- It needs to have a security/authorisation model (what is good?)
- It needs to have some kind of URL resolving, like /a/b/c resolves to /?id=33
- 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
- It needs to have caching and/or compression techniques inside
- It needs to be fast and threadsafe and performing
- It needs to have debug-logging
- 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.
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#?
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:
Customer.ACTION = add
Customer.Name = "John Smith"
Customer.Email = "[email protected]"
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 = "[email protected]"
Mail.Subject = "Welcome"
Mail.Body = "Welcome new customer!"
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#).
So what are your ideas about this project?
Regards