전체 글
-
[Spring] SOLID 원칙 & Spring카테고리 없음 2024. 10. 4. 21:19
좋은 객체 지향 설계의 5가지 원칙 - SOLIDSRP단일 책임 원칙 (Single Responsibility Principle)OCP개방-폐쇄 원칙 (Open/Closed Principle)LSP리스코프 치환 원칙 (Liskov Substitution Principle)ISP인터페이스 분리 원칙 (Interface Segregation Principle)DIP의존관계 역전 원칙 (Dependency Inversion Principle) SRP (Single Responsibility Principle)한 클래스는 하나의 책임만 가져야 한다.OCP (Open/Closed Principle)소프트웨어 요소는 확장에는 열려 있으나 변경에는 닫혀 있어야 한다.LSP (Liskov Substitution Pr..
-
20241004 34일차카테고리 없음 2024. 10. 4. 09:54
React Hook기본useStateuseEffectuseRefuseParamsuseSearchParamsuseNavigation최적화useContextuseReduceruseMemo----------------------[useContext]- 컴포넌트 트리에서 깊이 중첩된 자식 컴포넌트들로 값을 전달할 때 유용함- props는 하위 컴포넌트로 전달되는 방식이므로 상위 컴포넌트에서 하위 컴포넌트로 불필요한 props를 여러번 전달해야되는 Props drilling이 발생할 수 있음- 전역 상태를 쉽게 관리함const MyContext = React.createContext();function MyComponent() { const value = useContext(MyContext); // MyCon..
-
[Spring] 객체 지향 설계와 스프링카테고리 없음 2024. 10. 3. 22:04
스프링스프링 프레임워크스프링 부트스프링을 편리하게 사용할 수 있도록 지원Tomcat 같은 웹 서버를 내장해서 별도의 웹 서버 설치 필요 Xhttps://start.spring.io/ 에서 바로 설정 가능! 스프링 데이터스프링 데이터 JPA를 많이 사용스프링 세션스프링 시큐리티스프링 Rest DocsAPI 문서화를 편리하게 해줌스프링 배치스프링 데이터 JPA를 많이 사용스프링 클라우드객체 설계시 역할(인터페이스)를 먼저 정하고, 그 역할을 수행하는 구현 객체를 만들자기존 클라이언트에 영향을 주지 않고, 구현체를 무한히 확장함인터페이스를 안정적으로 잘 설계하자!
-
PRG 패턴궁금해!흥미로워! 2024. 10. 2. 15:11
https://gofo-coding.tistory.com/entry/PRG-%ED%8C%A8%ED%84%B4-Post-%E2%86%92-Redirect-%E2%86%92-Get PRG 패턴 : Post → Redirect → Get배경 : 멱등성 동일한 요청을 여러 번 연속해서 보낼 때 한번 보내는 것과 여러 번 연속해서 보내는 것의 결과가 같은 것을 의미한다. GET, HEAD, PUT, DELETE는 멱등성을 가지지만, POST는 멱등성을 가gofo-coding.tistory.com https://programmer93.tistory.com/76 PRG 패턴 (Post-Redirect-Get) - 삽질중인 개발자최근 발생한 이슈 중 중복 결제에 대한 이슈가 있어서 원인을 찾아보는 중에 브라우저에서 ..
-
[Spring] 서비스, 리파지토리카테고리 없음 2024. 9. 26. 23:30
- service: 메서드 이름을 비즈니스스럽게- repository: 메서드 이름을 개발자스럽게!
-
[Spring] 프로젝트 환경설정카테고리 없음 2024. 9. 25. 23:43
Controller에서 return값으로 문자 ({ViewName})를 반환하면 viewResolver가 화면을 찾아서 처리한다.`resources:templates/` + {ViewName} + `.html`hello/hellospring/controller/HelloController.javapackage hello.hellospring.controller;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.GetMapping;@Controllerpublic class HelloController { @GetMap..