달력

5

« 2024/5 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

'분류 전체보기'에 해당되는 글 87

  1. 2008.03.16 Eclipse로 루비 개발하기
  2. 2008.03.15 mvn jetty, cargo
  3. 2008.03.15 mvn test
  4. 2008.03.15 DBUnit 1
  5. 2008.03.15 Appfuse Maven Plugin(AMP)
  6. 2008.03.15 Hibernate Shards
  7. 2008.03.15 MySQL Cluster
  8. 2008.03.13 사내 리파지토리 사용하기
  9. 2008.03.13 Maven2 Tip
  10. 2008.03.13 맥 시동 키 1
2008. 3. 16. 19:20

Eclipse로 루비 개발하기 Ruby2008. 3. 16. 19:20

http://www.ibm.com/developerworks/kr/library/tutorial/os-eclipse-europa3/index.html

Eclipse로 루비 개발하기
RDT(Ruby Development Tools)

http://updatesite.rubypeople.org/release
ruby perspective

RDT는 루비 코드에 적용되는 기본 기능들을 제공하지만 레일스에 최적화되어 있지는 않다. RDT를 만든 개발자들이 Rails 개발자를 위한 도구를 만든 것이 RadRails이다. RadRails는 이클립스에서 레일스의 기능들에 초점을 맞춰 RDT 기반에서 만들어졌다.

RadRails 설치
Aptana
http://update.aptana.com/install/3.2

설치 후에 Help/Aptana Start Page...
"install"을 클릭하면 Aptana는 이미 설치된 Eclipse 업데이트 시스템을 통해 RadRails 플러그인을 설치한다.

설치 후에 Windows > Open Perspective > Others에서 RadRails perspective로 전환할 수 있다.

1. 레일스 프로젝트 생성하기
File > New > Rails Project 선택
- 프로젝트명에 baseball 입력
- Use default location , Generate Rails application skeleton / Create a Mogrel server 체크
- 만일 Mongrel 서버가 설치되어 있지 않다면 Gems(gem install mongrel)을 통해 설치

2. 데이터베이스 설정하기
config/database.yml 파일을 열어서 아래와 같이 편집

# MySQL (default setup). Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql
# On MacOS X:
# gem install mysql -- --include=/usr/local/lib
# On Windows:
# gem install mysql
# Choose the win32 build.
# Install MySQL and put its /bin directory on your path.
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql
database: baseball
username: root
password: password
host: localhost

# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test:
adapter: mysql
database: baseball_test
username: root
password:
host: localhost

production:
adapter: mysql
database: baseball_production
username: root
password:
host: localhost

3. Data Perspective 사용하기
Window > Perspective > Data
- 데이터베이스의 테이블을 보여주며, 질의를 실행할 수 있다.
- 데이터베이스 개발 퍼스펙티브와 유사하지만 데이터베이스 설정을 위해 database.yml 파일을 사용한다는 점이 다르다.

4. RadRails와 레이크
4.1 기존 스키마로 작업하기
- RadRails 퍼스펙티브 / Rake Tasks에서 "db:schema:dump"를 선택하고 "Go" 버튼 클릭
- db/schema.rb에 덤프가 생성됨
- db:schema:load를 실행하면 반대로 schema.rb 파일의 내용이 데이터베이스에 반영된다.

4.2 RadRails의 레일스 생성기들
- RadRails 퍼스펙티브 / Generators에서 선택

4.2 모델 생성
- Generators에서 model 선택, 인자로 player로 지정, "Go" 클릭

class Player < ActiveRecord::Base
has_many
:games
end

class
Game < ActiveRecord::Base
belongs_to
:player
end

4.3 스캐폴딩
generator에서 scaffold 선택, player를 인자로 지정, "Go"
같은 방법으로 game에 대한 스캐폴딩도 생성

5. 어플리케이션 테스트하기
- 어플리케이션을 띄우기 위해 서버뷰로 이동해서 서버 스타트

:
Posted by codetemplate
2008. 3. 15. 01:25

mvn jetty, cargo 프레임워크2008. 3. 15. 01:25

tomcat에 인스톨하기

mvn jetty:run-war: jetty로 웹 어플리케이션 실행

mvn cargo:start -Dcargo.wait=true: 톰캣에 어플리케이션을 디플로이한다. http://localhost:8081/applicationName-version

maven 2 tomcat plugin 설정(mvn tomcat:run, mvn tomcat:run-war)

<plugin>

<groupId>org.codehaus.mojo</groupId>

<artifactId>tomcat-maven-plugin</artifactId>

<configuration>

<path>/</path>

</configuration>

</plugin>

이미 설치된 톰캣을 사용하고 할 경우 아래의 설정을

<container>

<containerId>${cargo.container}</containerId>

<!--home>${cargo.container.home}</home-->

<zipUrlInstaller>

<url>${cargo.container.url}</url>

<installDir>${installDir}</installDir>

</zipUrlInstaller>

</container>

다음과 같이 변경한다.

<container>

<containerId>${cargo.container}</containerId>

<home>${cargo.container.home}</home>

