COMPONENTS – WHY? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require understanding of the implementation. Building the system from source-level pieces requires certain things to be re-done, such as re-compilation in a potentially new environment. We want to avoid the above problems and build binary components with well-defined interfaces.
COMPONENT – WHAT? Component technologies can be seen as packaging technologies Independent Can be used as a building block to build larger systems – dynamic, ”plug & play” linking Has a well-defined interface, which hides the implementation completely Can be treated as a product of its own Can be installed separately Can be implemented with any language, as long as it implements the necessary interfaces
COMPONENT – INTERFACES An interfaces defines a set of services, which semantically belong together. An interface is a contract between the user and the implementor. A componenent may implement many interfaces and an interface may be implemented by many components. Once an interface is released, it does not change. If changes are necessary, a new interface is released.
COMPONENT TECHNOLOGIES Microsoft COM & DCOM (distributed COM) CORBA standard several vendors heavyweight system Java Beans
3-TIER ARCHITECTURE User interface tier ------------------------- Business object tier ------------------------- Data server tier
USER INTERFACE TIER Typically just runs the user interface on a client computer E.g. a web browser May load the actual user interface (e.g. a browser may load an applet) over the Internet – no need to install the client on all client computers. In a typical system there may be a large number of concurrent users running their own copy of the client.
DATA SERVER TIER Typically runs a database. Typically only runs a database: answers database queries but does not run application programs. Since data replication creates distributed database management problems, there typically is no replication, and one database is run on only one data server.
BUSINESS OBJECT TIER Executes business application components. If performance needs to be improved, more business object servers should be added. One business object may server many clients (and access different data servers with different databases). The business objects can be stateless, ie. they do not store the state of the client process, but recover from, say, database, when the client contacts it – scaling up is easier this way. The business objects can also be state-maintaining, in which case they maintain client process state information.