The default set of templates that come with the Blue Ink Rapid Application Development Tool generate an n-tier, Microsoft .Net web application written in C#. This page describes the architecture of the generated application including architectural tiers, security, object oriented design, how it works with Microsoft Visual Studio, how it integrates with source control, and how it is loosely coupled to increase performance.
If after reading this you would like more details please check out our Live Demo, and the Code Samples page in particular.
Automated Architecture provides a default set of templates with Blue Ink that allow it to generate an n-tier .Net web application. The architecture of the generated application is based upon the best practices described in the documents: Application Architecture for .NET: Designing Applications and Services and Designing Data Tier Components and Passing Data Through Tiers. Specifically the architecture looks like the following:
Blue Ink generates the code for all tiers which are described briefly below.
Blue Ink generates stored procedures which compile in the database for faster performance and act as a second layer of security by disallowing the generated application to access database tables directly.
Blue Ink generates a data access tier to insulate the business objects tier from the specifics of a particular Database Management System (DBMS) and to provide a simplified method for accessing the database.
Blue Ink generates a business tier that is responsible for business rules (e.g. setting a last modified date), data consolidation (e.g. retrieving the products in a sale as well as customer and sale information for the sale view detail page, see loose coupling below), as well as advanced validation not available to the presentation tier (e.g. verifying a social security number doesn't already exist in the database before adding a new employee).
Blue Ink generates a service interface layer which enforces security through .Net's declarative security and ensures a stateless middle tier through static methods.
Blue Ink generates aspx and code behind pages for add, edit, search, and view detail pages that fully support one-to-many as well as many-to-many relationships.
Blue Ink generates web user controls for generically displaying views of data from different pages (e.g. view resulting employees on an employees search page or view all participating employees that participated in a sale on a view detail page for a sale).
Blue Ink generates strongly typed datasets for passing data between tiers. Typed datasets are used for parameters as well as results, for instance they are used as input for add and edit operations as well as results from view detail requests.
Blue Ink builds basic security mechanisms including authentication and authorization into its generated applications.
Authentication (confirming a user's identity) is done via .Net Forms Security and a generated Login.aspx page. Authentication information is sent to a business tier component that can easily be customized to authenticate against a data store such as a database or LDAP server and return authorization information.
Authorization (enforcing a user's permissions) is provided at both the presentation tier as well as the business tier. Read and write permission at the table level is enforced in generated .aspx pages and again through .Net's declarative security in the service interface layer. Implementing row level security (e.g. allowing managers, but not regular employees, to view a salary field), horizontal security (e.g. disallowing employees from viewing the records of other employees), as well as encryption and hashing are easy to implement and examples are included in the documentation.
Blue Ink takes advantage of .Net's object oriented features in order to keep Blue Ink from overwriting user code upon re-generation. For all .Net classes including code behind pages as well as middle tier classes, Blue Ink generates a base class and an inheriting class. Blue Ink overwrites the base class, which contains all generated functionality, upon every regeneration. The inherited class contains no functionality by default and is only generated once. A developer may override any base class functionality in the inheriting class, thus providing the developer the ability to modify any generated functionality without having code overwritten.
For .aspx files that do not support object oriented design, Blue Ink keeps track of their last modified date, and if they have changed since the last generation it prompts the user whether to overwrite or add the file to a "never overwrite list".
Upon first generation Blue Ink generates project (.csproj) as well as solution (.sln) files allowing developers to take full advantage of the benefits of Microsoft Visual Studio.
Blue Ink generated solutions integrate fully with source control applications such as Microsoft SourceSafe and the use of source control is recommended.
The applications generated by Blue Ink only ever make one call to the middle tier and only open one database connection for a given action. For instance the view detail page of a sale shows all products in the sale, sale details, employee information, and customer information, but only calls the middle tier once and only opens one connection. The result is an application that is optimized for throughput and speed (it makes a noticeable difference compared to applications that disregard how many database connections they use).
Copyright © 2021 Automated Architecture, Inc. All rights reserved.