Professional Documents
Culture Documents
Types of Applications: 1. Standalone Application: Advantages: Disadvantages
Types of Applications: 1. Standalone Application: Advantages: Disadvantages
1. Standalone application:
software installed in one computer and used by only one person.
For ex – Installing s/w of a Calculator, Adobe Photoshop, MS Office, AutoCAD.
Advantages:
Faster in access.
Secured from Data hacking and virus.
Disadvantages:
Single user access at a time.
Installation is required.
End user system resources utilized.
No data sharing
Maintenance is tough with respect to both user and company
Architecture:
In the stand-alone application architecture, there is no question of any servers and entire
application is installed at the end user machine.
Web based application consists of Web server, Application server and Database server.
Web server contains all the pages like images, static HTML files, JS etc
Application server contains the entire business logic written in Programs like Java and has
been uploaded in jars, ears, wars etc.
Database server Contains entire data stored in the form of tables.
Advantages of Web based applications:
1. Faster in access if the bandwidth is high
2. security from data hacking and virus
3. maintenance is easy
4. Multiple users can access the application
5. No installation is required
6. end user’s resources are not utilized
Disadvantages of Web based applications:
1. If the server goes down no one can access the application.
4. Cloud based application:
A cloud application simply refers to any software application that is deployed in a cloud
environment rather than being hosted on a local server or machine.
Advantages of Cloud based applications:
1. Cost reduction
2. reliability
3. management is easy
Disadvantages of Cloud based applications:
1. downtime
2. security
3. control
*** Coupling refers to the degree of direct knowledge that one element has of
another.
Tight coupling: In general, Tight coupling means the two classes often
change together. In other words, if A knows more than it should about the
way in which B was implemented, then A and B are tightly coupled.
Loose coupling: In simple words, loose coupling means they are mostly
independent. If the only knowledge that class A has about class B, is what
class B has exposed through its interface, then class A and class B are said
to be loosely coupled.
DESIGN PATTERNS
What are they?
A design pattern provides a general reusable solution for the common problems
that occur in software design. The pattern typically shows relationships and
interactions between classes or objects. The idea is to speed up the development
process by providing well tested, proven development/design paradigms. Design
patterns are programming language independent strategies for solving a common
problem. That means a design pattern represents an idea, not a particular
implementation. By using design patterns, you can make your code more flexible,
reusable, and maintainable.
It’s not mandatory to always implement design patterns in your project. Design
patterns are not meant for project development. Design patterns are meant for
common problem-solving.
What is their use? / Why do we need them? / Advantages
The code we write today could be irrelevant tomorrow. And so that code should
be flexible enough so that it's not too costly to alter. Design Patterns are best
practices to cover such attribute. They are proven solutions, easily reusable,
flexible, expressive and also prevent the need for refactoring the code.
Types
1. Creational
These design patterns are all about class instantiation or object creation,
trying to create objects in a manner suitable to the situation. The basic form
of object creation could result in design problems or added complexity to the
design. Creational design patterns solve this problem by somehow
controlling this object creation.
These patterns can be further categorized into Class-creational patterns and
object-creational patterns. While class-creation patterns use inheritance
effectively in the instantiation process, object-creation patterns use
delegation effectively to get the job done.
Creational design patterns are the Factory Method, Abstract Factory,
Builder, Singleton, Object Pool, and Prototype.
Abstract Factory
Creates an instance of several families of classes
Let’s you produce families of related objects without specifying their concrete
classes.
Builder
Separates object construction from its representation
Let’s you construct complex objects step by step. The pattern allows you to produce
different types and representations of an object using the same construction code.
Factory Method
Creates an instance of several derived classes
Provides an interface for creating objects in a superclass, but allows subclasses to
alter the type of objects that will be created.
Object Pool
Avoid expensive acquisition and release of resources by recycling objects that are no
longer in use
Prototype
A fully initialized instance to be copied or cloned
Let’s you copy existing objects without making your code dependent on their classes.
Singleton
A class of which only a single instance can exist
Let’s you ensure that a class has only one instance, while providing a global access
point to this instance.
2. Structural
These design patterns are about organizing different classes and objects to
form larger structures and provide new functionality.
Structural design patterns are Adapter, Bridge, Composite, Decorator,
Facade, Flyweight, Private Class Data, and Proxy.
Structural patterns explain how to assemble objects and classes into larger
structures while keeping these structures flexible and efficient.
Adapter
Match interfaces of different classes
Allows objects with incompatible interfaces to collaborate.
Bridge
Separates an object's interface from its implementation
Let’s you split a large class or a set of closely related classes into two separate
hierarchies—abstraction and implementation—which can be developed
independently of each other.
Composite
A tree structure of simple and composite objects
Let’s you compose objects into tree structures and then work with these structures as
if they were individual objects.
Decorator
Add responsibilities to objects dynamically
Let’s you attach new behaviours to objects by placing these objects inside special
wrapper objects that contain the behaviours.
Facade
A single class that represents an entire subsystem
Provides a simplified interface to a library, a framework, or any other complex set of
classes.
Flyweight
A fine-grained instance used for efficient sharing
Let’s you fit more objects into the available amount of RAM by sharing common parts
of state between multiple objects instead of keeping all of the data in each object.
Private Class Data
Restricts accessor/mutator access
Proxy
An object representing another object
Let’s you provide a substitute or placeholder for another object. A proxy controls
access to the original object, allowing you to perform something either before or after
the request gets through to the original object.
3. Behavioural
Behavioural patterns are about identifying common communication patterns
between objects and realizing these patterns.
Behavioural patterns are Chain of responsibility, Command, Interpreter,
Iterator, Mediator, Memento, Null Object, Observer, State, Strategy,
Template method, Visitor