SQuirreL SQL Client Home Page

squirrel-sql.sourceforge.net/
이 페이지 번역하기
SQuirreL SQL is an open-source Java SQL Client program for any JDBC compliant database.


Orange - 웨어벨리(Warevalley)

www.warevalley.com/xml/products/orange


Toad World

www.toadworld.com/



보통 mysql콘솔 같은 디비접속프로그램(클라이언트)는 잘 사용되지 않음


무료로 배포되는 여러 툴 중 각자 개발자들이 입맛에 맞는 프로그램을 사용함(ex.람쥐)


오라클 같은 경우는 오라클에서 제공하는 EM이나 유로 클라이언트인 토드나 오렌지가 주로 사용됨



Spring Framework


Spring 이란?

• 오픈 소스 프레임워크

– Rod Johnson 창시

• Expert one-on-one J2EE Design - Development, 2002, Wrox

• Expert one-on-one J2EE Development without EJB, 2004, Wrox


– 엔터프라이즈 어플리케이션 개발의 복잡성을 줄여주기 위한 목적

– EJB 사용으로 수행되었던 모든 기능을 일반 POJO(Plain Old JavaObject) 를 사용해서 가능하게 함.    

경량 컨테이너(light weight container)


• 주요 개념

– 의존성 주입(Dependency Injection)

– 관점 지향 프로그래밍(Aspect-Oriented Programming)



Spring 장점  -- 객체 관리 컨테이너

• 경량 컨테이너 – 객체의 라이프 사이클 관리, Java EE 구현을 위한 다양한 API 제공

DI (Dependency Injection) 지원 -- 의존성 관리

• AOP (Aspect Oriented Programming) 지원

• POJO (Plain Old Java Object) 지원

• 다양한 API와의 연동 지원을 통


Spring

https://spring.io/
이 페이지 번역하기
Spring helps development teams everywhere build simple, portable,. fast and ... Bootstrap yourSpring Boot application with start.spring.io. Generate now!

spring 개발환경 구축

스프링은 딱히 어떤 설치나 뭐가 있어야 되는게 아니므니다.
자바프로젝트에 스프링에 필요한 라이브러리를 import하면 되는겁니다.
add jars....관리 힘듬 ->라이브러리관리 도구를 사용하면 편리함(Maven, 엔트,  gradle...)

Maven을 이용해서 스프링 라이브러리를 프로젝트에 세팅!

configure -> convert to Maven project

C:\Users\student\.m2 <-- 메이븐라이브러리 날리기


' IOT 기반 응용 SW과정 > Web Programing' 카테고리의 다른 글

Day51 스프링 JDBC  (0) 2016.05.30
Day49 Spring Framework  (0) 2016.05.26
Day47 MVC, 커맨드 패턴  (0) 2016.05.24
Day46 자바스크립트  (0) 2016.05.24
Day45 데이터베이스와 JDBC  (0) 2016.05.20

절차지향 



객체지향 

(변수 + 함수 / 상속 / 다형성, GOF, 디자인패턴)



프레임워크

(spring)





상속

(어떤 클래스가 다른 클래스의 멤버변수와 멤버함수를 물려 받는 것)

(기존 클래스의 필드와 메소드를 재사용하기 위한 기법)

(기존클래스의 일부 변경도 가능)

(복잡한 GUI 프로그램을 순식간에 작성)


superclass // subclass

부모클래스 // 자식클래스



<is - a 관계>





 public class Car {

      public int speed; 

public int gear;     //3개의 필드 선언

public String color;

                       //3개의 메소드 선언

public void setGear(int gear) 

{

this.gear =  gear;

}

public void speedUp(int increment)

{

speed += increment;

}

public void speedDown(int decrement)

{

speed -= decrement;

}

}

   

 public class SportsCar extends Car {

                  // Car를 상속받는다.

        

public boolean turbo;

                 // 1개의 필드를 추가

public void setTurbo(boolean newValue) {

                //1개의 메소드를 추가


turbo = newValue;

                //터보 모드 설정 메소드

}

}


 public class CarTest {

public static void main(String[] args) {

SportsCar scar = new SportsCar(); 

                                //수퍼클래스 필드 접급


     scar.color = "RED";

     scar.setGear(3); //수퍼클래스 메소드 접근

     scar.speedUp(200);

     scar.setTurbo(true);   //자체 메소드 호출

}

}

   



상속이란.. 

부모클래스로 객체 찍어낸 후, 거기에 이어 붙여서 자식으로 객체 찍어내서 붙여서 하나의 객체를 만들어 내는 것.


class Parent{

      int data = 100;

public void print(){

System.out.println("부모임");

}

}

