Search This Blog

Sunday, March 7, 2010

Software Engineering

  SOFTWARE COMPONENTS
• Component-based software engineering (CBSE) (also known as Component-Based  Development (CBD) or Software Componentry) is a branch of the software engineering discipline, with emphasis on  decomposition of the engineered systems into functional  or logical components with well-defined interfaces used for communication across the components. Components  are considered to be a higher level of abstraction than objects and as such they do not share state and communicate by exchanging messages carrying data.

OBJECTS
• In its simplest embodiment, an object is an allocated region of storage. Since programming languages use variables to access objects, the terms object and variable are often used nterchangeably. However, until memory is allocated, an object does not exist.
• In procedural programming, an object may contain data or instructions, but not both. (Instructions may take the form of a procedure or function.) In object-oriented programming, an object is an instance (or instantiation) of a class. The class object contains a combination of data and the instructions that operate on that data, making the object capable of receiving messages, processing data,
  and sending messages to other objects.
• To give a real world analogy, if a person wanted to live in a house, neither a blueprint for a house, a photo of it, nor a scale model would be of any use. What is needed is a real house constructed according to specifications. In this analogy, the blueprint represents a class, and the real house represents the object.
FEATURES OF COMPONENT  TECHNOLOGY






                  MODULE
• A Module is a self-contained component of a
  system, which has a well-defined interface to the
  other components; something is modular if it
  includes or uses modules which can be
  interchanged as units without disassembly of the
  module. Design, manufacture, repair, etc. of the
  modules may be complex, but this is not
  relevant; once the module exists, it can easily be
  connected to or disconnected from the system
                     INTERFACES
• An interface defines the communication boundary between two
  entities, such as a piece of software, a hardware device, or a user. It
  generally refers to an abstraction that an entity provides of itself to
  the outside. This separates the methods of external communication
  from internal operation, and allows it to be internally modified without
  affecting the way outside entities interact with it, as well as provide
  multiple abstractions of itself. It may also provide a means of
  translation between entities which do not speak the same language,
  such as between a human and a computer. Because interfaces are
  a form of indirection, some additional overhead is incurred versus
  direct communication.
• The interface between a human and a computer is called a user
  interface. Interfaces between hardware components are physical
  interfaces. This article deals with software interfaces which exist
  between separate software components and provide a
  programmatic mechanism by which these components can
  communicate.

                       INTERFACES
  The types of access that interfaces provide between software components
  can include: constants, data types, types of procedures, exception

  specifications and method signatures. In some instances, it may be useful
  to define variables as part of the interface. It often also specifies the
  functionality of those procedures and methods, either by comments or (in
  some experimental languages) by formal logical assertions.
  The interface of a software module A is deliberately kept separate from the
  implementation of that module. The latter contains the actual code of the

  procedures and methods described in the interface, as well as other
  "private" variables, procedures, etc.. Any other software module B (which
  can be referred to as a client to A) that interacts with A is forced to do so
  only through the interface. One practical advantage of this arrangement is
  that replacing the implementation of A by another one that meets the same
  specifications of the interface should not cause B to fail — as long as its use
  of A complies with the specifications of the interface (See also Liskov
  substitution principle).
                      CALLBACKS
• In computer programming, a callback is executable code that is
  passed as an argument to other code. It allows a lower-level
  software layer to call a subroutine (or function) defined in a higher-
  level layer.
• Usually, the higher-level code starts by calling a function within the
  lower-level code, passing to it a pointer or handle to another
  function. While the lower-level function executes, it may call the
  passed-in function any number of times to perform some subtask. In
  another scenario, the lower-level function registers the passed-in
  function as a handler that is to be called asynchronously by the
  lower-level at a later time in reaction to something.
