개발공부
-
SPA (Single Page Application), MPA(Multiple Page Application)개발공부 2023. 6. 8. 01:25
SPA 란? 제목에 적은 대로, Single Page Application의 약자이다. 단일 페이지로 만들어진 어플리케이션을 뜻한다. 즉, 하나의 HTML 파일을 가지고 자바스크립트를 통해 동적으로 화면을 구상하는것을 의미한다. SPA는 웹 사이트의 규모가 커지면서 웹 페이지에 들어간 자원의 양도 많아지고 이를 매번 전부 로딩하는것이 비효율적이기에 등장하게 되었다. SPA 형식은 서버가 최초 실행시 HTML 파일 등의 정적인 자원을 클라이언트에 보내주고, 이후 데이터가 갱신되어야 할 부분들만 JSON을 통해 해당 부분만 갱신한다. 최초에 다운로드한 정적 리소스는 변경되지 않고 변경되는 부분만을 렌더링함으로서 효율적인 렌더링과 트래픽 감소등의 장점을 가질 수 있는 것이다. 그렇다면 MPA 란? MPA (M..
-
AOP란?개발공부 2023. 6. 4. 21:23
스프링 삼각형 스프링을 이해하는데에는 POJO를 기반으로 스프링 삼각형이라고 불리는 IoC,DI, AOP, PSA 라고하는 스프링의 3대 프로그래밍 모델에 대한 이해가 필요하다. POJO(Plain Old Java Object)를 3가지 유형의 프로그래밍 모델에 맞게 동작하고 설계함으로서 스프링을 객체 지향적인 프레임워크로 동작할수 있게 한다. 이 중 AOP라는건 무엇인가? AOP (Aspect-Oriented Programming), 관점 지향 프로그래밍 DI가 의존성에 대한 주입이라면, AOP는 코드 로직에 대한 주입이라고 할 수 있다. 어떤 웹, 앱, 프로그램 등의 기능을 가정해보자. 금융-은행과 관련된 프로그램에서 입급, 출금, 이체 등 여러가지 기능이 존재할 것이다. 그 여러 기능 모듈에서 공통..
-
JWT(JSON Web Token) 이란개발공부 2023. 5. 31. 00:47
JWT 란? JWT란 인증에 필요한 정보를 암호화한 JSON 토큰을 의미한다. 이를 사용한 인증 방식은 JWT 토큰을 HTTP 헤더에 실어 서버가 클라이언트를 식별하는것을 의미한다. JSON 데이터가 헤더로 전송될 수 있게 * base64 url safe 형식으로 인코딩 한다. 이렇게 JWT를 서버로 전송하여 검증이 완료되면 로그인 등의 처리를 하는 인증방식이다. * base 64는 binary 데이터를 아스키 코드로 바꾸는 인코딩 형식을 의미한다. 근데 이중에서 62,63번째 문자가 +, / 이기 때문에 웹으로 전송하면 정상적으로 전송이 되지 않는 경우가 있다. 이를 -와 _로 바꿔 표현한 것이 url safe 방식이다 base62(+와 /가 아예 빠지는 62진수 표현) 역시 사용 가능하다. 쿠키 / ..
-
SQL Injection이란?개발공부 2023. 5. 31. 00:00
SQL Injection이란, 임의의 SQL문을 주입해 실행되게 함으로서 데이터베이스를 조작하거나 정보를 알아내는 행위를 뜻한다. 클라이언트의 입력값을 조작하여 서버의 데이터베이스를 공격하며, 사용자가 입력한 데이터를 필터링 없이 사용한 경우에 자주 발생한다. SELECT user FROM user_table WHERE id='holimc' AND password='비밀번호'; 예를 들면 위와 같이 로그인을 위해 DB를 조회하는 SQL문이 있다고 치면 SELECT user FROM user_table WHERE id = 'holimc' AND password = ' ' OR '1' ='1'; SELECT user FROM user_table WHERE id = ' ' OR 1=1 --' AND passw..
-
의존성 주입(Dependency Injection)개발공부 2023. 5. 30. 21:09
의존성 주입(Dependency Injection, DI) DI는 의존성 주입, 의존관계 주입이라고 하며, 제어의 역전(IoC)의 방법 중 하나이다. 단어로 풀어서 보면 Dependency(의존 관계)를 생성하는게 아닌 외부에서 Injection(주입) 한다는 것이다. 그렇다면 의존 관계는 무엇이고, 주입한다는건 어떤 의미인가? 의존 어떤 객체가 다른 객체를 생성하거나, 다른 객체의 메서드를 호출하는 행위를 할 때, 다른 객체에 의존한다 라고 한다. 예시를 들자면 interface Tire{ String getBrand(); } public class KoreaTire implements Tire{ public String getBrand(){ return "한국 타이어"; } } public class..
-
안녕하세요개발공부 2023. 5. 30. 18:36
안녕하세요. holimc 입니다. 저는 개발 공부를 할때, 인터넷 강의, 책 등을 보며 공부하며 공부하면서 메모장 텍스트파일에 적어가며 공부를 해왔습니다. 그러다보니 메모장에 정리한걸 찾아보기 불편하고, 메모장에 쓰다보니 제대로 정리하고 이해하며 글을 쓰기보다 편한대로 쓰는 경향이 있게 되어 문제가 있었습니다. 그래서 공개된 장소인 블로그같은 곳에 쓰면 제가 배운걸 좀더 정리해서 글을 쓰게 될것이라 생각하여, 그간 공부한 내용을 옮겨담아 적어보려고 블로그에 공부한것, 문제 해결한 방법을 적어가며 정리하기로 하였습니다. 또한, 블로그를 본 다른분들에게 피드백을 받아가며 공부한걸 좀더 깊게, 혹은 잘못 아는 부분을 다시 고쳐가며 배울 수 있을 것이라 생각하고 있습니다. 아무튼, 옮겨서 쓰는것 외에도 계속해서..