SlideShare a Scribd company logo
1 of 44
JaMU April 2009
STMIK AKAKOM
Yogyakarta




 Practical OOP in Java
                  A Case Study Approach




                                            Thomas Wiradikusuma
                                          wiradikusuma@gmail.com
Objective

To demonstrate practical Object
Oriented Programming in Java using
a case study.
       Focus on OOP, Design
       Pattern, the UML and Java
       EE (Web).
Agenda

Quick tour on software engineering

Introduction to OOP

Introduction to Design Pattern

Introduction to the UML

Case study
A Journey to the Source

 Everything begins from the source (code), based
 on requirements. Source code gets compiled,
 resulting in executable (actual deliverable).

 Requirements getting more complex, at the same
 time development must be faster, cheaper and
 better.

 Some order is required.
Hope for Silver Bullets
High-level language advancements

Object-oriented programming

Graphical programming (diagramming)

Incremental and iterative development

Rapid prototyping

Great designers

…
Object-oriented Programming

   Essence: Abstraction

   Principals:

     Encapsulation

     Inheritance

     Polymorphism
Abstraction
Humans manage complexity
through abstraction.

For example, people do not
think a car as a set of tens
of thousands of individual
parts. They think of it as a
well-defined object with its
own unique behavior.

A powerful way to manage
abstraction is through the
use of hierarchical
classifications (layers).
Abstraction
Humans manage complexity
through abstraction.

For example, people do not
think a car as a set of tens
of thousands of individual
parts. They think of it as a
well-defined object with its
own unique behavior.

A powerful way to manage
abstraction is through the
use of hierarchical
classifications (layers).
Encapsulation
The mechanism that binds together
code and the data it manipulates.

Protective wrapper that prevents
the code and data from being
misused outside the wrapper.

Controlled through a well-defined
interface.

Allows migration of implementation
without breaking contract with
users of that class.

In Java, the basis of encapsulation
is the class.
Encapsulation
The mechanism that binds together
code and the data it manipulates.

Protective wrapper that prevents
the code and data from being
misused outside the wrapper.

Controlled through a well-defined
interface.

Allows migration of implementation
without breaking contract with
users of that class.

In Java, the basis of encapsulation
is the class.
Inheritance
The process by which one
object acquires the
properties of another object.

Supports the concept of
hierarchical classification.

Using inheritance, object
needs only define qualities
that make it unique. General
attributes are inherited from
its parent.

The concept of super class
and sub class.
Inheritance
The process by which one
object acquires the
properties of another object.

Supports the concept of
hierarchical classification.

Using inheritance, object
needs only define qualities
that make it unique. General
attributes are inherited from
its parent.

The concept of super class
and sub class.
Polymorphism
Feature that allows one
interface to be used for a
general class of actions.
The specific action is
determined by the exact
nature of the situation.

One interface, multiple
methods.

Allows creation of clean,
sensible, readable and
resilient code.
Polymorphism
Feature that allows one
interface to be used for a
general class of actions.
The specific action is
determined by the exact
nature of the situation.

One interface, multiple
methods.

Allows creation of clean,
sensible, readable and
resilient code.
Benefits of OO Approach

 Objects are more “real-world”

 Objects provide the flexibility and control
 necessary to deal with evolving requirements

 Object use facilitates collaboration

 Objects help manage complexity

 Reusability, maintainability and extensibility
Design Pattern

General repeatable solution to a commonly-
occurring problem in software design.

Old idea, made popular by Gamma et al (Design
Patterns -- Elements of Reusable Software,
1995).

Must be Useful, Useable, and Used.
Patterns vs Algorithms

Algorithms and data structures generally solve
more fine-grained computational problems like
sorting and searching.

Patterns are typically concerned with broader
architectural issues that have larger-scale
effects.
Patterns vs Frameworks
A software framework is a reusable mini-architecture
that provides the generic structure and behavior for
a family of software abstractions, along with a
context of memes/metaphors which specifies their
collaboration and use within a given domain.

A framework is usually not a complete application: it
often lacks the necessary application-specific
functionality.

