Archive

Archive for the ‘Programming’ Category

iBatis Framework

September 1st, 2010 Kim Jong-sun No comments

iBATIS is a persistence framework which automates the mapping between SQL databases and objects in Java, .NET, and Ruby on Rails. In Java, the objects are POJOs (Plain Old Java Objects). The mappings are decoupled from the application logic by packaging the SQL statements in XML configuration files. The result is a significant reduction in the amount of code that a developer needs to access a relational database using lower level APIs like JDBC and ODBC.

Other persistence frameworks such as Hibernate allow the creation of an object model (in Java, say) by the user, and create and maintain the relational database automatically. iBatis takes the reverse approach: the developer starts with an SQL database and iBatis automates the creation of the Java objects. Both approaches have advantages, and iBatis is a good choice when the developer does not have full control over the SQL database schema. For example, an application may need to access an existing SQL database used by other software, or access a new database whose schema is not fully under the application developer’s control, such as when a specialized database design team has created the schema and carefully optimized it for high performance.

- from wikipedia

개요

+ JDBC 코드 패턴

- Connection -> Statement -> 쿼리전송 -> 연결 close

- 모든 JDBC 코드는 위의 패턴을 가진다.

- 이 패턴을 캡슐화 하여 JDBC 코드를 간편하게 사용할 수 있도록 Framwork 화 가능

+ iBatis 란

- SQL 실행 결과를 자바진즈 혹은 MAP 객체에 매핑해 주는 Persistence 솔루션으로 SQL 을 소스코드가 아닌 XML로 따로 분리해 관리하도록 지원

+ 장점

- SQL 문장과 프로그래밍 코드의 분리

- JDBC 라이브러리를 통해 매개변수를 전달하고 결과를 추출하는 일을 간단히 처리가능

- 자주 쓰이는 데이터를 변경되지 않는 동안에 임시 보관(Cache) 가능

- 트랜잭션 처리 제공

  • Google Bookmarks
  • Google Reader
  • Twitter
  • Facebook
  • Google Buzz
  • WordPress
  • Share/Bookmark
Categories: iBatis Tags:

Spring Framework 개발환경 구축

August 20th, 2010 Kim Jong-sun Comments off

http://www.springsource.org/download

에서 library를 받는다. (로그인 필요)

2.5.6 버전.

Eclipse 에서 플러그인을 받는다.

eclipse 메뉴 -> help -> Install New Software -> Add

http://dist.springframework.org/release/IDE

를 추가 시킨 후 Core 와 Extensions 체크

체크 후 next 버튼을 누른다.

설치할 목록 next

라이센스 동의 next

설치 시작!

보안 경고 창이 뜨는데 ok를 누른다.

목록에 나오는거 체크 후 next 하면 설치가 완료된다.

플러그인 설치 완료 후 Eclipse 를 재실행한다

새로운 프로젝트를 만들 때 아래와 같이 Spring Project 를 만들 수 있다!

  • Google Bookmarks
  • Google Reader
  • Twitter
  • Facebook
  • Google Buzz
  • WordPress
  • Share/Bookmark
Categories: Framework, Spring Tags: ,

Spring Framework

August 19th, 2010 Kim Jong-sun Comments off

Spring Framework 소개

http://www.ibm.com/developerworks/kr/library/wa-spring1/

http://openframework.or.kr/framework_reference/spring/ver1.2.2/html/index.html

  • Google Bookmarks
  • Google Reader
  • Twitter
  • Facebook
  • Google Buzz
  • WordPress
  • Share/Bookmark
Categories: Spring Tags: