분류 전체보기
-
(스프링 기본) 5 - 객체 지향 설계와 스프링개발/Spring 2024. 10. 2. 23:00
■ 스프링에서 왜 객체 지향 이야기가 나올까?- 스프링은 아래 기술로 다형성 + OCP, DIP 를 가능하게 지원 > DI(Dependency Injection) : 의존관계, 의존성 주입 > DI 컨테이너 제공 : 자바 객체를 컨테이너에 넣고 그 안에서 의존관계를 주입시킴- 클라이언트 코드의 변경 없이 기능 확장- 쉽게 부품 교체하든 개발 가능 ■ 스프링 없었을 때- 좋은 객체 개발을 하려고 OCP, DIP 원칙 지키려고 하다 보니 할 일이 많아짐 > 프레임워크로 만들어버림- 순수 자바 개발을 하면, 결국 스프링 프레임 워크를 만들게 된다. (정확히는 DI 컨테이너) ■ 정리- 모든 설계에 역할과 구현 분리하자ex) 자동차, 공연- 애플리케이션 설계도 공연을 설계 하듯이 배역만 만들어두고, 배우..
-
(스프링 기본) 4 - 좋은 객체 지향 설계 5가지(SOLID)개발/Spring 2024. 10. 2. 22:50
■ SOLID란?: 클린 코드로 유명한 로버트 마틴이 말한 좋은 객체 지향 설계의 5가지 원칙 1. SRP(Single responsibility principle) 단일 책임 원칙- 한 클래스는 하나의 책임만 가져야 한다.- 중요한 기준은 변경으로, 변경이 있을 때 파급 효과가 적으면 단일 책임 원칙을 잘 따른 것ex) UI 변경, 객체의 생성과 사용을 분리 2. OCP(Open/closed principle) 개방-폐쇄 원칙- 소프트웨어 요소는 확장에는 열려 있으나 변경에는 닫혀 있어야 함- 다형성을 활용- 역할과 구현의 분리ex1) 자동차 종류를 k3, 아반떼로 늘려도 자동차라는 역할은 바뀌지 않아 운전자는 차를 움직일 수 있음ex2) 연극의 로미오라는 역할은 다른 사람으로 바뀌어도 계속 사용 가능..
-
(Python) - 4 파이썬 교육개발/Python 2024. 8. 27. 17:43
■ wsl (윈도우에서 리눅스 환경 이용하기) Linux용 Windows 하위 시스템 wsl --list --online : 기본 배포와 다른 유효한 배포 목록 보기wsl --install -d Ubuntu : 우분투 설치하기 ※ 톰캣도 Linux 환경에서 좀 더 잘 돌아간다. ■ 아이리스 sklearn 사용해보기 sklearn 에 있는 기본 iris 데이터 불러오기 데이터는 우리가 분석할 sepal nepal 데이터값이 들어가 있고,target에는 분류값이 들어가 있다. 따라서 분석값은 X 로, 결과값은 y 로 저장해준다. 여기서 우리가 훈련시킬 데이터는 X_train 데이터 그에 해당하는 결과값은 y_train 데이터우리가 테스트 후 예측을 잘 했는지 비교할 데이터는 X_test 데..
-
(Python) - 3 파이썬 교육개발/Python 2024. 8. 26. 12:51
■ numpy 지난 내용 복습하기 ■ pandas 지난 내용 복습하기 df.index : index 정보 나타내기※ 판다스에서 나오는 object 는 객체가 아니라 string 을 의미한다. df 변수에 다시 저장하거나 inplace=True 를 하면 덮어써서 df 가 나온다. ■ plotly axis = 0(행) 아래 방향axis = 1(열) 옆 방향 많이 쓰는 매서드 ■ 주피터 노트로 실습하기 pip.list : 설치된 모듈 보기 findstr + 모듈명 : 모듈 찾아보기 country 컬럼에 해당하는 내용 출력하기 아프가니스탄만 있는지 True False 로 나옴 두 개의 값 있는지 확인하기isin() 함수 또는 18번행 코드 df.query() 사용해도 나온다. 아프가니스..
-
(Python) - 2 파이썬 교육개발/Python 2024. 8. 23. 17:51
■ 내장 라이브러리 * webbrowser * timetime.sleep(1) : 1초 후 실행 ■ 외부 라이브러리 * faker faker 는 가짜 데이터를 만들어주는데 유용하다. ■ 탭 문자를 공백 문자 4개로 만드는 py 모듈 만들기 해당 파일을 복사해서 다음과 같이 파이썬 파일로 만들고 저장해준다. 다음 같은 명령어를 준다. 여기서 src 가 sys.argv[1] 은 a.txt 를 의미한다마찬가지로 dst 는 sys.argv[2] 은 b.txt 를 의미한다 다음과 같이 tab 이 조정된 파일이 만들어진다. ■ vs code 로 실행해보기 해당 방법은 내가 원하는 디렉토리로 바로 코드를 만들 수 있도록 연결해주는 유용한 명령어다 vs 코드로 python 실행도 shift + enter 누..
-
(Python) - 1 파이썬 교육개발/Python 2024. 8. 22. 17:50
■ 코랩 사용하기 * 파일타입 : ipynb (Jupyter Notebook)※ Jupyter Notebook은 대화형 컴퓨팅 환경을 제공하는 오픈 소스 웹 응용 프로그램 Jupyter Notebook은 코드 실행 결과를 텍스트, 그림, 도표 등 다양한 방식으로 표현할 수 있고 코드와 결과를 함께 문서화하는 데 유용 https://colab.research.google.com/ Google Colab colab.research.google.com 코랩을 사용하면 구글 서버 사용이 가능하다. (사지 않고도 사용 가능)shift + enter : 실행하기ctrl + m + b : 다음 블럭에 코드 생성하기 ※ 짓시 (오픈 채팅방)https://meet.jit.si/ Jitsi MeetJoin a Web..
-
(박스몰 프로젝트) 5 - 기능 구상하기 + 고객센터 꾸미기개발/프로젝트 2024. 7. 31. 02:24
우선적으로 진행할 기능에 대한 DB에 필요한 항목을 대략적으로 생각해봤다. ■ DB 구상하기1. 로그인 * 회원 아이디 비밀번호 생년월일 우편주소 - 주소 API 휴대폰번호 이메일 서비스 이용 약관 동의 개인정보 수집 동의 회원등급 ( 개인회원 / 사업자회원 / 관리자) + SNS 간편 회원 가입 (로그인 API) *비회원 제품주문번호 이름 ※ 로그인의 경우 제품 특성상 비회원 주문도 많아, 비회원 주문도 고려한다. 2. Q&A 게시판 (게시판 아이콘화) -> 오늘 했다* 자주 묻는 질문 전체보기 주문/결제 배송문의 취소/반품/교환 상품문의 회원/기타문의 * 공지사항 번호 제목 등록일자 * 고객문의 번호 문의 유형(라디오 버튼) 제목 내용 작성자 비밀번호 * 견적문의※ 항목 생각해야 함 ■ 고객..
-
(박스몰 프로젝트) 4 - 메인 스와이프 + 부트스트랩 아이콘 및 css 적용개발/프로젝트 2024. 7. 30. 01:22
오늘은 간단하게 메인 스와이프 적용하고,부트스트랩 아이콘과 css 먹히는지 확인했다. 1. 메인 스와이프 pixabay에서 기업과 어울리는 이미지를 가져오고,스와이퍼 홈페이지를 통해 적용해 보았다. 적용 도중 사진에 보이는 화살표 표시가 맨 마지막 이미지에서만 위치가 달라졌는데확인해보니 마지막 이미지만 가로 스크롤이 생기는 문제임을 확인했고,이미지별로 크기가 달라서 나타나는 문제였다. 따라서 overflow 를 hidden 을 주어 해결했다. 그리고 기본적으로 Swiper 예시에는 이전 / 다음 / 페이지네이션이 이미지 안에 포함되는 형태가 아니였다.따라서 화면 확대하면 아이콘이 자기들 멋대로 날라다녔다. ㅎ; 해결하기 위해 스와이퍼 컨테이너(큰 영역) 포지션을 relative 처리하고,버튼 포지션..