SubSonic is an excellent open source DAL generation tool developed by Rob Conery that has been around for almost a year. In most cases SubSonic can just be added to your project, pointed to a databse, and you magically and immediately gain access to a rich and strongly typed object model that can be used to query and persist data to and from your relational data source.
SubSonic also has a cool feature called the REST handler that essentially allows one to use HTTP protocol as an interface to data stored in a back-end relational database. It is URI based and returns data back in XML format. This data can then be used by decoupled client applications as they see fit. If you have never looked at SubSonic, you owe it to yourself to checkout this very cool tool.
Recently Microsoft unveiled their plans to release similar features codenamed Astoria and Jasper with .NET framework 3.5 and Visual Studio 2008. The CTP of Astoria and Jasper are available for download from Microsoft.
Jasper is described by Microsoft as:
Project Jasper is geared towards iterative and agile development. You can
start interacting with the data in your database without having to create
mapping files or define classes. You can build user interfaces by naming
controls according to your model without worrying about binding code. Project
Jasper is also extensible, allowing you to provide your own business logic and
class model. Since Project Jasper is built on top of the ADO.NET Entity
Framework, it supports rich queries and complex mapping.
Pablo Castro, the mastermind behind Astoria describes it as:
The goal of Microsoft Codename Astoria is to enable applications to expose data as a data service that can be consumed by web clients within a corporate network and across the internet. The data service is reachable over HTTP, and URIs are used to identify the various pieces of information available through the service. Interactions with the data service happens in terms of HTTP verbs such as GET, POST, PUT and DELETE, and the data exchanged in those interactions is represented in simple formats such as XML and JSON.
The Astoria web site also includes sample online services that showcases how this new technology can be used. It also allows anyone with a Passport account to design and host their own experimental data services .
A coworker introduced me to Anthem.NET, which is an AJAX library for the ASP.NET platform. Within the last year or so, quite a few AJAX libraries have surfaced, including Microsoft’s ASP.NET AJAX (formerly known as ATLAS), and other free and commercial products. Some of these are pretty decent, while others are not even worth investigating. Anthem.NET, with it’s impressive functionality, belongs to the former group.
Some of the features of Anthem.NET include:
- Free and open source
- Support for .NET 1.x and 2.0
- Seamless integration with Visual Studio 2005
- Broad browser support (IE, Firefox, and Safari)
- Support for Mono
- Familiar ASP.NET postback style functionality
- Support for ASP.NET ViewState
- Support for web user controls
You can download Anthem.NET from SourceForge.
Microsoft screwed up royally in Visual Studio 2005 when it comes to deployment of web projects. It seems like they initially assumed that everyone would use web site publishing feature for deployments, but that certainly is not the case. Later they came up with the Visual Studio 2005 Web Deployment Projects (WDP) add-in hoping to rectify their oversight, but WDP is nothing more than a lame bandage over a broken bone. The departure of project files from ASP.NET projects serves as an icing on the cake! And what exactly were they thinking when they decided that web projects can’t have any more than two build configurations (Debug and Release)?
While I really like .NET 2.0 and Visual Studio 2005, I just can’t come to peace with the fact they did not think through deployment features of ASP.NET projects.
I recently designed an intranet application using ASP.NET 2.0 and really loved the membership and role providers that tremendously simplifified our implementation of security features in the application. Membership and role information can be stored in a SQL Server database or another repository such as Active Directory. For our intranet application it made sense to use Active Directory as the membership provider and SQL Server as the role provider.
Configuring Role and Membership Providers:
Essentially everything is configured declaritively using Web.config:
In the above configuration file, note that we first specify our connection strings starting at line 2. LocalSqlServer points to a SQL Server database which has been configured using aspnet_regsql. The second connection string points to the domain controller for membership authentication.
In the authentication section we specify that we are using forms authentication, and provide the URL for our logon page.
In the roleManager section we configure our role provider, pointing back to LocalSqlServer as the role repository.
In the membership section we configure our membership provider pointing back to ADConnectionString (domain controller) specified in the connectionStrings section.
Finally we restrict users from accessing certain folders based on their roles using location sections (role-based security).