• A callback can be used as a simpler alternative to polymorphism
  and generic programming, in that the exact behavior of a function
  can be dynamically determined by passing different (yet compatible)
  function pointers or handles to the lower-level function. This can be
  a very powerful technique for code reuse.
          DIRECTORY SERVICES
  Before defining what is a directory service one must understand what is meant by a directory.
  Fundamentally, a directory is like a dictionary; it allows one to look up a name and retrieve items

  of information associated with that name. Just like a word in a dictionary may have multiple
  definitions, multiple different pieces of information may be associated with a given name. And just
  like a word may have different parts of speech, with different definitions associated, a name in a
  directory may also have many different types of data.
  Unlike a typical dictionary, the names in a directory are organized in a hierarchical tree, and each
  node in the tree represents a valid name that may have its own set of associated data. (In fact, a

  dictionary is just a degenerate case of a directory, where the hierarchy is only one level deep.)
  Directories may be very narrow in scope, supporting only a small set of node types and data
  types, or they may be very broad, supporting an arbitrary or extensible set of types. E.g., in a

  dictionary, all of the nodes are words. In a telephone directory, all of the nodes are names and the
  data items are mainly just telephone numbers. Those are two very simple examples of directories.
  In the DNS all of the nodes are domain names or internet addresses. DNS uses a slightly more
  complex directory, with hierarchical names, but the set of types used in DNS is not easily
  extensible. In the directory used by a network operating system, the nodes represent resources
  that are managed by the OS, including users, computers, printers and other shared resources,
  etc.
  A directory service is simply the software system that stores and organizes information in a
  directory, and provides access to that information. Many different directory services have been

  used since the advent of the Internet. The discussion here focuses mainly on the X.500 directory
  service.
  COMPONENT ARCHITECTURE
• Service Component Architecture (SCA)
  is a relatively new initiative advocated by
  major software vendors. Its proponents
  claim it is more natively suited for the
  delivery of applications that conform with
  the principles of service-oriented
  architecture. As such, SCA components
  are supposedly more technologically
  agnostic.
  Service Component Architecture
  Service Component Architecture (SCA) is a set of specifications which
  describe a model for building applications and systems using a Service-

  Oriented Architecture. SCA extends and complements prior approaches to
  implementing services, and SCA builds on open standards such as Web
  services.
  SCA encourages an SOA organization of business application code based
  on components that implement business logic, which offer their capabilities

  through service-oriented interfaces and which consume functions offered by
  other components through service-oriented interfaces, called service
  references. SCA divides up the steps in building a service-oriented
  application into two major parts:
  The implementation of servicecomponents which provide services and
  consume other services.

  The assembly of sets of components to build business applications,
  through the wiring of service references to services.

  SCA emphasizes the decoupling of service implementation and of service
  assembly from the details of infrastructure capabilities and from the details

  of the access methods used to invoke services. SCA components operate
  at a business level and use a minimum of middleware APIs.
Service Component Architecture







                 COMPONENTS AND
                         MIDDLEWARE
  A middleware component is a software that connects two otherwise separate
  applications. For example, there are a number of middleware products that link a

  database system to a Web server. This allows users to request data from the
  database using forms displayed on a Web browser, and it enables the Web server to
  return dynamic Web pages based on the user's requests and profile.
  The term middleware is used to describe separate products that serve as the glue
  between two applications. It is, therefore, distinct from import and export features that

  may be built into one of the applications. Middleware is sometimes called plumbing
  because it connects two sides of an application and passes data between them.
  There is a low probability that middleware components are used in the CyberVote
  components mainly because the number of exchanges between the server and the

  client should be limited for efficacy and security matters. But nevertheless we
  selected some technologies according to the following criteria:
  - Portability,

  - Platform independence,

  - Wide use,
•  Database independence.


JAVA BASED COMPONENT  TECHNOLOGIES

THREADS

*  A thread in computer science is short for a thread of execution. Threads are a way for a program to fork (or split) itself into two or more simultaneously (or pseudo- simultaneously) running tasks. Threads and processes differ from one operating system to another but, in general, a thread is contained inside a process and different threads in the same process share some resources while different processes do not.

* On a single processor, Multithreading generally occurs by time-division multiplexing ("time slicing") in very much the same way as the parallel execution of multiple tasks (computer multitasking): the processor switches between different threads. This  context switching can happen so fast as to give the illusion of simultaneity to an end user. On a multiprocessor or multi-core system, threading can be achieved via multiprocessing, wherein different threads and processes can run literally simultaneously on different processors or cores.
* Many modern operating systems directly support both time-sliced and multiprocessor threading with a process scheduler. The operating system kernel allows programmers to manipulate threads via the system call interface. Some implementations are called a kernel thread, whereas a lightweight process (LWP) is a specific type of kernel thread that shares the same state and information.
* Absent that, programs can still implement threading by using timers, signals, or other methods to interrupt their own execution and hence perform a sort of ad hoc time- slicing. These are sometimes called user-space threads.

 Java Beans
• JavaBeans are reusable software components for Java that can be manipulated visually in a builder tool.Practically, they are classes written in the Java programming language conforming to a particular convention. They are used to encapsulate many objects into a single object (the bean), so that they can be passed around  as a single bean object instead of as multiple individual objects.


