Hlavní menu

Nástroje

UvodDoKomponent / KomponentTutorialTeorie1

View (print) - Edit page | Recent changes - Page history

Updated 17 December 2009, 15:00 by PremekBrada

UvodDoKomponent.KomponentTutorialTeorie1 History

Hide minor edits - Show changes to markup

17 December 2009, 15:00 by PremekBrada -
Changed lines 1-10 from:

This tutorial was writen to aid your start with component software. It does not provide complete description of component world, but it provides basic pointers for your further study of software components. In the first part I describe the basic concepts which can be found in every component system. In next three parts (2, 3, 4) you can find practical tutorials with components technologies. The last part concludes knowledge gained during practical examples a discusses what software component really is.

    * Part 1: General Terms
    * Part 2: OSGi example
    * Part 3: Spring IoC Beans
    * Part 4: OSGi and Spring hand in hand -- SpringDM
    * Part 5: Conclusion & Discusion

TeorieIntroParagraph

to:
17 December 2009, 15:00 by PremekBrada -
Added lines 9-10:
16 December 2009, 10:24 by Snajberk -
Changed lines 1-3 from:

This tutorial was writen to aid your start with component software. It does not provide complete description of component world, but it provides basic pointers for your further study of software components. In the first part I describe the basic concepts which can be found in every component system. In next three parts (2, 3, 4) you can find practical tutorials with components technologies. The last part concludes knowledge gained during practical examples a discusses what software component really is.

    * Part 1: General Terms
to:

This tutorial was writen to aid your start with component software. It does not provide complete description of component world, but it provides basic pointers for your further study of software components. In the first part I describe the basic concepts which can be found in every component system. In next three parts (2, 3, 4) you can find practical tutorials with components technologies. The last part concludes knowledge gained during practical examples a discusses what software component really is.

    * Part 1: General Terms
16 December 2009, 10:16 by Snajberk -
Changed lines 9-10 from:

Motivation !!

to:

Motivation

Changed lines 13-14 from:

Basic terms !!

to:

Basic terms

Changed lines 19-20 from:

Component !!!

to:

Component

Changed lines 29-30 from:

=== Component Interface ===

to:

Component Interface

Changed lines 33-34 from:

=== Component Model ===

to:

Component Model

Changed lines 37-38 from:

=== Component Framework ===

to:

Component Framework

Changed lines 41-42 from:

== Component Development Process ==

to:

Component Development Process

Changed lines 45-46 from:

=== Design Stage ===

to:

Design Stage

Changed lines 53-54 from:

=== Development Stage ===

to:

Development Stage

Changed lines 57-58 from:

=== Assembly Stage ===

to:

Assembly Stage

Changed lines 65-66 from:

=== Deployment Stage ===

to:

Deployment Stage

Changed lines 69-72 from:

== Important Principles ==

=== Isolation of Components ===

to:

Important Principles

Isolation of Components

Changed lines 75-76 from:

=== IoC ===

to:
Changed lines 79-80 from:

== Let's Practice ==

to:

Let's Practice

16 December 2009, 10:15 by Snajberk -
Changed lines 13-14 from:

== Basic terms ==

to:

Basic terms !!

Changed lines 19-20 from:

=== Component ===

to:

Component !!!

16 December 2009, 10:14 by Snajberk -
Changed lines 9-10 from:

== Motivation ==

to:

Motivation !!

16 December 2009, 10:14 by Snajberk -
Changed lines 14-15 from:

