100% found this document useful (1 vote)
94 views5 pages

Module 03 Integrative Coding: Background

This document discusses integrative coding and programming design patterns. It covers three main topics: design patterns and their organization into creational, structural, and behavioral groups; application programming interfaces and examples; and inheritance, including different types and using abstract classes. Version control is also introduced as enabling simultaneous work on projects through editing personal copies and committing changes to shared repositories. References include books, journals, online reading materials, and instructional videos.

Uploaded by

Randy Tabaog
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
100% found this document useful (1 vote)
94 views5 pages

Module 03 Integrative Coding: Background

This document discusses integrative coding and programming design patterns. It covers three main topics: design patterns and their organization into creational, structural, and behavioral groups; application programming interfaces and examples; and inheritance, including different types and using abstract classes. Version control is also introduced as enabling simultaneous work on projects through editing personal copies and committing changes to shared repositories. References include books, journals, online reading materials, and instructional videos.

Uploaded by

Randy Tabaog
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 5

Integrative Programming and Technologies 1

1
Integrative Coding

Module 03 Integrative Coding

Course Learning Outcomes:


1. Compare programming design patterns and the IT services needed to
integrate applications.
2. Recognize different types of architectures for integrating systems.
3. Distinguish data representation and exchange techniques and their
appropriate use.

Background
Designing reusable object-oriented software that models an existing system is genuinely
challenging. A software developer must factor the system's entities into classes whose public
interfaces aren't overly complex, establish relationships among classes, expose inheritance
hierarchies, and more. Because most software remains in use long after it was written, software
developers also need to address current application requirements while keeping their code and
infrastructure flexible enough to meet future needs.

Design Pattern
A Lower level framework for structuring an application than architectures (Sometimes, called
micro-architecture). Reusable collaborations that solve sub problems within an application. Design
patterns support object-oriented reuse at a high level of abstraction. Design patterns provide a
“framework” that guides and constrains object-oriented implementation.

Figure 3.1 Design Pattern Description Template

Course Module
Integrative Programming and Technologies 1
2
Integrative Coding

Organizing Design Pattern


The Gang of Four (GoF) Design Patterns book describes twenty-three patterns arranged
into three groups.
The groups help classify how the patterns are used.
1. Creational patterns: used to help make a system independent of how its objects
are created, composed and represented.
2. Structural patterns are concerned with how classes and objects are organized
and composed to build larger structures.
3. Behavioral patterns are used to deal with assignment of responsibilities to
objects and communication between objects.
Creational Patterns
a. Abstract Factory - create instances of other objects.
Eg:-creating GUI components for different GUI toolkits
b. Factory Method -common interface for creating subclasses.
c. Singleton -create only one instance of a class.
Structural Patterns
a. Decorator - add more responsibilities to an object dynamically.
Eg:- adding scrolling to a text view
b. Facade- higher level unified interface to a set of objects in a subsystem.
c. Proxy- interface layer between objects.
Behavioral Patterns
a. Iterator- a means to access all the elements of objects sequentially.
b. Momento- capture and save the current state of an object.
c. Observer- when any numbers of objects (the Observers) need to be notified automatically.

Interfaces
Application Programming Interfaces
- These are sets of requirements that govern how one application can talk to another.
Applications to share data and take actions on one another's behalf without requiring
developers to share all of their software's code and it define exactly how a program will
interact with the rest of the software world—saving time, resources.

Course Module
Integrative Programming and Technologies 1
3
Integrative Coding

Examples: a. System-level APIs- cut and paste LibreOffice document into an Excel spreadsheet
b. FacebookAPIs- Facebook users sign into many apps and Web sites using their
Facebook ID
c. Web APIs – games let players chat, post high scores and invite friends to play via
Face book, right there in the middle of a game

Inheritance
It derive a new class based on an existing class, with modifications or extensions. A subclass
inherits all the variables and methods from its super classes, including its immediate parent as well
as all the ancestors and avoid duplication and reduce redundancy.

Types of Inheritance
Simple, Multilevel, Multiple, hierarchical and Hybrid

Inheritance and Abstract class


Abstract Method - a method with only signature (i.e., the method name, the list of arguments and
the return type) without implementation (i.e, the method’s body). Use the keyword abstract to
declare an abstract method.

Abstract Class
A class containing one or more abstract methods is called an abstract class.
- must be declared with a class-modifier abstract.
- provides a template for further development.

Figure 4.2 Example of Inheritance

Course Module
Integrative Programming and Technologies 1
4
Integrative Coding

Figure 4.3 Examples of Abstract and Inheritance

Versioning and Version Control


Version control enables multiple people to simultaneously work on a single project.
Each person edits his or her own copy of the files and chooses when to share those changes
with the rest of the team. Temporary or partial edits by one person do not interfere with another
person's work. It enables one person to use multiple computers to work on a project and integrates
work done simultaneously by different team members. In rare cases, when two people make
conflicting edits to the same line of a file, then the version control system requests human
assistance in deciding what to do. Version control gives access to historical versions of the project.

Course Module
Integrative Programming and Technologies 1
5
Integrative Coding

If make a mistake, roll back to a previous version. Reproduce and understand a bug report
on a past version of your software. Undo specific edits without losing all the work that was done in
the meanwhile. For any part of a file, determine when, why, and by whom it was ever edited. Version
control uses a repository (a database of changes) and a working copy (checkout) where you do your
work working copy is your personal copy of all the files in the project. Edits to this copy, without
affecting your teammates. Commit your changes to a repository repository is database of all the
edits to, and/or historical versions (snapshots) of, your project update your working copy to
incorporate any new edits or versions.
Two varieties of version control: centralized (one repository) and distributed (multiple
repositories). Some popular version control systems are Mercurial (distributed), Git (distributed),
and Subversion (centralized). The main difference between centralized and distributed version
control is the number of repositories. In centralized version control, there is just one repository, and
in distributed version control, there are multiple repositories

References and Supplementary Materials


Books and Journals
1. Siewart, Sam & John Pratt. (2016). Real time embedded components and systems with
Linux and Rtos, O'Reilly Media

2. Johnson, Richard. (2017). An Introduction to Java Programming and Object-Oriented


Application Development, 1st Edition. Cengage Learning

Online Supplementary Reading Materials


1. Eclipse Integrated Development Environment (IDE) Neon:
https://www.eclipse.org
2. https://www.slideshare.net/vijipriyacse/ipt-chapter-5
Online Instructional Videos
1. https://www.youtube.com/watch?v=yUw-aTOwAw8

Course Module

You might also like