Thursday, November 21, 2024    
Portuguese 
Spanish 
Skip Navigation Links
Home
My Account
Forum
Try It!
Buy It!
Skip Navigation Links
About
Contact Us
Site Map


Architecture Matters

Without proper architecture, an application relinquishes maintainability, flexibility, and scalability and becomes too rigid to survive. Even the original developers of the application have difficulty diagnosing problems or maintaining the code. The absence of a proper structure promotes monolithic code and forces the system to be designed on a per form basis. When the actual business logic and the data access are limited to the form, sound object oriented practices cannot be enforced and code is duplicated. If business rules change or the data access must be altered, every code repetition must be modified and retested.

An application must contain boundaries that separate the data access, business logic, and user interface into separate layers. Once separated, each layer can be easily centralized and reused rather than repeated. Using StrataFrame enables any developer to quickly and efficiently create an application that is properly divided into the layers of data access, business logic, and user interface.

Layers vs. Tiers

A tier is defined as an application module separated from other application modules by a process and/or network boundary while a layer is defined as a logical separation within a single tier. A one-tier model, such as Microsoft Access, has all layers running in a single process on a single computer. A two-tier model, such as Client/Server, has two separate tiers running on two separate computers. An application with more than two tiers can involve many processes and multiple computers. Adding tiers to an application can increase its complexity, decrease its maintainability, and cause performance issues due to the latency incurred when crossing a network and/or process boundary. Some applications, however, require additional tiers, beyond those of the client and server, due to high end scalability (>500 clients) and security requirements.

Regardless of the number of tiers used, a properly layered architecture is a must for any application. An architecture that divides the application into multiple layers promotes simplicity, scalability, maintainability, and code reuse. StrataFrame is a 3-layered Application Framework, and by using it, the advantages of a layered architecture are automatically reached with little to no intervention or design by the developer. Figure 1 depicts the application architecture that can be achieved by using StrataFrame.

Other Application Architectures

  • Fat-Client -- A Fat-Client application is one in which all data access and business logic is included in the forms of the application. Without centralization, the business logic and data access become rigid and cannot be modified quickly or easily by the developer. Since they are embedded within the forms, changing either will generally break the application. See figure 2 for an example of a Fat-Client application.

  • Fat-Server -- Fat-Server architecture has been created as a possible solution to the problems inherent with Fat-Client architecture. In a Fat-Server application, the business logic has been removed from the user interface and placed inside the database server. Using T-SQL stored procedures and triggers, all of the application logic is handled by the server tier rather than the client tier, centralizing the business logic and making it more readily extendable and maintainable (See figure 3).

    While solving some of the problems of Fat-Client architecture, a fat-server introduces new problems. The database server becomes a bottleneck for the application since the server is computing all of the business logic as well as hosting the database process. Additionally, T-SQL is not a strong-typed, high-level programming language and imposes many limitations upon the developer.

  • Client-Side / Server-Side -- Client-Side / Server-Side (CSSS) architecture is a combination of both Fat-Client and Fat-Server architectures (See figure 4). Generally, a CSSS application is the result of many years of extending and maintaining an application. The application was not designed with the proper architecture initially, and maintaining the code has required that business logic be placed in both the server and client tiers. CSSS architecture does not solve any of the limitations of Fat-Client or Fat-Server, but rather combines the limitations into one package.

Layered StrataFrame Applications

The client tier of a StrataFrame application is divided into three distinct layers:
  • Data Access Layer
  • Business Layer
  • Presentation layer
The application is easily maintained and extended as layers are loosely coupled to neighboring layers and changes to one layer will not affect other layers. If business logic must be changed, the developer must only modify the code in one place rather than visiting each form within the application to make the changes. (See figure 5)

In a StrataFrame application, a series of business objects houses the business logic for the application. Instances of these business objects are created to interface with the forms of the application. A single business object class can interface with unlimited forms, and a single form can interface with unlimited business objects. (See figure 6)

The work has been done for you

An application framework is, by definition, a library of classes that can be reused by any number of applications, saving time for developers, since they are not required to rewrite large amounts of code for each application.

StrataFrame is a 3-Layered Application Framework for use with any SQL, Oracle, or OLE database. All data access, non-custom data validation, and user interface binding is handled by the classes within the framework.

Besides achieving proper n-layered application architecture and its associated advantages, using StrataFrame gives developers the following benefits:
  • GREATLY reduced development time
    • StrataFrame’s class library handles all data access and data binding for the developer. The only thing the developer must code is the user interface layout, and custom business logic.
    • StrataFrame is tightly integrated with Visual Studio to provide quick methods of performing tasks such as setting required fields, altering business object properties, and maintaining business object mappings.
  • Application performance
    • Data access in StrataFrame is streamlined and efficient due to improvements in ADO.NET 2.0 and threaded data access (asynchronous processing).
  • Nominal learning curve
    • StrataFrame is written entirely for .NET and does not require the developer to learn any hybrid scripting language. All code can be written using standard .NET languages. i.e. VB.NET, C#, etc.
  • Full localization
    • StrataFrame provides full functionality for developers to localize labels, form titles, etc. through text stored in the SQL database or in an XML file.
    • User interface messages and error messages can also be localized using the same functionality.
  • Extensibility
    • While StrataFrame performs many common tasks for the developer, most, if not all, of these tasks can be modified by the developer to extend the scope of StrataFrame.
    • A full complement of hooks is provided, allowing developers to interface with events and dataflow sequences.
  • Ease of Use
    • Developers do not have to “program around” StrataFrame and are empowered rather than hindered. Unlike other application frameworks, StrataFrame does not step outside its boundaries and try to do “everything” for the developer.

Comparison: StrataFrame Application vs. Typical .NET Application

In a typical .NET application, a DbDataAdapter is “dropped” on a form using the form designer within Visual Studio. The DbDataAdapter must be manually configured before the developer can code a DbCommand or SELECT statement to retrieve a DataSet from the database. The DataSet must then be manually bound to the user interface, and any data validation and business logic must be coded within the form. To create an additional form, the same steps are repeated. Designing forms in this method directly follows a monolithic architecture and the limitations associated with a non-layered application. (See figure 7)

In a StrataFrame application, to create a form, one or more business objects are “dropped” onto the form using the form designer within Visual Studio. The developer can then bind the form’s controls to the business object(s) and the form is complete. The business objects do not need to be configured, and data access is granted through the business objects’ coupling to the Data Layer. All data validation and business logic is housed within the business object (mapped to a database table). The form demonstrates an n-layered application that reuses business objects rather than forcing each object to be re-programmed or modified. (See figure 8)

StrataFrame Application Types

  • Layered WinForms Applications
  • Layered WebForms Applications
  • n-Tiered Applications using StrataFrame’s Data and Business Layers to provide data access and business logic to a web services or SOAP middle tier.
A class library of business objects created in StrataFrame can be used by one or more of the given application types (i.e. the same business objects can be used for all application types)

Summary

  • Short Version -- Develop quality code faster than ever before while reducing development cost!
  • Long Version –- Many books and articles have been written on the theory of layered and tiered frameworks but precious few developers actually produce a working model. If you are interested in creating applications with the best framework computer science can currently offer: StrataFrame is your answer. It is easy to use and will not get in your way. Additionally, source code is available if you want to take a closer look or add an event, method, or hook.

    The decision is not whether to buy StrataFrame – but whether you will take advantage of this truly innovative, well designed, and exciting product.

    Remember Einstein’s definition of insanity is when you continue to repeat over and over the same practice, hoping to get different results.



Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.