Frameworks employ an inverted flow of control
between itself and its clients.
Patterns vs Frameworks, cont’d
    Design patterns may be employed both in the design and the documentation of a
    framework. A single framework typically encompasses several design patterns. A
    framework can be viewed as the implementation of a system of design patterns.

    Frameworks and design patterns are distinct: a framework is executable
    software, design patterns represent knowledge and experience about software.
    Frameworks are of a physical nature, patterns are of a logical nature:
    frameworks are the physical realization of one or more software pattern
    solutions; patterns are the instructions for how to implement those solutions.

    Major differences:

       Design patterns are more abstract than frameworks.

       Design patterns are smaller architectural elements than frameworks.

       Design patterns are less specialized than frameworks.
Classification
Creational patterns, object creation mechanisms, example:

    Factory method

    Prototype

    Singleton

Structural patterns, identify a simple way to realize relationships between entities, example:

    Adapter

    Decorator

    Proxy

Behavioral patterns, identify common communication patterns between objects, example:

    Chain of responsibility

    Observer

    Strategy
Unified Modeling Language

 Standardized general-purpose modeling language
 in the field of software engineering.

 Combines the best practice from data modeling
 concepts such as entity relationship diagrams
 (ERD), business modeling (work flow), object
 modeling and component modeling.
Connecting People
Allows developers to
communicate clearly.

Natural language is
cumbersome for complex
concepts. Code is too
detailed.

Need to see from “high
above.”

UML is the lingua franca
of analysis and design.
Classification
Worth a thousand words, but...

    The most important part is the executable
    (source code).

    Diagrams are for communication and
    documentation.

    Be flexible, use the simplest that works.

    Don’t be trapped with 100% roundtrip
    engineering.
Java
Three in one:

  Programming language

  Virtual Machine

  Platform

A product of Sun Microsystems

Open sourced in November 2006 under the GNU General
Public License

Used in a wide variety of computing platforms
Java Programming Language
 C-like dialect

 !   public class Hello {

 !   !   public static void main(String args[]) {

 !   !   !   System.out.println(“Hello!”);

 !   !   }

 !   }

 Object oriented

 Interpreted and compiled

 Widely used to teach Programming 101 in many courses
Java Virtual Machine (JVM)

  Makes Java application portable

  Code compiled into bytecode

  JIT (Just In Time) native compiler

  Available in a wide range of computer
  architecture
Java Platform
Java Card, applet embedded in smart card

Java ME (Micro Edition), for cellphone

Java SE (Standard Edition), desktop application and
everything else

Java EE (Enterprise Edition), Java SE with additional
enterprise packages

JavaFX, emerging rich client platform, Flash-like

Android, from Google, not the “standard” one
Java EE
Widely used platform for server programming in the
Java programming language.

Differs from Java SE in that it adds libraries which
provide functionality to deploy fault-tolerant,
distributed, multi-tier Java software, based largely on
modular components running on an application server.

There are “non standard” (alternative) tools/
frameworks to complement Java SE to be “enterprise-
ready” (e.g. Spring Framework, EhCache, Mule ESB,
etc).
Frameworks
A system has many aspects: DB access, interoperability, security,
logging, caching, validation, theme, testing, scalability, etc. Very
hard and time consuming to build everything from scratch.

Don’t reinvent the wheel (the NIH syndrome)

Framework vs home-grown, framework is:

   Proven

   Abundant resource

   Community/commercial support

Focus on “business problem”
Case study: Dewantara
Open source student information system.

Aims to be flexible, allowing it to be used in
varying educational institutions.

Java Web application (JPA, Spring, JSF).

JUG CodeCamp 2008 project.

Familiar domain for most of us (you go to school,
don’t you?).
Lecturer   Student
Lecturer   Student




           Subject
Lecturer   Student




 Room      Subject
Lecturer             Student



           Session



 Room                Subject
Klass




Lecturer             Student



           Session



 Room                Subject
Klass




Lecturer             Student   Parent



           Session



 Room                Subject
Klass



 Staff



Lecturer             Student   Parent



           Session



 Room                Subject
Stakeholder              Klass



   Staff



 Lecturer               Student   Parent



              Session



   Room                 Subject
Institution




Stakeholder                  Klass



   Staff



 Lecturer                   Student   Parent



               Session



   Room                     Subject
Institution




       Stakeholder                  Klass



          Staff



User    Lecturer                   Student   Parent



                      Session



          Room                     Subject
Institution




       Stakeholder                  Klass



          Staff



User    Lecturer                   Student   Parent



Role                  Session



          Room                     Subject
