Tuesday, March 19, 2024    
Portuguese 
Spanish 
Skip Navigation Links
Home
My Account
Forum
Try It!
Buy It!
Skip Navigation Links
About
Contact Us
Site Map
Skip Navigation LinksHome > Application Framework > Business Layer

The business layer is the nucleus of any application created with StrataFrame. It houses all business logic and provides the coupling between the data access and the user interface. Special attention was given to the business layer to ensure it could be easily bound to controls and provide straightforward programmatic access.

Strong-Typed Business Object Properties
View Larger Image
Overview

The middle layer of an application created using StrataFrame consists of one or more business objects that inherit from the abstract BusinessLayer class. This class provides base functionality for all tasks, including business object population, business rules handling, validation, data retrieval, and data navigation.

Program in Preferred .NET Language
StrataFrame has no proprietary or scripting languages that must be learned. All logic can be completely coded in any managed .NET language, including VB.NET and C#. This increases the speed of development and allows business logic to be reusable.




Strong-Typed Business Objects

Strong-Typed Business Object Properties
View Larger Image
Represents Data Structure

StrataFrame provides the ability to strong-type the business object column properties easily and quickly using the Business Object Mapper. Properties are created on each business object and reflect the actual data columns of the represented structure.

Improved Code Reliability & Intellisense
Since the field properties are strong-typed, code reliability improves. The foremost reason for this is that almost all data type mismatches can be resolved at compile-time rather than emerging at run-time. Using a strong typed field in a manner inconsistent with its data type will produce a compiler error, while using a weak typed field in the same scenario will not.

Extended Strong-Typed Business Object Properties
View Larger Image
Extended Strong-Typing

There are many instances in which a column in a database represents a type other than what is stored as raw data. For example, a column in a table may be typed as INT, but when the developer interacts with the field property on the business object, he or she needs the ability to have it typed as an enumeration and to have the value automatically persisted back to the database as INT. In another example, a data column may be typed as VARBINARY or IMAGE but actually represent a bitmap or serialized object; StrataFrame allows the field property on the business object to be strong typed as the serialized object type and will automatically serialize and deserialize the data to and from the database without writing a single line of code.

Advanced Native Support

The business layer of StrataFrame contains features that alleviate many of the mundane tasks that normally plague application development. These features allow the developer to focus on the specifics of the application rather than investing time in the creation and maintenance of baseline functionality.

Compound Primary Key Support
StrataFrame natively supports compound primary keys within table structures. This support is extended to all navigation and query methods within a business object and is ready for use out-of-the-box.

Auto-Bound Error Provider
View Larger Image
Auto-Bound Error Provider

A .NET ErrorProvider is utilized to display errors and broken business rules to the end-user. The implementation of the error provider requires no code from the developer and its appearance can be extensively customized through properties including the ability to disable the error provider completely.

Full Parent-Child Relationship Management
Relationships are configured on a per-class basis for business objects within a StrataFrame application's business layer. Once configured, the BusinessLayer class will automatically manage the primary key/foreign key relationship; new child rows will be assigned the foreign key value of the primary key from the corresponding business object. When new records are saved, the primary key value the database server assigns is propagated through the relationships to the child business objects. The management of the relationship is also used to ensure new parent records are saved before the corresponding child records are saved.

Field Initialization and Priority Control
By default, all fields on a new record are initialized by data type to prevent any run-time DBNull errors. This feature can be disabled by setting a single property. Additionally, all business objects can be given an initialization priority which allows the developer to control the order in which objects on a form are initialized.

Patterned but Simplified

The BusinessLayer class follows best the practices for object-oriented programming and utilizes many established design patterns. Only a single class is created for each business object in a StrataFrame application. By inheriting from the BusinessLayer base class, business objects enjoy all of the necessary functionality mentioned in the overview. This tightly integrated and cohesive single-class design is of high significance to the developer because it greatly improves the simplicity of the application when compared to the 5 to 7 classes per business object typically required by other commercial framework options.

Optimized for Performance

The business layer has been optimized to deliver a high level of performance for the application developer. A DataTable, rather than a DataSet, is used within the business object in order to reduce the memory footprint of each instance of a business object. Custom data navigation has been implemented to allow the developer to iterate through the records within a business object (sorted or unsorted, filtered or unfiltered) more rapidly than iterating through the entities within a custom entity collection.

Simple Required Field Business Logic
View Larger Image
Centralized Location for Business Logic

