2008년 10월 21일 화요일

Oracle Sequence for Auto-Increment

Example Number 1 ...
    
create sequence product_seq start with 1 increment 1
/
create or replace trigger product_insert before insert for each row begin
select productseq.nextval
into :new.product_id
from dual;
end;
/

Example Number 2 ...
How to create an autoincrement field in a table with a sequence ...

SQLWKS> create table bob(a number , b varchar2(21));
Statement processed.

First create a sequence
SQLWKS> create sequence x ;
Statement processed.

Then create the trigger.
create trigger y before insert on bob
for each row
when (new.a is null)
begin
 select x.nextval into :new.a from dual;
end;
/

Example Number 3 ...
    First create a sequence:
 
create sequence emp_no_seq;
 
By default it increments by 1 starting at 0.
Use its values when inserting data into the table:
 
insert into t_emp values (emp_no_seq.nexval, 'Joe Black');

2008년 9월 13일 토요일

Build RESTful services for your Web application

출처 : http://www.ibm.com/developerworks/web/library/i-zero1/index.html?ca=dgr-jw64-zero1&S_TACT=105AGY46&S_CMP=GRsitejw64

 

Introduction

RESTful SOA is a subset of SOA that focuses on Hypertext Transfer Protocol (HTTP) and basic RESTful principles

  • Benefits
    • Scalability, through caching and stateless interactions.
    • Simplicity, with prerequisites that are typically HTTP and XML or JavaScript Object Notation (JSON) parsing and rendering.
    • A wide-reaching "network effect" from common standards. For example, sites can consume or aggregate Atom or RSS feeds without having to know details about the content.
Create
Simplify development with support for scripting languages (currently Groovy and PHP), conventions that promote RESTful patterns, and catalogs of reusable assets.
Assemble
Enable rapid access and aggregation of disparate services into unified applications, including data flows, orchestrations, and custom mediations.
Deploy
Provide an application-centric run time environment based upon the well known and stable Java™ Virtual Machine (JVM), which is optimized for agile development (small footprint, fast restart).

RESTful services

  • The RESTful architecture adheres to several principles
    • Requests are client-server, and by nature, use a pull-based interaction style. Consuming components pull representations of state from the server.
    • Requests are stateless. Each request from client to server must contain all the information needed to understand the request and cannot take advantage of any stored context on the server.
    • REST does not necessarily mean there is no state on the middle tier; the state to fulfill the request for a resource is not dependent on that state.
    • Clients and server adhere to a uniform interface. All resources are accessed with a generic interface in the Web-extended SOA world—HTTP along with the HTTP methods: GET, POST, PUT, DELETE.
    • Clients interact with named resources. The system comprises resources that are named using a URL, such as an HTTP URL.

Representational State Transfer (REST) is a style of software architecture for distributed hypermedia systems, such as the World Wide Web.

Figure 1. Events

 

Figure 2. Event handler examplesFigure 2. Event handler examples

 

 

 Figure 3. Global context
 

 

Figure 7. Use cases for the example
 

 

Prerequisites

To run the examples in this article, you will need:

 

RESTful Service 를 위안 개념만 정리.

 

개발개념

Simplify development

rapid access

agile development

 

서비스개념

매쉬업이 가능한 데이터 서비스가능해야한다.

HTTP 의 METHOD : GET , POST , DELETE, PUT 이해

 

 

기초가 중요하다는것은 그 기반위에 정보를 쌓기 위함이다.

뒤로 미루는것은 이젠 버리자.

 

2008년 9월 10일 수요일

IPOD NEW ARRIVAL!

사용자 삽입 이미지

오늘 새벽에 발표했군요.;;
4세대 아이팟 나노는 이제까지 나온 아이팟중에 가장 얇군요. :) (두께는 6.2mm 후덜덜;;)
이번 모델에서는 8기가와 16기가만을 채택하고 있고 가격은 $149 와 $199 음. 얼마죠? -_-;

