전체 글 (123) 썸네일형 리스트형 01. 객체-지향(Object-Oriented) 개념 객체 (Object) 물리적인 개체 개념적인 개체 소프트웨어 개체 지향 (Oriented) 객체 중심 기본 설계 단위를 객체로 함 실세계 매핑 실세계 모방 실세계(real-world)는 곧 객체-지향 세계 O-O의 근본 취지 실세계의 인간의 행동 양식을 모델링 세계에도 적용함으로써 추상적이고 개념적인 모델링 세계의 문제를 보다 쉽게 해결하고자 함 O-O에 내포한 다른 의미 존재하는 모든 개체는 고유의 Identity를 가진다. 모든 개체는 존재 가치가 있다. 존재 가치는 자신의 주어진 책임을 수행하는 즉, 역할수행을 통해 증명된다. 대부분의 객체는 책임이 너무 크면 불평을 한다. 불평이 있을 경우, 이를 완화하기 위해서 책임 조정이 필요하다. 올바른 객체-지향 세계에서 모든 개체는 자신의 존재를 증명할 .. Prototype 패턴 - 복사해서 인스턴스 만들기 . 클래스이름을 지정하지 않고 인스턴스를 생성할 때. 종류가 너무 많아 클래스로 정리되지 않는 경우 클래스로부터 인스턴스 생성이 어려운 경우 framework와 생성할 인스턴스를 분리하고 싶은 경우 . package framework; public interface Product extends Cloneable { public abstract void use(String s); public abstract Product createClone(); } . . . package framework; import java.util.HashMap; public class Manager { private HashMap showcase = new HashMap(); public void register(String .. PGP 처리 중 오류 1. PGP 암호화 중 아래 에러 org.bouncycastle.openpgp.PGPException: exception encrypting session key java.security.InvalidKeyException: Illegal key size or default parameters => key가 JDK/JRE 에 지정된 key size보다 커서 그래. After google the web, I finally know this is actually caused by JDK/JRE security policy because JDK/JRE has restricted key size. I choose ELGAMAL with key size 2048, thus, the exception is thro.. 01. OSB hello world Oracle Service Bus Hello World! Key Concepts Proxy Services -. Provide a wide variety of interfaces -. Provide an mediation layer between the service consumers and providers -. Contain the message processing logic (Message Flow) Message Flow -. Content-based routing -. Message transformation -. Service aggregation Bussiness Services -. Connectivity to external services and systems -. Meta-data o.. 7일차 1 근데.. class / instance / object 구분이 되니? class : 붕어빵틀, 설계도 instance : 실제 만들어진 붕어빵. 메모리(heap)에 만들어진 실체 object : (Class를 포괄하는) Instance..(90%는 인스턴스를 말하지) 메모리라 함은 자바에서는 세영역이지 heap : new로 만들어진 건 여기로 들어가(new stack static, class 혹은 static area >인스턴스만드는데 new가 없다? new가 없는게 아니라 감춰진 거지. 다른데 있는거야. ex) cn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "oraclejava", "oraclejava"); getConn.. 7일차 2 upcasting, downcastingpackage test.oop2; public class PointA { int x; int y; } public class PointB { int x; int y; } public class Point2D { int x; int y; } public class Point3D extends Point2D{ int z; } public class PointTest { public static void main(String[] args) { PointA ptA = new PointA(); PointB ptB = new PointB(); //PointB ptB1 = new PointA();//error //PointA ptA1 = new PointB();//error P.. 7일차 3 지난번에 list.jsp에서 데이터베이스 부분을 DAO(Database Access Object)(BoardDao)라는 부분으로 분리해냈지. 마찬가지고 insert.jsp도 BoardDao에 분리해보자. public boolean insertBoard(BoardDto boardDto){ Connection cn = null; PreparedStatement st = null; String sql = "insert into board (seq, title, name, password, content) " + "values (boardseq.nextval, ?, ?, ?, ?)"; boolean result = false; try { Class.forName("oracle.jdbc.OracleDriver").. 7일차 4 view 만들어 볼까.. 먼저 리스트 제목에 링크를 걸어야지.. content.jsp만들어서 seq값이 잘 넘어오는지 먼저 테스트하고 현재 글번호에 해당하는 내용을 읽어와야지. 글 상세보기 글번호 제목 이름 조회수 작성시간 내용 리스트 수정 삭제 BoardDao에 getView 메서드 추가 구현 public BoardDto getView(int seq){ BoardDto boardDto = null; String sql = "SELECT seq, title, name, writeday, readcount, content " + "FROM board " + "WHERE seq = ? "; try { getConnection(); st = cn.prepareStatement(sql); st.setInt(1,.. 이전 1 2 3 4 5 ··· 16 다음