0
2.3kviews
What is Framework? Give its types. What are design patterns?

Mumbai University > Computer engineering > Sem 7 > Software Architecture.

Marks: 10 M

Year: Dec 14

1 Answer
0
12views
  • An architectural implementation framework is a piece of software that acts as a bridge between a particular architectural style and a set of implementation technologies. It provides key elements of the architectural styles in code, in a way that assists developers in implementing systems that conform to the prescriptions and constraints of the style.
  • Architectural implementation frameworks are a form of middleware. The difference between traditional middleware and architectural framework is the focus on architectural styles. Implementation frameworks are implemented specifically to support development in one or more architectural styles. Here the style is the primary artifact driving the implementation technology. Middleware is created based on services that are provided, generally without regard to the style of the application being developed.

Pipe and Filter style

  • Components (filters) organized linearly, communicate through character-stream ‘pipes,’ which are the connectors
  • Filters may run concurrently on partial data
  • In general, all input comes in through the left and all output exits from the right

There are two frameworks for this style-

The Standard I/O framework:

Standard I/O (stdio) framework used in C programming language. Each process is a filter where it reads input from standard input (stdin) and writes output to standard output (stdout).Low and high level operations like getchar(…), putchar(…) which move one character at a time and printf(…) and scanf(…) which move and format entire strings are available.

Features:

  1. Platform support:- Available with most, if not all, implementations of C programming language Operates somewhat differently on OS’s with no concurrency (e.g., MS-DOS)

  2. Fidelity:- Good support for developing P&F applications, but no restriction that apps have to use this style

  3. Matching assumptions:- Filters are processes and pipes are implicit. In-process pipe & filter applications might require modifications

  4. Efficiency:- Whether filters make maximal use of concurrency is partially up to filter implementations and partially up to the OS

The java.io Framework:

Standard I/O framework used in Java language. It is Object-oriented and can be used for in-process or inter-process pipe&filter applications. All stream classes derive from InputStream or OutputStream. Distinguished objects (System.in and System.out) for writing to process’ standard streams are available. Additional capabilities (formatting, buffering) are provided by creating composite streams (e.g., a Formatting-Buffered-InputStream).

Features:

  1. Platform support:- Available with all Java implementations on many platforms Platform-specific differences abstracted away

  2. Fidelity:- Good support for developing P&F applications, but no restriction that apps have to use this style

  3. Matching assumptions:- Easy to construct intra- and inter-process P&F applications Concurrency can be an issue; many calls are blocking

  4. Efficiency:- Users have fine-grained control over, e.g., buffering Very high efficiency mechanisms (memory mapped I/O, channels) not available (but are in java.nio)

C2 architectural style

  • Layered style with event-based communication over two-way broadcast buses
  • Strict rules on concurrency, dependencies, and so on
  • Many frameworks developed for different languages; focus on two alternative Java frameworks here

There are two frameworks for this style-

The Lightweight C2 framework:

The first C2 framework implemented in java is known as the lightweight C2 framework. It is implemented in only 16 classes, 3000 lines of code. To develop an application using this framework, developers create component and connector implementations as sub classes of the component or Connector abstract base classes. The component and connector classes communicate with each other using messages which are instances of Request and Notification classes.

Features:

  1. Platform support:- Available with all Java implementations on many platforms

  2. Fidelity:- Assists developers with many aspects of C2 but does not enforce these constraints Leaves threading and queuing policies up to individual elements

  3. Matching assumptions:- Component/connector main classes must inherit from distinguished base classes All messages must be in dictionary form

  4. Efficiency:- Lightweight framework; efficiency may depend on threading and queuing policy implemented by individual elements

The Flexible C2 framework:

It incorporates more aspects of the architectural style directly into the framework. It is implemented in 73 classes, 8500 lines of code. It uses interfaces rather than base classes. Threading policy and message queuing for application is pluggable.

Features:

  1. Platform support:- Available with all Java implementations on many platforms

  2. Fidelity:- Assists developers with many aspects of C2 but does not enforce these constraints Provides several alternative application-wide threading and queuing policies

  3. Matching assumptions:- Component/connector main classes must implement distinguished interfaces Messages can be any serializable object

  4. Efficiency:- User can easily swap out and tune threading and queuing policies without disturbing remainder of application code

Please log in to add an answer.