[http://www.bauml.cz/content/bachmann00.png]

to:

http://www.bauml.cz/content/bachmann00.png

16 December 2009, 10:12 by Snajberk -
Changed lines 1-2 from:

This tutorial was writen to aid your start with component software. It does not provide complete description of component world, but it provides basic pointers for your further study of software components. In the first part I describe the basic concepts which can be found in every component system. In next three parts ([KomponentTutorialTeorie2| 2], [KomponentTutorialTeorie3|3], [KomponentTutorialTeorie4|4]) you can find practical tutorials with components technologies. The [KomponentTutorialTeorie5|last part] concludes knowledge gained during practical examples a discusses what software component really is.

to:

This tutorial was writen to aid your start with component software. It does not provide complete description of component world, but it provides basic pointers for your further study of software components. In the first part I describe the basic concepts which can be found in every component system. In next three parts (2, 3, 4) you can find practical tutorials with components technologies. The last part concludes knowledge gained during practical examples a discusses what software component really is.

Changed lines 16-17 from:

Imagination of basic terms. From [http://www.sei.cmu.edu/publications/documents/00.reports/00tr008.html | Bachman00]

to:

Imagination of basic terms. From Bachman00

Changed line 80 from:

Now it is right time to start to practice with [KomponentTutorialTeorie2|next part].

to:

Now it is right time to start to practice with next part.

16 December 2009, 10:12 by Snajberk -
Changed lines 4-8 from:
    * [KomponentTutorialTeorie2|Part 2: OSGi example]
    * [KomponentTutorialTeorie3|Part 3: Spring IoC Beans]
    * [KomponentTutorialTeorie4|Part 4: OSGi and Spring hand in hand -- SpringDM]
    * [KomponentTutorialTeorie5|Part 5: Conclusion & Discusion]
to:
16 December 2009, 10:10 by Snajberk -
Added lines 1-80:

This tutorial was writen to aid your start with component software. It does not provide complete description of component world, but it provides basic pointers for your further study of software components. In the first part I describe the basic concepts which can be found in every component system. In next three parts ([KomponentTutorialTeorie2| 2], [KomponentTutorialTeorie3|3], [KomponentTutorialTeorie4|4]) you can find practical tutorials with components technologies. The [KomponentTutorialTeorie5|last part] concludes knowledge gained during practical examples a discusses what software component really is.

    * Part 1: General Terms
    * [KomponentTutorialTeorie2|Part 2: OSGi example]
    * [KomponentTutorialTeorie3|Part 3: Spring IoC Beans]
    * [KomponentTutorialTeorie4|Part 4: OSGi and Spring hand in hand -- SpringDM]
    * [KomponentTutorialTeorie5|Part 5: Conclusion & Discusion]

== Motivation ==

In the last ten years, software components gained a significant role in the software development process. Although several different specifications (usually referred to as component models) of what a software component actually is were introduced, the basic idea behind the scene is more or less the same. The main idea of the component-oriented approach is splitting the code of an application into several, well-formed pieces (usually called components), with well-defined functionality (usually called specification) and with unified access points (usually called interfaces). These terms are fundamental and we will describe them deeply in the next subsection.

== Basic terms == [http://www.bauml.cz/content/bachmann00.png]

Imagination of basic terms. From [http://www.sei.cmu.edu/publications/documents/00.reports/00tr008.html | Bachman00]

=== Component ===

An individual component is software package or module, that encapsulates a set of related functions. Each component has its own interface, which is visible for surrounding world. Everything, what is not part of interface (objects, functions and data used for implementation) should be hidden. We call this principle the black-box model. Although black-box model of components is only ideal pattern, which is unreachable in the real world, this term is widely used. Definition of software component is not stable, but this general compliance exists:

Software component is:

    * an opaque implementation of functionality
    * third-party composition
    * conformant with a component model

=== Component Interface ===

Component interface is part (layer) of component, which is visible from other world. It describes, what component can and what it needs for. Interface can be described either by programming language or by IDL -- Interface definition language. On the basis of interfaces of two components deployed in one environment, a contract can be established.

=== Component Model ===

A component model is the set of component types, their interfaces, and, additionally, a specification of the allowable patterns of interaction among component types.

=== Component Framework ===

Component framework is an implementation of a component model. One framework is able to implement more models than only one. A component framework provides a variety of runtime services to support and enforce the component model(s). In many respects component frameworks are like special-purpose operating systems, although they operate at much higher levels of abstraction.

== Component Development Process ==

In the traditional component-oriented development process, as it is usually described, we can identify multiple distinct stages on the path from an idea to a running application. Depending on a concrete component model, some of these stages can be more or less extensive or missing.

=== Design Stage ===

At first, in the design stage, the application is split into multiple components with well-described functionality in order to decrease the complexity. For each component, there are defined services that component provides and it will require from the surrounding environment.

This approach is repeated recursively, until the designed components are either simple and therefore can be easily implemented using a programming language (primitive components), or are already existing elsewhere and therefore can be reused. The design usually made in a Unified Modeling Language (UML) tool. Based on the created model, the component description is written. For this purpose, a variety of different description languages are used. The most of them are mutations or extensions of the Interface Description Language (IDL).

Using the description languages, interfaces are defined as sets of callable methods with parameters. Some of the description languages can also be used to define properties, constants, structures, and exceptions. The Component Description Language (CDL) can furthermore define frames and architectures. A frame is a group of multiple interfaces, where each of them is used either as a provision or as a requirement. An architecture is a "gray-box description of a component", declaring either the fact that the component is primitive or defining how the component is composed of subcomponents at the first level, considering the subcomponents only as frames.

=== Development Stage ===

The second stage is the development stage. In this stage, source codes for the primitive components are developed. Most of the component models can generate some source code from the component description to start-up with, either in the form of base classes that may be subclassed, or the a form of classes with empty method bodies. The compiled source code, along with a description file, constitutes a primitive component.

=== Assembly Stage ===

In the assembly stage, the primitive and the reused components are assembled into an assembly tree. The root of the tree represents the entire component (application), while the children of each node represent subcomponents of a composed component represented by the parent node. The leaves of the tree represent either primitive components or existing components that are reused.

The information that can be represented by the inner leaves is how to interconnect the interfaces of the component with the interfaces of the subcomponents. Depending on the component model, this information is created during the development stage using an architecture element, or it is created during the assembly stage.

Also, the property values can be set during this stage to provide the component with default configuration data. The information created during the assembly stage has a form of an XML file, called the assembly descriptor.

=== Deployment Stage ===

The last stage on the way to a running application is the deployment stage. In this stage, the configuration values in the assembly descriptor are customized according to the individual needs and the deployments units are configured. A deployment unit is a set of components with the same value of the location parameter, defining a reference to a server where the component will be run. The information entered during the assembly stage is again written in a form of an XML file, called the deployment descriptor.

== Important Principles ==

=== Isolation of Components ===

The basic principle of CBSE is Isolation of components, it should be also named as black-box model. Implementation of component is hidden behind its interface. There is no possibility to call a functionality not present in interface.

=== IoC ===

Inversion of Control is the most typical design pattern for component systems. The basic concept of the IoC (sometimes also known as dependecy injection) is that you do not create your objects but you specify what kind of objects are you handling and somebody else will create this objects for you.

== Let's Practice ==

Now it is right time to start to practice with [KomponentTutorialTeorie2|next part].