소개 - 강원대학교

Download Report

Transcript 소개 - 강원대학교

고급자바프로그래밍
(ADVANCED JAVA PROGRAMMING)
강원대학교 컴퓨터학부
2012년 가을학기
담당교수 정충교
Java
• 1995 발표, Sun Microsystems
• "write once, run anywhere" (WORA)
• James Gosling 등
• J2SE, J2EE. J2ME
• Java Community Process (JCP)
• 2007 GNU General Public License
• 2010 Oracle Corporations
• 10M users, 1G machines
Java
• simple, object-oriented and familiar
• robust and secure
• architecture-neutral and portable
• high performance
• interpreted, threaded, and dynamic
Java
• JDK 1.0 (January 23, 1996)
• JDK 1.1 (February 19, 1997)
• J2SE 1.2 (December 8, 1998)
• J2SE 1.3 (May 8, 2000)
• J2SE 1.4 (February 6, 2002)
• J2SE 5.0 (September 30, 2004)
• Java SE 6 (December 11, 2006)
• Java SE 7 (July 28, 2011)
Object-Oriented Programming
• Dynamic
• Encapsulation
• Polymorphism
• Inheritance
Spring
• 개발이 즐겁다!
• software 생산성과 품질
• 객체지향 프로그래밍 원칙 충실
• 비침투적 구조 (POJO)
• Plain Old Java Object
객체지향 프로그래밍 원칙 충실
• 유연성
• 수정 없이도 여러 상황, 변하는 상황에 대처 (다형성, 동
적바인딩에 의해 구현됨)
• 재활용성
• 클래스를 변경 없이 재활용
• 추가 기능, 기능 수정 필요시 기존 클래스 변경 없이 클래
스 확장을 통해 대처
• 보안성
• 캡슐화를 통해 필요한 정보만을 외부에 노출
용어
• OCP (Open/Closed Principle)
• 수정에는 닫혀 있고 확장에는 열려있다.
프레임워크 (framework) 특징 (library와 비
교할 때)
• IoC (inversion of control)
• 전체적인 프로그램 실행이 플레임워크에 의해 제어됨
• 기본동작 (default behavior)
• 별다른 추가 작업 없이도 쓸만한 기본 동작을 제공
• 확장성 (extensibility)
• 사용자에 의한 선택적 재정의 혹은 기능 추가에 의해
• 변경 불가
• 일반적으로 사용자에 의한 확장은 허용하지만 프레임워크 자체의
변경은 불가함
• (http://en.wikipedia.org/wiki/Software_framework
발췌)
컨테이너 - 컴포넌트 구조
(container - component)
• 개방형 구조
• 사용자는 제 3자가 작성한 컴포넌트를 추가함으로써 애
플리케이션의 기능을 확장할 수 있음
• 컴포넌트를 추가할 때 아무런 프로그램 변경도 필
요하지 않음
• 사용자는 시장에 있는 많은 컴포넌트들 중에서 골
라 사용할 수 있다.
• (http://www.cs.sjsu.edu/~pearce/modules/patterns/enterprise/Container.htm
요약)
컴포넌트 (component)
• 컴포넌트 (plugin이라고 불리기도 함)
• 어떤 인터페이스를 구현하고 있는, 서로 협력하는 객체들
• 디폴트 생성자, getter/setter를 갖는 프로퍼티
컨테이너 (container)
• 시스템 기능을 수행함
• 컴포넌트들의 라이프사이클 관리
• create, suspend, resume, destroy
• 컴포넌트들에게 기반 서비스를 제공
• communication
• persistence
• security
• execution environment (a VM for example)
• synchronization
• white and yellow page directories, etc.
컨테이너 예
• Browsers containing Applets
• Web Containers containing Sevelets
• EJB Containers containing EJB Beans
• The Eclipse platform containing plugins
• The Visual Basic IDE containing VB controls
• The PC Motherboard and PCI or ISA expansion
cards
Enterprise Application
• multiuser, mission critical
• transaction support, security, distributed computing
• EJB --> light-weight frameworks
스프링
• Lightweight and minimally invasive development with
POJOs (Plain Old Java Objects)
• Loose coupling through dependency injection and
interface orientation
• Declarative programming through aspects and common
conventions
• Boilerplate reduction through aspects and templates
끝