아이팟터치 2세대는  볼륨키 내장, 배터리 향상, WiFi기능향상, 가격하락 정도가 눈에 띄는군요.
음. 1세대를 소유한 저로썬 무리하게 욕심을 내지는 않지만;; 배터리 향상은 좀 솔깃하긴 합니다;;
소문중에 GPS가 추가될것이라 했는데; 그건 아쉽게도 없군요.
8GB $229, 16GB $299, 32GB $399 음 ; 배가 살짝 아프긴합니다만;; 머;;;;

아이팟 클래식이 기존의 80GB/160GB에서 120GB 모델만 존재하는군요. 왜 그랬을까? 왜 그랬을까?

사용자 삽입 이미지


출처 : http://events.apple.com.edgesuite.net/0809dt4bs89/event/index.html

음 스티브 잡스가 맨 처음 등장할때 문구가 눈에 띄는군요. :)
사용자 삽입 이미지

아마도 자신의 건강설에 대한 일축인것 같습니다. 근데도 좀 야위어 보이긴해요;;;

2008년 9월 8일 월요일

javarss.pe.kr

현재 관리(?)를 방치하고 있는 사이트를 서영아빠 님과 함께 하고 있습니다.

항상 무언가를 시작할때는 광대하게 입만 살아서리;; 시작하긴 하는데욧;;

그게 어떻게 의지박약인지라 -_-;;

  • UI변경
  • 내부로직변경(rss 객체 관리)
  • 프레임웍변경
  • 자동화 및 문서화생성

위 4가지가 현재 큰 이슈인데요.
바쁘다는 핑계를 대면서 항상 건들지 못했는데.
이번 추석때 한번 부지런을 떨어봐야겠습니다.

ui변경은 손이 많이 가므로 패스;;
자동화 및 문서화생성등의 몇가지를 손대보려합니다.

TDD 에 관련한 몇가지 포스팅을 좀 써놔야겠군요 :)

이번주도 바쁜 한주가 되겠습니다. 아하핫;; (금주 금요일에 보자 이놈-_-;)

2008년 9월 5일 금요일

구글 크롬



# Chrome 이 나온지 삼일정도 됐나? 이틀인가?
 주위 많은 사람들이 사용을 하고 있는중이라는군요.
우분투를  사용중이라, virtualbox에서 사용중인 window에서만 틈틈히 돌려보는중이라
많은 사용을 해보지는 않았습니다만, 아직 모든 기능을 구현하지 않은것으로 보이므로
(베타딱지 붙이기는 구글의 트레이드마크처럼 보입니다.) .
 테클은 반사!! 외치고 있는것으로 보입니다. :)


출시일을 알려주겠다고 하는 자상한 배려에 잠시 눈물좀 딱고. ㅠㅠ

대충 요약하자면 5가지 정도로 요약이 되더군요.

그중 제일 공감가는것은.

우리 일꺼리가 늘었어요. 구글사마. 어떻할꺼야 ㅠㅠ

2008년 9월 4일 목요일

재회

포털의 블로그를 쓰다가 또 다른 포털의 블로그로 갈아탄뒤에 제대로 된 글을 쓰기가 점점 어려워짐을 느낀다.

그것은 시스템이나, 제반사항에 의한것이 아니였다.
문제는 항상 알고있다. 그건 나의 무지와 게으름과 핑계때문이라는것을.

초대해주신 sunny님께 일단 감사 인사를 드려야겠다.

누군가와 약속을 하고 이를 지키기 위해하는것은 나를 바로 잡는 것중에 하나이다.

그것이 누군가를 위해서라기 보다 나 자신을 위해서는 좀더 확고해야할것이다.
(오 BGM 깔까? __;; )

심각하지도 않고, 가볍지도 않은 글로 나를 바로잡는 터로 만들려고 한다.

-어설픈감성
-개발로그
-이야기사진

세가지 카테고리안에 내가 좀더 부지런해지기를 고대해본다.

뱀발 . 제목의 재회는 글쓰이가 자아를 찾아간다는...머 이런 -_-;;;