0% found this document useful (0 votes)
57 views19 pages

AMP Software Frameworks 01

The document provides an overview of software frameworks, including their history and evolution. It discusses how frameworks emerged to simplify complex software development methodologies and provide standardized, reusable structures. The document then defines frameworks, describes common features like inversion of control and extensibility, and provides examples of different types of frameworks like OO frameworks, ORB frameworks, and Java RMI. It also discusses when frameworks are appropriate to use and factors to consider when choosing a framework.

Uploaded by

Sayani Pal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views19 pages

AMP Software Frameworks 01

The document provides an overview of software frameworks, including their history and evolution. It discusses how frameworks emerged to simplify complex software development methodologies and provide standardized, reusable structures. The document then defines frameworks, describes common features like inversion of control and extensibility, and provides examples of different types of frameworks like OO frameworks, ORB frameworks, and Java RMI. It also discusses when frameworks are appropriate to use and factors to consider when choosing a framework.

Uploaded by

Sayani Pal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

1

Introduction to Software Frameworks


History & Definition

History & Evolution


Computing technology came into existence with development of hardware The computer hardware was initially used to automate some of the routine tasks in technical environments The hardware multiplied the processing speeds of this tasks to a level which was impossible to match by humans However as more and more tasks like collecting data, some scheduling routines started getting assigned to hardware, a need to put in some logic became evident The scientists and mathematicians then started new development in this era

History & Evolution contd


The early software engineering practices came into existence by following the lead of the classical engineering approaches to solving any problem As software engineering started growing, a need for abstraction became evident making software engineering a more complex process However the demand for the logic or software far outpaced the supply leading to multitudes of software developing methodologies coming into existence The multitudes of methodologies lead to a lot of confusion, and also made it difficult to select one particular methodology for a problem at hand

History & Evolution contd


Each of the methodology also presented its own unique issues, hence the need to simplify was felt ENTER the software development frameworks The early days frameworks were developed to wrap-up the methodologies and give a more generic understanding of system design issues A framework generally provides a skeletal abstraction of a solution to a number of problems that have some similarities

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

Features of a software framework


Inversion of control The framework completely controls the flow of the programs (Dont call meI will call you) Default behavior - A framework has a default behavior. This default behavior must actually be some useful behavior Extensibility - Through selective overriding or specialized user code, a framework can be extended to achieve specific function Non-modifiable framework code - The framework code is rigid and modification is not allowed in it. It can be extended but not modified

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

DDE (Dynamic Data Exchange)


DDE is a method of inter-process communication which allows one program to communicate with or control another program. E.g. a cell in Microsoft Excel could be linked to a value in another application, so that when the value in the original program changes the cell in excel gets updated automatically A common usage of DDE is in custom-developed applications to control off-the-shelf application. E.g. a custom developed accounting application might use DDE to open an Excel spreadsheet and fill it with data without leaving the parent application.

12

OLE Object Linking & Embedding


OLE is designed to link to files created by other programs and allow you to edit the object using its native program without leaving the host program E.g. You can insert an OLE object of a certain type in your Microsoft Word document. This object gets edited using the native program without leaving your word environment However, IF you send this word document to someone else and that computer doesnt have the native program needed to edit this OLE object, then an error will get thrown on opening the word document.

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

A typical route of a RMI call is -

Client

Stub

Network

Skeleton

Server

16

When to use a framework


If the application being built is primarily based on CRUD operations If we need to provide proper separation of UI and underlying logic but dont have time to implement a custom built system If your current software has custom libraries for user authentication, session managements and other common aspects

Using a framework in this situation saves a lot of complexity, development time and maintenance headache

17

How to choose a framework


Licensing requirements what distribution license does the framework provide? What is the cost of licensing including the plug-ins or extensions that one is likely to use Software Pattern needed What software pattern is your application going to need? Is it MVC (Model-View-Controller), MVP (Model-View-Presenter), MVA (Model-View-Adapter) OR AVC (Application-View-Controller)? Hosting requirements dedicated or shared hosting? The available budget and type of usage of a software impacts this decision Ease of installation

18

How to choose a framework contd


Learning Curve how easy or difficult is the framework to learn? Core Library does the core library provide robust support for avoiding boilerplate code like logging, db calls, caching etc Unit Testing How easy is it to write testable code with the given framework? This becomes critical for writing good, robust software applications Documentation How well explained and detailed is the framework documentation? This has a direct impact on developer efficiency Developer community support more active the developer community, more easy it is to use the framework

19

The popular frameworks of our times


PHP
CakePHP
CodeIgniter The Zend Framework Ruby
Ruby On Rails
Nitro Camping

Java
Spring framework Google Web Toolkit Apache Cocoon

Python
Gluon Django Turbogears

C#
The .net Framework MonoRail

Client side frameworks


JavaScript JQuery

You might also like