AMP Software Frameworks 01
AMP Software Frameworks 01
What is a framework?
Classic definition Framework is set of reusable software program that forms the basis for an application A Software Framework in computer system is a layered structure that indicates what kind of program should be built and how they would interrelate to one another
In computer system, a framework is a conceptual structure that sometime includes actual programs, which specify programming interface or offer programming tools for using the frameworks
Like software libraries, frameworks are reusable abstractions of code within a well-defined API, but distinctive feature separate them from libraries or normal user applications
Advantages of a framework
The biggest advantage of the software framework is that it reduces the time and energy in developing any software e.g. Spring takes away the headache of managing dependencies by implementing DI (Dependency Injection through Autowiring beans) Frameworks provides a standard working system through which user can develop the desired module of application or complete application instead of developing lower level details e.g. Hibernate, takes away the pain of writing JDBC calls from the developer and allows him/her to focus and think of objects Using frameworks, the developers can devote more time in developing the software requirement, not in preparing the environment and tools of application development
Disadvantages of a framework
The learning curve - for the novice developer, it is tougher to use the framework quickly as it is complex, abstract. Developer has to spend more time in assessing the concept, function and its uses in developing the program, which would ultimately enhance development efficiency
A generic one-size-fits-all does not work so efficiently for any specific software. Eventually developers end up extending a framework to suit their specific needs
Framework examples
OO Frameworks MFC (Microsoft Foundation Classes)
An object-oriented program may be viewed as a collection of cooperating objects, as opposed to the conventional model, in which a program is seen as a list of tasks (subroutines) to perform. In OOP, each object is capable of receiving messages, processing data, and sending messages to other objects, and can be viewed as an independent 'machine' with a distinct role or responsibility.
The Microsoft Foundation Class Library (also Microsoft Foundation Classes or MFC) is a library that wraps portions of the Windows API in C++ classes, including functionality that enables them to use a default application framework. Classes are defined for many of the handle-managed Windows objects and also for predefined Windows and common controls
10
Framework examples
ORB (Object Request Broker) Frameworks CORBA
Common Object Request Broker Architecture (CORBA) is a standard framework that allows software objects to communicate with each other no matter where they reside OR in what language they are written. They can be on one computer or on different computers connected by a network. The CORBA architecture looks like this Client
Dynamic Invocation
Static
Invocation
ORB Object Adapter Dynamic Static Skeleton Skeleton Implementation
11
12
A developer needs to understand that when you create an OLE object from an existing file, you are inserting a copy and its not linked to the original file like DDE. So any changes made here wont update the original file
13
COM
COM (Component Object Model) technology in the Microsoft Windows-family of Operating Systems enables software components to communicate COM is used by developers to create re-usable software components, link components together to build applications, and take advantage of Windows services COM allows reuse of objects with no knowledge of their internal implementation, as it forces component implementers to provide well-defined interfaces that are separated from the implementation COM objects can be created with a variety of programming languages. COM is used in applications such as the Microsoft Office Family of products. For example COM OLE technology allows Word documents to dynamically link to data in Excel spreadsheets and COM Automation allows users to build scripts in their applications to perform repetitive tasks or control one application from another.
14
DCOM
Distributed Component Object Model is a proprietary Microsoft technology for communication among software components distributed across networked computers. DCOM, which originally was called "Network OLE", extends Microsoft's COM, and provides the communication substrate under Microsoft's COM+ application server infrastructure. The addition of the "D" to COM was due to extensive use of DCE/RPC (Distributed Computing Environment/Remote Procedure Calls) more specifically Microsoft's enhanced version, known as MSRPC. In terms of the extensions it added to COM, DCOM had to solve the problems of
Marshalling serializing and de-serializing the arguments and return values of method calls "over the wire". Distributed garbage collection ensuring that references held by clients of interfaces are released when, for example, the client process crashed, or the network connection was lost. Aggregating hundreds or potentially tens of thousands of references to objects held by clients of interfaces at a single host, into a single "ping" function, in order to minimize bandwidth utilization.
15
Java RMI
Remote Method Invocation - is a mechanism that allows one to invoke a method on an object that exists in another address space. The other address space could be on the same machine or a different one. The RMI mechanism is basically an object-oriented RPC mechanism
Client
Stub
Network
Skeleton
Server
16
Using a framework in this situation saves a lot of complexity, development time and maintenance headache
17
18
19
Java
Spring framework Google Web Toolkit Apache Cocoon
Python
Gluon Django Turbogears
C#
The .net Framework MonoRail