class Child extends Parent{

int data = 200;

public void print(){        //메소드 재정의

int data = 300;

super.print();

System.out.println("자식임");

System.out.println("data : " + data);

System.out.println("this.data : "+ this.data);

System.out.println("super.data : "+ super.data);

}

}

public class ParentTest {

public static void main(String[] args) {

new Child().print();

}

}

 




class Parent{

       int data = 100;

public Parent(int data){

System.out.println("Parent의 기본생성자");

this.data = data;

}

class Parent{

public void print(){

System.out.println("부모임");

}

}

class Child extends Parent{

int data = 200;

public Child(){

super(200);                //부모클래스에 기본생성자가 없다면.

                // 자식 생성자에 숨어있는 super()가 

                //동작X, 명시적으로 매개변수 맞춰서

                //부모 생성자를 호출해줘야됨. 



부모클래스의 private는 접근불가 // protected는 외부에서는 접근불가, 같은패키지와 자식클래스는 접근가능


public class Employee {

public String name;

private int RRN;

protected int salary;

protected int getSalary(){

return salary;

}

protected void setSalary(int salary){

this.salary = salary;

}

}

 public class Manager extends Employee{

private int bonus;

public int getSalary(){              //메소드의 가시성을 증가시키는 것은 가능.

return salary + bonus;   //protected 멤버인 salary는 접근가능.

}

private void setSalary(int salary){

super.salary = salary;        //오류! 메소드의 가시성을 줄이면 안된다.

}

public void serRRN(int rrn){

RRN = rrn;              //오류! private는 서브클래스에서 접근불가.

}

}



키워드 final을 붙이면 상속이나 재정의(@Override)를 할 수 없다.






객체지향에서의 다향성


전제 : 부모클래스의 참조변수로 자식클래스의 객체를 참조할 수 있음(자식클래스의 객체에는 부모클래스로 만든 객체를 포함하닌까)


- 부모클래스의 참조변수로 자식클래스 객체를 참조했을때는 부모클래스의 존재하는 멤버에만 접근가능


- 부모클래스의 참조변수로 자식클래스의 객체를 참조해서 부모클래스에 존재하는 멤버함수 호출 시 자식클래스에서 

해당 메소드를 오버라이딩 했다면 실제 호출되는 함수는 자식에서 오버라이딩한 메소드가 호출됨(동적 바인딩)




public class Shape {

protected int x,y;

public void draw(){

System.out.println("도형을 어떻게 그려 ㅋ");

}

}

 public class Rectangle extends Shape {


private int width, height;


public int getWidth() {

return width;

}


public void setWidth(int width) {

this.width = width;

}


public int getHeight() {

return height;

}


public void setHeight(int height) {

this.height = height;

}


@Override

public void draw() {

System.out.println("사각형을 그립시담.");

}

}

 public class Triangle extends Shape {

private int base, height;


public int getBase() {

return base;

}

public void setBase(int base) {

this.base = base;

}

public int getHeight() {

return height;

}

public void setHeight(int height) {

this.height = height;

}

@Override

public void draw() {

// TODO Auto-generated method stub

System.out.println("삼각형을 그립시닷");

}

}

 public class Circle extends Shape {


private int radius;


public int getRadius() {

return radius;

}

public void setRadius(int radius) {

this.radius = radius;

}

@Override

public void draw() {

System.out.println("원을 그립시당");

}

}


 public class ShapeTest {

public static void main(String[] args) {


// Shape s = new Rectangle();

// //Rectangle이 Shape를 상속받았고

// //Shape가 print()메소드를 정의했으므로 호출가능

// s.print();

//

// //Rectangle에는 setWidth(int) 메소드가 존재하지만

// //부모클래스 참조변수로 참조했을때는 Shape에도 존재하는 멤버만 접근가능

// s.setWidth();

//

// //draw는 Shape가 정의했으므로 접근 가능하고

// //Rectangle이 오버라이딩 했으므모 실제 실행되는 함수는 Rectangle의 draw(동적바인딩)

// s.draw();

Shape[] shape = new Shape[3];

shape[0] = new Rectangle();

shape[1] = new Circle();

shape[2] = new Triangle();

for(int i = 0; i< shape.length; i++ )

shape[i].draw();

}

}


' IOT 기반 응용 SW과정 > Java, Eclipse ' 카테고리의 다른 글

Day15 전략패턴  (0) 2016.04.01
Day 14 형변환 , 추상클래스  (0) 2016.03.31
Day12 변수  (0) 2016.03.29
Day11  (0) 2016.03.28
Day10 public/private  (0) 2016.03.25

+ Recent posts