</container>
:
Posted by codetemplate
2008. 3. 15. 01:24

mvn test 프레임워크2008. 3. 15. 01:24

mvn test

-Dtest=ClassName(not fully-qualified)

-Dsurefire.useFile=false: test 오류를 파일이 아닌 콘솔에서 보고자 할 때

-Dmaven.surefire.debug: 5005번 포트로 디버그 포트를 열고 대기(suspend=y)할 때

:
Posted by codetemplate
2008. 3. 15. 01:22

DBUnit 프레임워크2008. 3. 15. 01:22

dbunit을 이용해서 데이터베이스 export하기

mvn dbunit:export

target/dbunit/export.xml에 export됨. -Ddest 파라미터로 위치 변경 가능

repopulate database

mvn dbunit:operation

mvn hibernate3:hbm2ddl dbunit:operation

creates and populates your database

:
Posted by codetemplate
2008. 3. 15. 01:21

Appfuse Maven Plugin(AMP) 프레임워크2008. 3. 15. 01:21

mvn appfuse:gen -Dentity=name [-DdisableInstallation=true]

mvn appfuse:install -Dentity=name

mvn appfuse:remove -Dentity=name

mvn appfuse:gen-model

source code template을 customizing하기 위해서는

1. Checkout the plugin from SVN (username: guest, password: <blank>):

svn co https://appfuse.dev.java.net/svn/appfuse/trunk/plugins/appfuse-maven-plugin appfuse-maven-plugin

2. Customize the templates in src/main/resources/appfuse.

3. Run mvn install (use -Dmaven.test.skip=true if tests fail and you don't want to fix them).

4. Make sure your project matches the version number you just installed.

AppFuse의 source를 프로젝트에 인스톨하기

mvn appfuse:full-source

:
Posted by codetemplate
2008. 3. 15. 01:11

Hibernate Shards 프레임워크2008. 3. 15. 01:11

http://www.hibernate.org/414.html

:
Posted by codetemplate
2008. 3. 15. 01:02

MySQL Cluster DB2008. 3. 15. 01:02

mgt node

data node 관리

ndb_mgm 데몬

클러스터 내의 모든 노드 리스트 및 관리

api(sql) node

비즈니스 데이터

어플리케이션 API 호출 처리

data(ndb) node

클러스터링을 위한 데이터

DDL에서 engine을 NDBCLUSTER로 지덩해야

kldp mysql clsuter v4

정합성 테스트

한쪽에서 insert / select

다른 쪽에서 select / insert / select

다른 쪽에서 select

부하 테스트

non cluster single node 성능

cluster 성능

레퍼런스 사이트 ???

:
Posted by codetemplate
2008. 3. 13. 17:02

사내 리파지토리 사용하기 프레임워크2008. 3. 13. 17:02

http://javajigi.tistory.com/92

http://www.theserverside.com/tt/articles/content/SettingUpMavenRepository/article.html

:
Posted by codetemplate
2008. 3. 13. 17:02

Maven2 Tip 프레임워크2008. 3. 13. 17:02

1. 클래스가 속한 jar 찾기

http://jarsniffer.org:9080

2. maven dependency 찾기

http://mvnrepository.com

:
Posted by codetemplate
2008. 3. 13. 17:01

맥 시동 키 Mac2008. 3. 13. 17:01

option - 시스템 폴더 선택 가능 (흔히 외장이나, 다른 하드로 부팅하고 싶을 때)
C - CD로 부팅하기
X - OS X로 부팅하기 (9와 X이 동일한 파티션에 설치된 경우)
N - 네트워크 부팅 (거의 사용안함)
T- 타겟모드 부팅 (이렇게 부팅된 컴퓨터는 외장하드처럼 다른 컴퓨터에 FireWire케이블로 연결할 수 있음)
cmd + option + shift + delete - 외장으로 강제 부팅하기 (키보드 옵션키가 고장났거나 옵션키를 누르고 시계돌아가는게 지루할 때 / 외장이 없으면 cd로 부팅 됨)
shift - 확장파일 끈채로 시동하기 (윈도우즈의 안전모드와 비슷)
cmd + option - 데스크탑 재형성하기 (완전히 부팅된 상태에서 파인더를 강제종료 시킬 때 눌러도 같은 효과)
cmd + option + P + R - PRAM 소거 (부팅음 듣고 누르고 누른 상태로 부팅음 두번 듣고 떼기)
cmd + S - OS X로 부팅시 싱글모드 들어가기 마우스 버튼 누른채로 시동하기 - 강제로 CD추출 (요놈 때문에 시동안되는 일 많음)
cmd + option + cd 추출 버튼 - 소프트웨어적으로 재시동하기 ( 도스에서 ctrl + alt + del의 기능) (cd 추출 버튼이 없는 노트북에서는 파워키로 대체)
cmd + option + esc - 강재종료창 띄우기 ( 윈도우즈의 ctrl + alt + del의 기능)

[출처] OSX 시동관련 단축키 입니다. (맥북을 쓰는 사람들) |작성자 노란딸기

:
Posted by codetemplate