JavaBeans Flashcards
What is component software?
Component software is software that is designed to work as a component of a larger application. Think of the way PCs are built: memory chips, CPUs, keyboards, etc.
Why does component software work?
The interfaces between software components are standardized, so they work together seamlessly.
How do components communicate with one another?
Through interfaces. The component offers services to the rest of the system. a provided interface specifies the services that other components can utilize, and how they can do so.
Are components encapsulated? Why?
Yes. Other components do not need to know how the services are implemented, they just need to work.
Describe the principle of substitutability with respect to component software.
A component should be able to replace another component if the successor component meets the requirements of the initial component (expressed via interfaces). This allows us to use updated versions or an alternative without breaking the system.
Name two techniques for employing a component across network links
- serialization
2. marshalling
Compare and contrast object oriented programming and component-based software engineering.
OOP believes software should be modeled after the conceptual way we think about objects in the world and how they behave (mammal, dog, barks, etc).
Component-based software states that developers should construct software by gluing together prefabricated components– modularizing systems.
Where is a discussion about component programming more relevant, java beans or enterprise java bean? Why?
Enterprise Java Bean (EJB). EJBs are distributed components. JavaBeans are local program components, usually GUI.
What is the point of a JavaBean?
The primary intent of the JaveBean is to support visual application development environments (though the patterns defined by the javabean spec are applicable to class libraries in general).
By default, many java classes are beans simply because they follow javabean method-naming and event-handling conventions.
What is a javabean usually?
A javabean is usually simply a class that subclasses java.awt.Component and implements object serialization eo externalization.
the javabean follows a standard set of method-naming conventions that allow application builder tools to automatically detect the properties, actions, and events support by a javabean through introspection.
What is the purpose of an Enterprise Java Bean?
The purpose of an EJB is to isolate business logic and data access in server-side components.
They can also be accessed in visual development tools to link events (perhaps originating from a client javabean).
JavaBean can be read as a synonym for what?
component
also, it’s pretty much just a java object. :/
Where do javabeans typically run, client side or server side?
usually client.
Enterprise java bean is typically for client or server side?
server side
Which kind of classes is a javabeans component?
every java user interface class is a javabeans component
what will learning javabeans help you do?
create custom events
develop your own source components that can fire events
What are the minimum java bean requirements?
- A bean must be a public class
- A bean must have a no-arg constructor (though it can have others too)
- A bean must implement the java.io.Serializable interface
A javabean component is a special kind of java class. Sum it up in a sentence.
A javabean component is a serializable public class with a public no-arg constructor.
Describe property naming patterns for javabeans
The javabean, like all classes, can have properties. Primitive type or an object type. The property type dictates the signature of the accessor and mutator methods.
public String getMessage()
public boolean isCentered()
what do properties describe in the bean?
properties describe the state of the bean
data fields are used to store properties. how do they work in beans?
a bean property is not necessarily a data field.