Questions?
JUG Joglosemar jug-joglosemar.org
      JUG Indonesia jug.or.id


     Thomas Wiradikusuma
 Blog jroller.com/wiradikusuma
Twitter twitter.com/wiradikusuma

More Related Content

What's hot (20)

Arrays in java
Arrays in javaArrays in java
Arrays in java
 
OOPS In JAVA.pptx
OOPS In JAVA.pptxOOPS In JAVA.pptx
OOPS In JAVA.pptx
 
String.ppt
String.pptString.ppt
String.ppt
 
Object oriented programming With C#
Object oriented programming With C#Object oriented programming With C#
Object oriented programming With C#
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#
 
Introduction of java
Introduction  of javaIntroduction  of java
Introduction of java
 
Array and string
Array and stringArray and string
Array and string
 
Refactoring Techniques
Refactoring TechniquesRefactoring Techniques
Refactoring Techniques
 
Introduction to JAVA
Introduction to JAVAIntroduction to JAVA
Introduction to JAVA
 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
 
Java ppt
Java pptJava ppt
Java ppt
 
Java - Exception Handling
Java - Exception HandlingJava - Exception Handling
Java - Exception Handling
 
66781291 java-lab-manual
66781291 java-lab-manual66781291 java-lab-manual
66781291 java-lab-manual
 
Java Arrays
Java ArraysJava Arrays
Java Arrays
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
OOP java
OOP javaOOP java
OOP java
 
Introduction to android testing
Introduction to android testingIntroduction to android testing
Introduction to android testing
 
Decision Making and Branching in C
Decision Making and Branching  in CDecision Making and Branching  in C
Decision Making and Branching in C
 
Kotlin for Android Development
Kotlin for Android DevelopmentKotlin for Android Development
Kotlin for Android Development
 

Viewers also liked

Java OOP s concepts and buzzwords
Java OOP s concepts and buzzwordsJava OOP s concepts and buzzwords
Java OOP s concepts and buzzwordsRaja Sekhar
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Conceptsthinkphp
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaCPD INDIA
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Javabackdoor
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programmingSachin Sharma
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01Adil Kakakhel
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMoutaz Haddara
 
Object+oriented+programming+in+java
Object+oriented+programming+in+javaObject+oriented+programming+in+java
Object+oriented+programming+in+javaYe Win
 
Java OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & InterfaceJava OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & InterfaceOUM SAOKOSAL
 
Creación de Bases de Datos en SQL Server
Creación de Bases de Datos en SQL ServerCreación de Bases de Datos en SQL Server
Creación de Bases de Datos en SQL ServerPedrangas Pedrangas
 
20 online promotion tips for seafood industry to try right now
20 online promotion tips for seafood industry to try right now20 online promotion tips for seafood industry to try right now
20 online promotion tips for seafood industry to try right nowSocial Bubble
 
"Creación de bases de datos en SQL Server"
"Creación de bases de datos en SQL Server" "Creación de bases de datos en SQL Server"
"Creación de bases de datos en SQL Server" pacovar
 
C, C++, Java, Android
C, C++, Java, AndroidC, C++, Java, Android
C, C++, Java, AndroidMayank Jain
 
Java database connectivity
Java database connectivityJava database connectivity
Java database connectivityVaishali Modi
 
Fly weight pattern #dezapatan
Fly weight pattern #dezapatanFly weight pattern #dezapatan
Fly weight pattern #dezapatankuidaoring
 

Viewers also liked (20)

Java OOP s concepts and buzzwords
Java OOP s concepts and buzzwordsJava OOP s concepts and buzzwords
Java OOP s concepts and buzzwords
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
OOP in Java
OOP in JavaOOP in Java
OOP in Java
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Java
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Object+oriented+programming+in+java
Object+oriented+programming+in+javaObject+oriented+programming+in+java
Object+oriented+programming+in+java
 
Java OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & InterfaceJava OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & Interface
 
Java Basic Oops Concept
Java Basic Oops ConceptJava Basic Oops Concept
Java Basic Oops Concept
 
Oop java
Oop javaOop java
Oop java
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Creación de Bases de Datos en SQL Server
Creación de Bases de Datos en SQL ServerCreación de Bases de Datos en SQL Server
Creación de Bases de Datos en SQL Server
 
20 online promotion tips for seafood industry to try right now
20 online promotion tips for seafood industry to try right now20 online promotion tips for seafood industry to try right now
20 online promotion tips for seafood industry to try right now
 
