Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to business component technologies. Component definitions Szyperski: A software component is a unit of composition with contractually specified.

Similar presentations


Presentation on theme: "Introduction to business component technologies. Component definitions Szyperski: A software component is a unit of composition with contractually specified."— Presentation transcript:

1 Introduction to business component technologies

2 Component definitions Szyperski: A software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties D'Souza and Wills: A software component is a coherent package of software artefacts that can be independently developed and delivered as a unit and that can be composed, unchanged, with other components to build something larger UML v2.4: A component represents a modular part of a system that encapsulates its contents and whose manifestation is replaceable within its environment More definitions: http://en.wikipedia.org/wiki/Software_componentry Business components2

3 Context dependencies Component may require security, transaction, logging and other middleware services provided by component container (aka component framework) Component may require other components to be made available (required interface) Business components3

4 Problem with these definitions Definitions above are correct, but they do not stress differences between a component and a class: public class Component implements Interface {... } Business components4

5 Essential characteristics of a component Component Oriented Development in OSGi with Declarative Services, Spring Dynamic Modules and Apache iPOJO, Neil Bartlett, Heiko Seeberger, 2009 May provide services to other components and use services from other components Have a life cycle Active participants in the system They need middleware services, such as transactions, security, logging, etc. Characteristic of future component technologies: Aware of and adapt to their environment Business components5

6 Old analogy Component Oriented Development in OSGi with Declarative Services, Spring Dynamic Modules and Apache iPOJO, Neil Bartlett, Heiko Seeberger, 2009 inactive do not provide/use services no life-cycle do not adopt to environment Business components6

7 New analogy Component Oriented Development in OSGi with Declarative Services, Spring Dynamic Modules and Apache iPOJO, Neil Bartlett, Heiko Seeberger, 2009 Business components7

8 How to distinguish a component from a class? Components cannot live without special environment called container container instantiates components and controls their life- cycle container (not programmer!) binds components together (required interfaces with provided interfaces) container provides services to components Instances of a component are created by container, never by programmer itself (operator new is prohibited) Conversely, instances of classes are created by programmer using operator new. Later we will look at components in more details (slides about modules and components) Business components8

9 Distributed Object Technology – fundamentals for component technologies Business components9

10 Concepts: business logic and middleware Business logic models real life business objects (such as accounts, loan, and inventories) prescribes how business objects interact with one another enforces the routes and the methods by which business objects are accessed and updated is part of functional requirements creates essential added value that client is willing to pay for. Middleware - software that provides services to applications beyond those available from the operating system For example: transactions, logging, security, messaging, etc. if is mentioned in requirements document then only as part of non-functional requirements; often is assumed as matter-of-course and not documented at all. Business components10

11 Explicit middleware Money transfer between two accounts: void transfer(Account account1, Account account2, long amount) { 1: Perform a security check 2: Create audit log record 3: Start a transaction 4: Load data from the database 5: account1 -= amount; account2 += amount; 6: Store updated data to the database 7: Commit the transaction } Business logic is intertwined with the logic to call middleware services Lowers developer productivity, difficult to write and maintain. Business components11

12 Implicit middleware Programmer writes only business logic: void transfer(Account account1, Account account2, long amount){ account1 -= amount; account2 += amount; } If middleware services are needed, we declare that, for example, in: XML file, annotations. Middleware services are called by component container with the help of request interceptor. Business components12

13 Business components13

14 Main Conclusions Component-based technologies enable us to separate business logic from middleware services Provide means to apply Separation-of-Concerns principle in practiceSeparation-of-Concerns Client never communicates with component instance directly – there always will be intermediary (request interceptor, proxy, etc.) Sometimes even more than one intermediary Business components14

15 Modern business component technologies Enterprise JavaBeans (EJB) https://java.net/projects/ejb-spec/ OSGi Enterprise http://www.osgi.org/download/r5/osgi.enterprise- 5.0.0.pdf http://www.osgi.org/download/r5/osgi.enterprise- 5.0.0.pdf CORBA Component Model (CCM) http://www.omg.org/spec/CCM/ Microsoft Application Platform Book: Microsoft Application Architecture Guide, 2nd Edition Component Guidelines Designing Business Components Business components15


Download ppt "Introduction to business component technologies. Component definitions Szyperski: A software component is a unit of composition with contractually specified."

Similar presentations


Ads by Google