All business logic is housed within its corresponding business object class. Additional classes are not required for business rules, data validation, default values, etc. Required fields are implemented by the BusinessLayer base class and do not necessitate any code from the developer. This centralization simplifies the developer's coding process and improves performance by keeping class instantiations and server round trips (to check server-side logic) to a minimum.

Simple Required Field Implementation
Though the required field logic can be manually programmed, StrataFrame provides a quick and easy way to specify fields that require entry by simply clicking a check box. Every business object contains a collection aptly named RequiredFields. Through the component designer within Visual Studio, the fields that require entry can be set using the integrated type editor.

Integrated Localization Support
All areas of StrataFrame are localizable, including the business logic. Instead of hard-coding broken rule messages within the code, they can be pulled from a localization database through the extensive Messaging and Localization support.

Customizable and Extendable

In concert with the other elements of the StrataFrame Application Framework, the business layer is designed to empower developers, not limit them. The BusinessLayer class provides a great deal of flexibility and functionality that can be overridden or modified. Moreover, strategic properties are exposed, which enables the developer to toggle much of the automation within the business objects. Field properties created by the Business Object Mapper can be customized or replaced by custom code that the developer provides.

Boundless Programmatic Access

Whether used programmatically or configured for data-binding to controls, StrataFrame business objects are designed for ease-of-use. With the strong typed fields on a business object, all of the field properties are available within the Intellisense supplied by the code editor within Visual Studio. You will never need to look at a reference chart to check the names of your fields again. Programmatic access is further enhanced by the base class methods that can be used to seek, filter, navigate, iterate, or sort records within the business object.

Event Driven Hooks
Many event driven hooks are intrisically provided to give the developer complete control when interacting with the business objects. There are a wide range of events that exist providing the developer with complete control. This methodology allows a much more precise interaction with the environment and prevents the need for method overrides. The hooks include such events as before, after, security, state change, error, concurrency, data change notifications, new record default value initialization, and more.

Extensive Navigation Methods
Changing the CurrentRow of the businesss object is made easy through functionality provided by the BusinessLayer base class. When invoked the data navigation methods will modify the CurrentRowIndex and change the row accessed by the actual strong-typed field properties. Support for ADO Style, FoxPro, and UI Bound navigation exists with such methods as: MoveFirst(), MoveNext(), MovePrevious(), MoveLast(), MoveAbsolute(), Seek(), SeekToPrimaryKey(), Navigate(), and NavigateToPrimaryKey().

Sorting and Filtering
The data within the business object can be sorted or filtered easily by the developer. Optionally, the current filter can be propagated to child business objects.

Exposed ADO.NET Components
Though StrataFrame manages all of the necessary tasks required for robust application development there are times when direct access is required by a developer. When such situations arise, the ADO.NET components are directly accessible through exposed properties on the busines objects. This includes properties such as: CurrentDataTable, CurrentView, CurrentRow, and CurrentRowIndex.

Broken Rules Collection
When the need arises to direclty interact with the broken rules, a collection exists on all business objects that allow the developer to manipulate and display the broken rules as desired.

Grid and Third Party Binding Support
All business object have the ability to natively support grids through the exposed ADO.NET properties. Grid support provides native event interaction allowing the developer to monitor the navigation events without adding any code. Also, most any third party control can easily interface to the business through binding support options made available in StrataFrame.

XML Data Source Support
At times, it is necessary to use an XML file as a data store. When this need arises, a business object can be strong typed and read from and write to an XML file. Additionally, this XML file can be dynamically encrypted and decrypted by calling a single method.

Business Object Serialization
Business objects have complete serialization support. This allows a business object to be save and restored to disk in its complete state. Moreover, a business object can be serialized to and from a stream allowing a business object to be handed out from a single location passed through a network connection. This provides support for enterprise services, remoting, and web services.

Technical Specifications

expand all
Programmatic Access
Strong Typed
Data Navigation
Sorting & Filtering
Exposed ADO.NET Components
Event Driven Hooks
Business Object Mapper
Properties Automatically Created and Maintained
Custom Data Types
Object Serialization
No UML or XSD
expand all
Business Logic
All Business Rules Checked in a Single Event
Simple Required Fields Implementation
Broken Rules Collection
Auto-Bound Error Provider
Program in Preferred .NET Language
No Server-Side Code for Business Rules
Additional Features
Data Access through DataAccessLayer Class
Relationship Management
Force Save of Parent If Child is Saved First
ChildAutoFilter
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.