"Creación de bases de datos en SQL Server"
"Creación de bases de datos en SQL Server" "Creación de bases de datos en SQL Server"
"Creación de bases de datos en SQL Server"
 
C, C++, Java, Android
C, C++, Java, AndroidC, C++, Java, Android
C, C++, Java, Android
 
Java database connectivity
Java database connectivityJava database connectivity
Java database connectivity
 
Fly weight pattern #dezapatan
Fly weight pattern #dezapatanFly weight pattern #dezapatan
Fly weight pattern #dezapatan
 
Core java
Core javaCore java
Core java
 

Similar to Practical OOP Java Case Study

Oops design pattern intro
Oops design pattern intro Oops design pattern intro
Oops design pattern intro anshu_atri
 
Introduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallIntroduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallJohn Mulhall
 
Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Kuntal Bhowmick
 
Evolution Of Object Oriented Technology
Evolution Of Object Oriented TechnologyEvolution Of Object Oriented Technology
Evolution Of Object Oriented TechnologySharon Roberts
 
Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Kuntal Bhowmick
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaMadishetty Prathibha
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaSujit Majety
 
Bartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design PatternsBartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design PatternsJason Townsend, MBA
 
Object-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdfObject-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdfBharath Choudhary
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language Hitesh-Java
 
Exploring the Pillars of Object java.pdf
Exploring the Pillars of Object java.pdfExploring the Pillars of Object java.pdf
Exploring the Pillars of Object java.pdfKajal Digital
 
A Survey of Object Oriented Programming LanguagesMaya Hris.docx
A Survey of Object Oriented Programming LanguagesMaya Hris.docxA Survey of Object Oriented Programming LanguagesMaya Hris.docx
A Survey of Object Oriented Programming LanguagesMaya Hris.docxdaniahendric
 

Similar to Practical OOP Java Case Study (20)

Oops design pattern intro
Oops design pattern intro Oops design pattern intro
Oops design pattern intro
 
OOP Java
OOP JavaOOP Java
OOP Java
 
Java1
Java1Java1
Java1
 
Java
Java Java
Java
 
Introduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallIntroduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John Mulhall
 
Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2
 
Evolution Of Object Oriented Technology
Evolution Of Object Oriented TechnologyEvolution Of Object Oriented Technology
Evolution Of Object Oriented Technology
 
Dtacs
DtacsDtacs
Dtacs
 
Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2
 
Java
JavaJava
Java
 
Core Java Learning Path
Core Java Learning PathCore Java Learning Path
Core Java Learning Path
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Bartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design PatternsBartlesville Dot Net User Group Design Patterns
Bartlesville Dot Net User Group Design Patterns
 
CAR SHOWROOM SYSTEM
CAR SHOWROOM SYSTEMCAR SHOWROOM SYSTEM
CAR SHOWROOM SYSTEM
 
Object-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdfObject-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdf
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language
 
Java for C++ programers
Java for C++ programersJava for C++ programers
Java for C++ programers
 
Exploring the Pillars of Object java.pdf
Exploring the Pillars of Object java.pdfExploring the Pillars of Object java.pdf
Exploring the Pillars of Object java.pdf
 
A Survey of Object Oriented Programming LanguagesMaya Hris.docx
A Survey of Object Oriented Programming LanguagesMaya Hris.docxA Survey of Object Oriented Programming LanguagesMaya Hris.docx
A Survey of Object Oriented Programming LanguagesMaya Hris.docx
 

More from wiradikusuma

Open Source And Java
Open Source And JavaOpen Source And Java
Open Source And Javawiradikusuma
 
Open Source is Not An Alternative, It is The Solution
Open Source is Not An Alternative, It is The SolutionOpen Source is Not An Alternative, It is The Solution
Open Source is Not An Alternative, It is The Solutionwiradikusuma
 
Spring 2.1 Exposed
Spring 2.1 ExposedSpring 2.1 Exposed
Spring 2.1 Exposedwiradikusuma
 
A Taste of Java ME
A Taste of Java MEA Taste of Java ME
A Taste of Java MEwiradikusuma
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2wiradikusuma
 

More from wiradikusuma (8)

Open Source And Java
Open Source And JavaOpen Source And Java
Open Source And Java
 
