Code Monkey home page Code Monkey logo

java-movie-3's People

Contributors

cheolhakja avatar

Watchers

 avatar

java-movie-3's Issues

online IDE 프로그래밍 일지

(1.28)

  • Seats클래스를 없앤다. 왜 사용하는지 모르겠다..... ㅠㅠ...
  • MovieScheduleRepositoryInterface 및 구현체 추가
  • repository계층은 데이터베이스에 저장하는 역할만 한다. service계층은 예매 및 스케쥴 추가 등 비즈니스 로직을 처리하는 역할을 한다.
    • 서비스계층부터 만들어야 될 것 같다.
  • MovieReservationServiceInterface 및 구현체 추가

(2.7)

  • MovieScheduleRepository에 static 키워드 추가
  • AsciiInput
  • enum

(2.10)

  • CannotFindSeatException
  • SeatPosition
  • Repository layer throws exception

(2.14)

  • MovieSchedule의 reserve에서 throws CannotReserveException
  • MovieSchedule의 reserve return boolean
    • controller: return movieSchedule.reserve()
  • 예외를 구체적으로: AlreadyReserved
  • MovieReservationService과 MovieSchedule과 Seat클래스에 printSeat()
  • 좌석관리
    • arbitrary number of parameters
  • Seat의 row와 column을 enum으로 바꾸기

(2.15)

  • 테스트를 하고 싶다... service계층 테스트 -> 테스트 스텁 -> 테스트 격리
    • 아 그래서 보통의 경우에는 의존하는 대상을 생성자로 주입받는구나. 의존성 주입의 측면도 있고 테스트를 용이하게 하기 위함도 있을 듯

(2.16)

  • Service계층에서 Seat가 null인지 확인하려면 .을 굉장히 많이 찍어야했음. 도메인 클래스에서 check해도 됨.

할일

  • Seat의 isBooked변수를 booked로 바꾸기
  • Seat에서 reserve()메서드가 isBooked()메서드를 호출하게 바꾸기
  • 커스텀 예외 추가
    • 점프 투 자바 트랜잭션시 예외발생
    • reserve메서드 실행시(트랜잭션시) 예외가 발생하면 아예 처음으로 되돌아간다
    • 클린 코드 try - catch - finally, 클린코드 예외처리??
  • Seat클래스의 reserve메서드의 일부분을 메서드 추출?
  • controller추가
  • if문 리팩토링
  • printSeat 테스트
    • 여러가지 경우들(2행부터 시작하는 경우 등...) 테스트
  • LinkedHashMap의 요소 update문제
  • LinkedHashMap의 동시성 문제
  • 굳이 데이터베이스를 써야하는가? 계속 데이터가 쌓이는 형태가 아닌데? 역대 예매기록
  • 프로젝트의 계층을 나누는 연습을 해본다
    • 일단 실행되게 하고 서서히 바꾸기
    • 단일책임원칙? 최소한의 책임을 갖게 한다. 서비스 계층의 적절한 크기란? reserve(일종의 업데이도서트), addSchedule(일종의 save), print(findAll한다음에 서비스 계층에서 처리)
    • Spring Guide - Service 적절한 크기 가이드
    • 에러가 발생했을 때 sql관련 에러인지 없는 사람을 조회하는 에러인지
    • 토비의 스프링 dao 예외처리
  • 모든 컨트롤러를 총괄하는 상위 컨트롤러
  • 객체를 여러개 만들어도 static쓰면 될것 같다
  • CannotReserveException은 어떻게 처리할 거임? catch를 해야하지 않겠니? 토비님의 스프링 참조하기
  • if() throw ... 를 try - catch로 바꾸기
  • MovieReservationService의 addSchedule을 void에서 id를 반환하도록 바꾸자
  • Ticketing
  • 예매 결과로 MovieTicket을 반환한다
    • ㄴㄴ
  • 불변객체 SeatBooked SeatNotBooked로 만드는 게 좋나요?
  • TicketingService
  • quora: Can we use loops in object-oriented programming OOP?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.