EVENTS AND CONNECTIONS
• In computer programming, event-driven programming or event-  based programming is a programming paradigm in which the flow of the program is determined by sensor outputs or user actions (mouse clicks, key presses) or messages from other programs.
• Event-driven programming can also be defined as an application architecture technique in which the application has a main loop which is clearly divided down to two sections: the first is event selection (or event detection), and the second is event handling. In embedded systems the same may be achieved using interrupts instead of a constantly running main loop; in that case the former portion of the architecture resides completely in hardware.
• Event-driven programs can be written in any language, although the task is easier in languages that provide high-level abstractions to support it. Some integrated development environments provide code generation assistants that automate the most repetitive tasks required for event handling
INTROSPECTION
• In computing, type introspection is a capability of some object-oriented  programming languages to determine the type of an object at runtime. This is a notable capability of the Objective-C language, and is a common feature in any
language that allows object classes to be manipulated as first-class objects by the programmer. Type introspection can be used to implement polymorphism.
 
 JAR FILES

• A JAR file (or Java ARchive) is used for aggregating many files into one. It is generally used to distribute Java classes and associated metadata.
• WAR (Web Application aRchive) files are also Java archives which store XML files, Java classes, JavaServer Pages and other objects for Web Applications.
• RAR (Resource Adapter aRchive) files, not to be confused with the RAR file format, are also Java archives which store XML files, Java classes and other objects for J2EE Connector Architecture (JCA) applications.
• EAR (Enterprise ARchive) files are composite Java archives which combine XML files, Java classes and other objects including JAR,WAR and RAR Java archive files for Enterprise Applications.
• jar cf archive_name.jar files Let's look at each part of that command line.
• jar The command to run the jar utility.
• CF Create a new archive with the file name specified. These two options are from this list of common options:
• - c create new archive
  - t list table of contents for archive
  - x extract named (or all) files from archive
  - u update existing archive
  - v generate verbose output on standard output
  - f specify archive file name
  - m include manifest information from specified manifest file
  - 0 store only; use no ZIP compression
  - M do not create a manifest file for the entries
  - i generate index information for the specified jar files
  - C change to the specified directory and include the following file
REFLECTION
• reflection is the process by which a computer program can observe and modify its own structure and behavior.The programming paradigm driven by reflection is called reflective programming.
• At the lowest level, machine code can be treated reflectively because the distinction between instruction and data becomes just a matter of how the information is treated by the computer. Normally, 'instructions' are 'executed' and 'data' is 'processed', however, the program can also treat instructions as data and therefore make reflective modifications. Reflection is most common in high-level virtual machine programming languages like Smalltalk, and less common in lower-level programming languages like C.
OBJECT SERIALIZATION
• serialization is the process of saving an object onto a storage medium (such as a file, or a memory buffer) or to transmit it across a network connection link in binary form. The series of bytes or the format can be used to re-create an object that is identical in its internal state to the original object (actually, a clone).
• This process of serializing an object is also called deflating or marshalling an object. The opposite operation, extracting a data structure from a series of bytes, is deserialization (which is also called inflating or unmarshalling).
ENTERPRISE JAVA BEANS
• serialization is the process of saving an object onto a storage medium (such as a file, or a memory buffer) or to transmit it across a network connection link in binary form. The series of bytes or the format can be used to re-create an object that is identical in its internal state to the original object (actually, a clone).
• This process of serializing an object is also called deflating or marshalling an object. The opposite operation, extracting a data structure from a series of bytes, is deserialization (which is also called inflating or unmarshalling).

  The EJB specification intends to provide a standard way to implement the back-end 'business' code typically found in enterprise applications (as opposed to 'front-end'
• user-interface code). Such code was frequently found to reproduce the same types of problems, and it was found that solutions to these problems are often repeatedly re-implemented by programmers. Enterprise Java Beans were intended to handle such common concerns as persistence, transactional integrity, and security in a standard way, leaving programmers free to concentrate on the particular problem at hand.
  Accordingly, the EJB specification details how an application server provides: 
 
  - Persistence

  - Transaction processing

  - Concurrency control

  - Events using Java Message Service

  - Java Naming and directory services (JNDI)

  - Security ( Java Cryptography Extension (JCE) and JAAS )

  - Deployment of software components in an application server

 -  Remote procedure calls using RMI-IIOP.

  - Exposing business methods as Web Services.
 




























































































































































































No comments:

Post a Comment