Docsity

Frameworks - Advanced Software Paradigms - Paper | CSCI 210, Papers of Computer Science

Toggle sidebar
bg1
Frameworks
ª
ª
Objectives:
• A framework is not a library
• Components in a library have little, if any,
interaction with each other (e.g., string, file, date,
list).
• Each component can be independently added to
an application.
• Building complex applications from scratch is
very expensive.
ª
ª
Frameworks
• There are no hard and fast rules as to what
constitutes a framework. In general, it should
provide the skeleton of an application.
• A framework is a partially complete (sub-)system
that is intended to be instantiated.
• It defines the architecture for a family of
(sub-)systems and provides the basic building
blocks to create them.
• It also defines the places where adaptations for
specific functionality should be made.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Frameworks - Advanced Software Paradigms - Paper | CSCI 210 and more Papers Computer Science in PDF only on Docsity!

Frameworks

ªª Objectives:

  • A framework is not a library
  • Components in a library have little, if any, interaction with each other (e.g., string, file, date, list).
  • Each component can be independently added to an application.
  • Building complex applications from scratch is very expensive.

ªª Frameworks

  • There are no hard and fast rules as to what constitutes a framework. In general, it should provide the skeleton of an application.
  • A framework is a partially complete (sub-)system that is intended to be instantiated.
  • It defines the architecture for a family of (sub-)systems and provides the basic building blocks to create them.
  • It also defines the places where adaptations for specific functionality should be made.
  • In an object-oriented environment a framework consists of abstract and concrete classes.

ª Classification:

  • There are two categories of frameworks:

9 Horizontal 9 Vertical

  • Horizontal framework:

9 It is a more general framework and can be applied in several applications. 9 Horizontal frameworks provide the most flexibility. 9 Example: GUI toolkits, Master/detail coordination.

  • Vertical framework:

9 It a more specific framework. 9 It can only be applied to a specific application domain. 9 Example: o If you need to build an inventory control system, you might find that a precooked inventory framework is a good way to jump- start your development effort.

  • Horizontal framework:

Portion of Application

Generality

Portion of Framework used

  • Vertical Framework:

Portion of Application

Generality

Portion of Framework used

View Link Defines the relationship between two view objects. Application Module

Provides a logical container for view objects, view links, and transactions.

ªª Validation framework

  • BC4J also provides a framework for defining, implementing, and executing validation logic in middle-tier components.
  • It provides a consistent programming model that hides internal implementation details.
  • It frees you to focus on rules that prevent users from entering invalid values into the database.

ªª A BC4J system

  • An XML file, and possibly one or more JAVA files, represents each BC4J.
  • The XML file stores metadata while the Java file stores the object's code that implements application- specific behavior.
  • Each object is organized into a package using the directory-based semantics of packages in Java.
  • The following figure shows the relationship between different components in the BC4J framework at the runtime.

ªª Entity Objects

  • An entity object provides an object representation of the data it caches from a row in a database table.
  • Each database table is represented as an individual entity object, with the table's columns corresponding to entity object attributes.
  • You can also base entity objects on views, snapshots, or synonyms.
  • An entity object encapsulates the business logic and database storage details of your business entities.
  • You can reuse the business logic that you define in the entity object across clients.
  • Entity objects are not directly exposed to the client tier. Instead, clients access data through view objects.
  • Clients use view objects to get and set attribute values.
  • The following figure shows a view object named EmpNames. EmpNames operates on the Emp entity object to provide a view of the EMPNO and ENAME columns of the EMP table.

ªª Associations and Links

  • Entity objects represent tables, and an association defines a relationship between two entity objects. Similarly, view objects represent views of tables. A view link defines a relationship between two view objects.

One difference between associations and links is that associations are bi-directional; whereas, links are navigable

ªª Application Modules

  • An application module is a logical container for coordinated objects related to a particular task, with optional programming logic.
  • Application modules provide a simple runtime data connection model, one connection per application module. It also provides a context for defining and executing transactions.
  • The framework provides an AppRegistry class that clients can use to manage and share a pool of application modules.
  • It contains the following functionality: ƒ Define a database session and a transaction boundary. ƒ Control concurrent access to data. ƒ Group related view objects into a data model that clients can access in a single network round-trip. ƒ Store application-specific Java code in an object on the middle-tier. ƒ Create read-only view objects from Structured Query Language (SQL) statements and clauses.

ªª Defining Validation Rules

  • Business components provide a framework for defining, implementing, and executing validation logic in middle-tier components.