Open Source is Not An Alternative, It is The Solution
Open Source is Not An Alternative, It is The SolutionOpen Source is Not An Alternative, It is The Solution
Open Source is Not An Alternative, It is The Solution
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Spring 2.1 Exposed
Spring 2.1 ExposedSpring 2.1 Exposed
Spring 2.1 Exposed
 
A Taste of Java ME
A Taste of Java MEA Taste of Java ME
A Taste of Java ME
 
Subversion
SubversionSubversion
Subversion
 
Spring and DWR
Spring and DWRSpring and DWR
Spring and DWR
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Practical OOP Java Case Study

  • 1. JaMU April 2009 STMIK AKAKOM Yogyakarta Practical OOP in Java A Case Study Approach Thomas Wiradikusuma wiradikusuma@gmail.com
  • 2. Objective To demonstrate practical Object Oriented Programming in Java using a case study. Focus on OOP, Design Pattern, the UML and Java EE (Web).
  • 3. Agenda Quick tour on software engineering Introduction to OOP Introduction to Design Pattern Introduction to the UML Case study
  • 4. A Journey to the Source Everything begins from the source (code), based on requirements. Source code gets compiled, resulting in executable (actual deliverable). Requirements getting more complex, at the same time development must be faster, cheaper and better. Some order is required.
  • 5. Hope for Silver Bullets High-level language advancements Object-oriented programming Graphical programming (diagramming) Incremental and iterative development Rapid prototyping Great designers …
  • 6. Object-oriented Programming Essence: Abstraction Principals: Encapsulation Inheritance Polymorphism
  • 7. Abstraction Humans manage complexity through abstraction. For example, people do not think a car as a set of tens of thousands of individual parts. They think of it as a well-defined object with its own unique behavior. A powerful way to manage abstraction is through the use of hierarchical classifications (layers).
  • 8. Abstraction Humans manage complexity through abstraction. For example, people do not think a car as a set of tens of thousands of individual parts. They think of it as a well-defined object with its own unique behavior. A powerful way to manage abstraction is through the use of hierarchical classifications (layers).
  • 9. Encapsulation The mechanism that binds together code and the data it manipulates. Protective wrapper that prevents the code and data from being misused outside the wrapper. Controlled through a well-defined interface. Allows migration of implementation without breaking contract with users of that class. In Java, the basis of encapsulation is the class.
  • 10. Encapsulation The mechanism that binds together code and the data it manipulates. Protective wrapper that prevents the code and data from being misused outside the wrapper. Controlled through a well-defined interface. Allows migration of implementation without breaking contract with users of that class. In Java, the basis of encapsulation is the class.
  • 11. Inheritance The process by which one object acquires the properties of another object. Supports the concept of hierarchical classification. Using inheritance, object needs only define qualities that make it unique. General attributes are inherited from its parent. The concept of super class and sub class.
  • 12. Inheritance The process by which one object acquires the properties of another object. Supports the concept of hierarchical classification. Using inheritance, object needs only define qualities that make it unique. General attributes are inherited from its parent. The concept of super class and sub class.
  • 13. Polymorphism Feature that allows one interface to be used for a general class of actions. The specific action is determined by the exact nature of the situation. One interface, multiple methods. Allows creation of clean, sensible, readable and resilient code.
  • 14. Polymorphism Feature that allows one interface to be used for a general class of actions. The specific action is determined by the exact nature of the situation. One interface, multiple methods. Allows creation of clean, sensible, readable and resilient code.
  • 15. Benefits of OO Approach Objects are more “real-world” Objects provide the flexibility and control necessary to deal with evolving requirements Object use facilitates collaboration Objects help manage complexity Reusability, maintainability and extensibility
  • 16. Design Pattern General repeatable solution to a commonly- occurring problem in software design. Old idea, made popular by Gamma et al (Design Patterns -- Elements of Reusable Software, 1995). Must be Useful, Useable, and Used.
  • 17. Patterns vs Algorithms Algorithms and data structures generally solve more fine-grained computational problems like sorting and searching. Patterns are typically concerned with broader architectural issues that have larger-scale effects.
  • 18. Patterns vs Frameworks A software framework is a reusable mini-architecture that provides the generic structure and behavior for a family of software abstractions, along with a context of memes/metaphors which specifies their collaboration and use within a given domain. A framework is usually not a complete application: it often lacks the necessary application-specific functionality. Frameworks employ an inverted flow of control between itself and its clients.
  • 19. Patterns vs Frameworks, cont’d Design patterns may be employed both in the design and the documentation of a framework. A single framework typically encompasses several design patterns. A framework can be viewed as the implementation of a system of design patterns. Frameworks and design patterns are distinct: a framework is executable software, design patterns represent knowledge and experience about software. Frameworks are of a physical nature, patterns are of a logical nature: frameworks are the physical realization of one or more software pattern solutions; patterns are the instructions for how to implement those solutions. Major differences: Design patterns are more abstract than frameworks. Design patterns are smaller architectural elements than frameworks. Design patterns are less specialized than frameworks.
  • 20. Classification Creational patterns, object creation mechanisms, example: Factory method Prototype Singleton Structural patterns, identify a simple way to realize relationships between entities, example: Adapter Decorator Proxy Behavioral patterns, identify common communication patterns between objects, example: Chain of responsibility Observer Strategy
  • 21. Unified Modeling Language Standardized general-purpose modeling language in the field of software engineering. Combines the best practice from data modeling concepts such as entity relationship diagrams (ERD), business modeling (work flow), object modeling and component modeling.
  • 22. Connecting People Allows developers to communicate clearly. Natural language is cumbersome for complex concepts. Code is too detailed. Need to see from “high above.” UML is the lingua franca of analysis and design.
  • 24. Worth a thousand words, but... The most important part is the executable (source code). Diagrams are for communication and documentation. Be flexible, use the simplest that works. Don’t be trapped with 100% roundtrip engineering.
  • 25. Java Three in one: Programming language Virtual Machine Platform A product of Sun Microsystems Open sourced in November 2006 under the GNU General Public License Used in a wide variety of computing platforms
  • 26. Java Programming Language C-like dialect ! public class Hello { ! ! public static void main(String args[]) { ! ! ! System.out.println(“Hello!”); ! ! } ! } Object oriented Interpreted and compiled Widely used to teach Programming 101 in many courses
  • 27. Java Virtual Machine (JVM) Makes Java application portable Code compiled into bytecode JIT (Just In Time) native compiler Available in a wide range of computer architecture
  • 28. Java Platform Java Card, applet embedded in smart card Java ME (Micro Edition), for cellphone Java SE (Standard Edition), desktop application and everything else Java EE (Enterprise Edition), Java SE with additional enterprise packages JavaFX, emerging rich client platform, Flash-like Android, from Google, not the “standard” one
  • 29. Java EE Widely used platform for server programming in the Java programming language. Differs from Java SE in that it adds libraries which provide functionality to deploy fault-tolerant, distributed, multi-tier Java software, based largely on modular components running on an application server. There are “non standard” (alternative) tools/ frameworks to complement Java SE to be “enterprise- ready” (e.g. Spring Framework, EhCache, Mule ESB, etc).
  • 30. Frameworks A system has many aspects: DB access, interoperability, security, logging, caching, validation, theme, testing, scalability, etc. Very hard and time consuming to build everything from scratch. Don’t reinvent the wheel (the NIH syndrome) Framework vs home-grown, framework is: Proven Abundant resource Community/commercial support Focus on “business problem”
  • 31. Case study: Dewantara Open source student information system. Aims to be flexible, allowing it to be used in varying educational institutions. Java Web application (JPA, Spring, JSF). JUG CodeCamp 2008 project. Familiar domain for most of us (you go to school, don’t you?).
  • 32.
  • 33. Lecturer Student
  • 34. Lecturer Student Subject
  • 35. Lecturer Student Room Subject
  • 36. Lecturer Student Session Room Subject
  • 37. Klass Lecturer Student Session Room Subject
  • 38. Klass Lecturer Student Parent Session Room Subject
  • 39. Klass Staff Lecturer Student Parent Session Room Subject
  • 40. Stakeholder Klass Staff Lecturer Student Parent Session Room Subject
  • 41. Institution Stakeholder Klass Staff Lecturer Student Parent Session Room Subject
  • 42. Institution Stakeholder Klass Staff User Lecturer Student Parent Session Room Subject
  • 43. Institution Stakeholder Klass Staff User Lecturer Student Parent Role Session Room Subject
  • 44. Questions? JUG Joglosemar jug-joglosemar.org JUG Indonesia jug.or.id Thomas Wiradikusuma Blog jroller.com/wiradikusuma Twitter twitter.com/wiradikusuma

Editor's Notes