<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>suwon-city-boy.log</title>
        <link>https://velog.io/</link>
        <description>꿈꾸던 내가 될꺼야😃</description>
        <lastBuildDate>Thu, 27 May 2021 07:08:44 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>suwon-city-boy.log</title>
            <url>https://images.velog.io/images/suwon-city-boy/profile/30830c90-a1ab-4650-b474-cc5a4c84f346/social.jpeg</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. suwon-city-boy.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/suwon-city-boy" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[SOLID, 객체지향의 5대 원칙]]></title>
            <link>https://velog.io/@suwon-city-boy/SOLID-%EA%B0%9D%EC%B2%B4%EC%A7%80%ED%96%A5%EC%9D%98-5%EB%8C%80-%EC%9B%90%EC%B9%99</link>
            <guid>https://velog.io/@suwon-city-boy/SOLID-%EA%B0%9D%EC%B2%B4%EC%A7%80%ED%96%A5%EC%9D%98-5%EB%8C%80-%EC%9B%90%EC%B9%99</guid>
            <pubDate>Thu, 27 May 2021 07:08:44 GMT</pubDate>
            <description><![CDATA[<h2 id="solid-원칙이란">SOLID 원칙이란?</h2>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/ff3707e7-3b27-4e81-a4d7-8a132512e11c/%EC%97%89%ED%81%B4%EB%B0%A5.jpg" alt="">
엉클 밥, 로버트 C. 마틴이 말하는 SOLID 원칙은 기원은 다음과 같다.</p>
<blockquote>
<p>SOLID 원칙의 역사는 깊다. 나는 1980년대 후반 유즈넷(과거 버전의 페이스북)에서 다른 사람들과 소프트웨어 설계 원칙에 대해 토론하는 과정에서 이들 원칙을 모으기 시작했다. 시간이 지나면서 원칙은 교체되거나 변경되었다. 사라져 버린 원칙도 있다. 어떤 원칙들은 서로 합쳐졌다. 새롭게 추가된 원칙도 있다. 2000년대 초반 나는 안정화된 최종 버전을 내놓았는데, 이 때 원칙들의 순서는 지금과 달랐다.</p>
<p>2004년 무렵, 마이클 페더스(Michael Feathers)가 이메일 한 통을 보내왔는데, 원칙들을 재배열하면 각 원칙의 첫 번째 글자들로 SOLID라는 단어를 만들 수 있다는 내용이었다. 그렇게 SOLID 원칙이 탄생했다.</p>
</blockquote>
<p>SOLID 원칙이란 객체지향 설계에서 지켜야 할 5개의 원칙(<strong>S</strong>RP, <strong>O</strong>CP, <strong>L</strong>SP, <strong>D</strong>IP, <strong>I</strong>SP)이다.
<br></p>
<h3 id="1----single-responsiblity-principle-단일-책임-원칙">1.    Single Responsiblity Principle (단일 책임 원칙)</h3>
<ul>
<li>소프트웨어의 설계 부품(클래스, 함수 등)은 단 하나의 책임만을 가져야 한다.</li>
</ul>
<p>여기서 책임이란, &#39;기능&#39; 정도의 의미로 해석하면 된다.
설계를 잘한 프로그램은 기본적으로 새로운 요구사항과 프로그램 변경에 영향을 받는 부분이 적다. 다시말해, 응집도는 높고 결합도는 낮은 프로그램을 뜻한다. 만약 한 클래스가 수행할 수 있는 기능, 즉 책임이 많아진다. 책임이 많아지면 클래스 내부의 함수끼리 강한 결합을 발생할 가능성이 높아진다. 이는 유지보수에 비용이 증가하게 되므로 따라서 책임을 분리시킬 필요가 있다.</p>
<blockquote>
<p><strong>응집도</strong>란?
한 프로그램의 요소가 얼마나 뭉쳐있는지, 즉 구성 요소들 사이의 응집력을 말한다.</p>
</blockquote>
<blockquote>
<p><strong>결합도</strong>란?
프로그램 구성 요소들 사이가 얼마나 의존적인지를 말한다.</p>
</blockquote>
<h3 id="2-open-closed-principle-개방-패쇄-원칙">2. Open-Closed Principle (개방-패쇄 원칙)</h3>
<ul>
<li>기존의 코드를 변경하지 않고(Closed) 기능을 수정하거나 추가할 수 있도록(Open) 설계해야 한다.</li>
</ul>
<p>OCP에 만족하는 설계를 할 때 변경되는 것이 무엇인지에 초점을 맞춘다. 자주 변경되는 내용은 수정하기 쉽게 설계 하고, 변경되지 않아야 하는 것은 수정되는 내용에 영향을 받지 않게 하는 것이 포인트다. 이를 위해 자주 사용되는 문법이 인터페이스(Interface)이다.
변경되는 부분을 정의 후 인터페이스로 분리해 개방-패쇄 원칙을 만족시키는 것이다.</p>
<h3 id="3-liskov-substitution-principle-리스코프-치환-원칙">3. Liskov Substitution Principle (리스코프 치환 원칙)</h3>
<ul>
<li>자식 클래스는 부모클래스에서 가능한 행위를 수행할 수 있어야 한다.</li>
</ul>
<p>리스코프 치환 원칙은 MIT 컴퓨터 사이언스 교수인 리스코프가 제안한 설계 원칙이다. 부모 클래스와 자식 클래스 사이의 행위에는 일관성이 있어야 한다는 원칙이며, 이는 객체 지향 프로그래밍에서 부모 클래스의 인스턴스 대신 자식 클래스의 인스터스를 사용해도 문제가 없어야 한다는 것을 의미한다.
상속 관계에서는 일반화 관계(IS-A)가 성립해야 한다. 일반화 관계에 있다는 것은 일관성이 있다는 것이다. 따라서 리스코프 치환 원칙은 일반화 관계에 대해 묻는 것이라 할 수 있다.</p>
<blockquote>
<p><strong>일반화 관계(IS-A)</strong>란?
Is a kind of 관계.
<img src="https://images.velog.io/images/suwon-city-boy/post/65dea18a-1c4e-4ca2-8cd8-4edc43f39134/isa.png" alt=""><br>BMW, 벤츠, 맥라렌, 현대의 각 자동차 모델이 있지만,</p>
</blockquote>
<p>BMW M3 <strong>is kind of</strong> 자동차
벤츠 E class <strong>is kind of</strong> 자동차
현대 소나타 <strong>is kind of</strong> 자동차</p>
<blockquote>
</blockquote>
<p>처럼 하위 클래스들의 공통점을 상위 클래스에서 가지고, 하위 클래스는 상위 클래스의 공통점을 상속 받는 관계</p>
<h3 id="4-dependency-inversion-principle-의존-역전-원칙">4. Dependency Inversion Principle (의존 역전 원칙)</h3>
<ul>
<li>의존 관계를 맺을 때, 변화하기 쉬운것 보단 변화하기 어려운 것에 의존해야 한다는 원칙이다. </li>
</ul>
<p>여기서 말하는 변화하기 쉬운것이란 구체적인 것을 말하고, 변화하기 어려운 것이란 추상적인 것을 말한다. 객체지향적인 관점에서 보자면 변화하기 쉬운것이란 구체화 된 클래스를 의미하고, 변화하기 어려운 것은 추상클래스나 인터페이스를 의미한다. 따라서 DIP를 만족한다는 것은 의존관계를 맺을 때, 구체적인 클래스보다 인터페이스나 추상 클래스와 관계를 맺는다는 것을 의미한다. DIP를 만족하면 &#39;의존성 주입&#39; 이라는 기술로 변화에 유연한 설계를 할 수 있다.</p>
<h3 id="5-interface-segregation-principle-인터페이스-분리-원칙">5. Interface Segregation Principle (인터페이스 분리 원칙)</h3>
<ul>
<li>한 클래스는 자신이 사용하지 않는 인터페이스는 구현하지 말아야 한다. 하나의 일반적인 인터페이스보다는, 여러 개의 구체적인 인터페이스가 낫다.</li>
</ul>
<p>이는 다시 말해서, 자신이 사용하지 않는 기능(인터페이스)에는 영향을 받지 말아야 한다는 의미이다.</p>
<p>한가지 예로. 우리는 스마트폰으로 전화, 웹 서핑, 사진 촬영 등 다양한 기능을 사용할 수 있다. 하지만 전화 기능을 사용할 때는 웹 서핑, 사진 촬영 등 다른 기능은 사용하지 않는다. 따라서 전화 기능과 웹 서핑 기능 사진, 촬영 기능은 각각 독립된 인터페이스로 구현하여, 서로에게 영향을 받지 않도록 설계해야 한다. 인터페이스 분리 원칙을 통해 설계된 소프트웨어는 시스템의 내부 의존성을 약화시켜 리팩토링, 수정, 재배포가 수월해진다. 
<br><br><br></p>
<h2 id="참고">참고</h2>
<ul>
<li><a href="https://dev-momo.tistory.com/entry/SOLID-%EC%9B%90%EC%B9%99">https://dev-momo.tistory.com/entry/SOLID-%EC%9B%90%EC%B9%99</a></li>
<li><a href="https://victorydntmd.tistory.com/291">https://victorydntmd.tistory.com/291</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[JVM의 특징, 구조, 실행과정]]></title>
            <link>https://velog.io/@suwon-city-boy/JVM%EC%9D%98-%ED%8A%B9%EC%A7%95-%EA%B5%AC%EC%A1%B0-%EC%8B%A4%ED%96%89%EA%B3%BC%EC%A0%95</link>
            <guid>https://velog.io/@suwon-city-boy/JVM%EC%9D%98-%ED%8A%B9%EC%A7%95-%EA%B5%AC%EC%A1%B0-%EC%8B%A4%ED%96%89%EA%B3%BC%EC%A0%95</guid>
            <pubDate>Wed, 26 May 2021 07:35:58 GMT</pubDate>
            <description><![CDATA[<h2 id="jvm이란">JVM이란?</h2>
<blockquote>
<p>Write Once, Run Anywhere</p>
</blockquote>
<p>JVM은 Java 가상머신으로서 Java 애플리케이션을 클래스 로더를 통해 읽어들여 Java API와 함께 실행시키는 역할을 한다. JVM의 두가지 중요한 특징이자 역할은 다음과 같다.</p>
<ol>
<li><p>Java와 OS 사이에서 중재자 역할을 수행하며 <strong>CPU나 운영 체제의 종류와 무관하게</strong> 동일하게 동작할 것을 보장한다.</p>
</li>
<li><p>프로그램 <strong>메모리를 관리</strong>하고 <strong>최적화</strong>한다.</p>
</li>
</ol>
<blockquote>
<p><strong>가상머신이란?</strong>
가상 머신(Virtual Machine, VM)은 물리적 하드웨어 시스템에 구축되어 자체 CPU, 메모리, 네트워크 인터페이스 및 스토리지를 갖추고 작동하는 가상 컴퓨터 시스템이다.</p>
</blockquote>
<br>

<h3 id="java-프로그램-실행과정">Java 프로그램 실행과정</h3>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/90bc8cd6-8573-4120-be92-63b867a70998/jvm%EC%8B%A4%ED%96%89%EA%B3%BC%EC%A0%95.jpg" alt=""></p>
<ol>
<li><p>프로그램이 실행되면 JVM은 OS로부터 이 프로그램이 필요로 하는 메모리를 할당받는다. (JVM은 이 메모리를 용도에 따라 여러 영역으로 나누어 관리한다.)</p>
</li>
<li><p>자바 컴파일러(javac)가 자바 소스코드(.java)를 읽어들여 자바 바이트코드(.class)로 변환시킨다.</p>
</li>
<li><p>Class Loader를 통해 class파일들을 JVM으로 로딩한다.</p>
</li>
<li><p>로딩된 class파일들은 Execution engine을 통해 해석된다.</p>
</li>
<li><p>해석된 바이트코드는 Runtime Data Areas에 배치되어 실질적인 수행이 이루어지게 된다.</p>
</li>
<li><p>실행과정 속에서 JVM은 필요에 따라 Thread Synchronization과 GC같은 관리작업을 수행한다.</p>
<br>

</li>
</ol>
<h3 id="jvm-구조">JVM 구조</h3>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/18236f60-dfac-4239-a86c-af892c68b0a8/jvm%20%EA%B5%AC%EC%A1%B0.png" alt="">
<strong>1) 클래스 로더 시스템</strong>
바이트 코드를 읽어오며 메모리에 적절히 배치하는 역할</p>
<ul>
<li>로딩<ul>
<li>.class 를 읽어옴</li>
</ul>
</li>
<li>링크<ul>
<li>코드 내부의 레퍼런스를 연결함</li>
</ul>
</li>
<li>초기화<ul>
<li>클래스에 있는 static 값들을 초기화 함</li>
</ul>
</li>
</ul>
<p><strong>2) 메모리</strong>
 (힙, 메소드)는 전체 공유자원으로 분류되고, (스택, PC, 네이티브 메소드 스택)은 쓰레드 단위의 자원으로 분류된다</p>
<ul>
<li>메소드<ul>
<li>클래스 수준의 정보를 저장</li>
<li>클래스 이름, 부모 클래스 이름, 메소드, 변수 등</li>
<li>static 변수, 일반 변수 등   </li>
</ul>
</li>
<li>힙<ul>
<li>객체(인스턴스) 수준의 정보를 저장</li>
</ul>
</li>
<li>스택<ul>
<li>인스턴스 및 지역 변수의 참조 주소 들을 저장.</li>
<li>쓰레드마다 런타임 스택을 만들고, 스택 프레임(메소드 call)을 쌓음</li>
<li>에러 났을 때, 에러 메시지보면, 런타임 스택에 메시지 쌓여있는걸 확인할 수 있음</li>
</ul>
</li>
<li>PC<ul>
<li>쓰레드마다 가지고 있는 Program Counter</li>
<li>현재 실행할 부분을 가르키고 있다</li>
</ul>
</li>
<li>네이티브 메소드 스택<ul>
<li>네이티브(native) 메소드 호출할 때 사용하는 별도의 스택</li>
<li>네이티브 메소드는 java 가 아닌 c와 같은 언어(low-level) 로 구현된 메소드</li>
</ul>
</li>
</ul>
<p><strong>3) 실행 엔진</strong></p>
<ul>
<li>인터프리터<ul>
<li>바이트 코드를 한줄씩 읽어 네이티브 코드로 변환</li>
</ul>
</li>
<li>JIT (Just In Time) 컴파일러<ul>
<li>바이트 코드에서 반복되는 코드 부분은 JIT 컴파일러가 미리 네이티브 코드로 변환 시켜놓음</li>
<li>반복되는 코드가 읽힐 순서가 왔을 때, 인터프리터로 읽지 않고 바로 네이티브 코드를 바로 사용</li>
<li>인터프리터 읽을 때의 속도 효율성을 JIT 컴파일러가 보완하는 형태</li>
</ul>
</li>
<li>GC (Garbage Collector)<ul>
<li>더 이상 참조되지 않는 객체를 모아서 메모리 정리</li>
<li>경우에 따라 성능 효율을 위해 커스터마이징을 해야함
<br><br><br><br></li>
</ul>
</li>
</ul>
<h2 id="참고">참고</h2>
<ul>
<li><a href="https://ko.wikipedia.org/wiki/%EC%9E%90%EB%B0%94_%EA%B0%80%EC%83%81_%EB%A8%B8%EC%8B%A0">https://ko.wikipedia.org/wiki/%EC%9E%90%EB%B0%94_%EA%B0%80%EC%83%81_%EB%A8%B8%EC%8B%A0</a></li>
<li><a href="https://www.redhat.com/ko/topics/virtualization/what-is-a-virtual-machine">https://www.redhat.com/ko/topics/virtualization/what-is-a-virtual-machine</a></li>
<li><a href="https://dailyheumsi.tistory.com/196">https://dailyheumsi.tistory.com/196</a></li>
<li><a href="https://asfirstalways.tistory.com/158">https://asfirstalways.tistory.com/158</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Maven과 Gradle, 빌드 관리 도구에 대해]]></title>
            <link>https://velog.io/@suwon-city-boy/Maven%EA%B3%BC-Gradle-%EB%B9%8C%EB%93%9C-%EA%B4%80%EB%A6%AC-%EB%8F%84%EA%B5%AC%EC%97%90-%EB%8C%80%ED%95%B4</link>
            <guid>https://velog.io/@suwon-city-boy/Maven%EA%B3%BC-Gradle-%EB%B9%8C%EB%93%9C-%EA%B4%80%EB%A6%AC-%EB%8F%84%EA%B5%AC%EC%97%90-%EB%8C%80%ED%95%B4</guid>
            <pubDate>Tue, 25 May 2021 09:22:36 GMT</pubDate>
            <description><![CDATA[<h2 id="빌드-관리-도구란">빌드 관리 도구란?</h2>
<p><strong>빌드 관리 도구</strong>란 <strong>빌드 자동화</strong>를 수행해 실행가능한 프로그램으로 바꿔주는 도구</p>
<p>그렇다면 <strong>빌드 자동화</strong>란..</p>
<blockquote>
<p>Build automation is the process of automating the creation of a software build and the associated processes including: compiling computer source code into binary code, packaging binary code, and running automated tests. – Wikipedia</p>
</blockquote>
<p>즉, 빌드 자동화란 코드를 컴파일해서 binary code로 만들고, 패키징하고 코드를 테스트하여 실행가능한 프로그램이 나오기 까지의 과정(빌드)을 자동화하는 것
<br></p>
<h2 id="maven이란">Maven이란?</h2>
<ul>
<li>자바용 프로젝트 관리 도구</li>
<li>Apache Ant의 대안으로 만들어진 Apache 라이선스로 배포되는 오픈 소스 소프트웨어</li>
<li>pom.xml을 이용한 정형화된 빌드 시스템 (Providing a uniform build system)</li>
<li>사용할 라이브러리 뿐만 아니라 해당 라이브러리가 작동하는데 필요한 다른 라이브러리들까지 네트워크를 통해 자동으로 다운</li>
<li>뛰어난 프로젝트 정보를 제공    </li>
<li>개발 가이드 라인을 제공</li>
</ul>
<p>정해진 라이프사이클에 의하여 작업을 수행하며, 전반적인 프로젝트 관리 기능도 포함하고 있음</p>
<h3 id="maven----lifecycle">Maven    LifeCycle</h3>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/fde83084-2ce9-46ac-9394-7f0e145337d7/Maven-Life-Cycle.png" alt="">
 ◎ Default(Build) : 일반적인 빌드 프로세스를 위한 모델이다.
 ◎ Clean : 빌드 시 생성되었던 파일들을 삭제하는 단계
 ◎ Validate : 프로젝트가 올바른지 확인하고 필요한 모든 정보를 사용할 수 있는지 확인하는 단계
 ◎ Compile : 프로젝트의 소스코드를 컴파일 하는 단계
 ◎ Test : 유닛(단위) 테스트를 수행 하는 단계(테스트 실패시 빌드 실패로 처리, 스킵 가능)
 ◎ Pacakge : 실제 컴파일된 소스 코드와 리소스들을 jar, war 등등의 파일 등의 배포를 위한 패키지로 만 드는 단계
 ◎ Verify : 통합 테스트 결과에 대한 검사를 실행하여 품질 기준을 충족하는지 확인하는 단계
 ◎ Install : 패키지를 로컬 저장소에 설치하는 단계
 ◎ Site : 프로젝트 문서와 사이트 작성, 생성하는 단계
 ◎ Deploy : 만들어진 package를 원격 저장소에 release 하는 단계
<br></p>
<h2 id="gradle이란">Gradle이란?</h2>
<ul>
<li>오픈소스 기반의 build 자동화 시스템</li>
<li>JVM 기반의 빌드도구로 기존의 Ant와 Maven을 보완</li>
<li>Android OS의 빌드 도구로 채택됨</li>
<li>Maven을 사용할 수 있는 변환 가능 컨벤션 프레임 워크</li>
<li>Maven과 Ivy 레파지토리 완전 지원</li>
<li>Build-by-convention 을 바탕으로 하여 스크립트 규모가 작고 읽기 쉬움</li>
<li>설정 주입 방식 ( Configuration Injection )</li>
<li>멀티 프로젝트의 빌드를 지원하기 위해 설계됨</li>
<li>Groovy 문법 사용<blockquote>
<p><strong>Groovy란?</strong></p>
<ul>
<li>JVM에서 사용되는 스크립트 언어로, 문법이 Java와 매우 유사. 
Java와 호환이 되며 Java 클래스 파일을 그대로 Groovy 클래스 파일로 사용 가능.<br>
</li>
</ul>
</blockquote>
</li>
</ul>
<h2 id="maven-vs-gradle">Maven vs Gradle</h2>
<p>흔히들 Gradle이 대세라고 하지만, 여전히 Maven의 사용률은 Gradle을 앞서고 있으며 구글 트랜드 지수도 Maven이 Gradle을 앞선다. 그럼에도 <strong>Gradle 사용을 고려해야할 이유</strong>들은 다음과 같다.</p>
<ol>
<li><p><strong>속도가 빠르다</strong>
<img src="https://images.velog.io/images/suwon-city-boy/post/8c100754-8a9d-42a4-bb96-ff0767b3ae02/%EB%A9%94%EC%9D%B4%EB%B8%90,%EA%B7%B8%EB%9E%98%EB%93%A4%20%EB%B9%84%EA%B5%90.png" alt="">
<a href="https://gradle.org/maven-vs-gradle/">Gradle에서 직접 제공하는 Gradle과 Maven의 비교문서</a>에 따르면 Gradle은 메이븐보다 최대 100배까지 빠르게 작동한다고 함</p>
</li>
<li><p><strong>Build라는 동적인 요소를 XML로 정의하기에는 어려운 부분이 많다</strong>
•  설정 내용이 길어지고 가독성 떨어짐
•  의존관계가 복잡한 프로젝트 설정하기에 부적절
•  상속구조를 이용한 멀티 모듈 구현
•  특정 설정을 소수의 모듈에서 공유하기 위해서는 부모 프로젝트를 생성하여 상속하게 해야 함</p>
</li>
<li><p><strong>Gradle은 Groovy를 사용하기 때문에, 동적인 빌드는 Groovy 스크립트로 플러그인을 호출하거나 직접 코드를 짜면 된다</strong>
•  Configuration Injection 방식을 사용해서 공통 모듈을 상속해서 사용하는 단점을 커버함
•  설정 주입 시 프로젝트의 조건을 체크할 수 있어서 프로젝트별로 주입되는 설정을 다르게 할 수 있음</p>
<br>

</li>
</ol>
<h2 id="결론">결론</h2>
<p>Gradle이 Maven의 장점을 계승한 점과 시기적으로 늦게 나온 만큼 사용성, 성능 등 비교적 뛰어난 스펙을 가지고 있다. 특히, 속도가 빠르며 Groovy 기반으로 설정이 쉽고, 설정 주입 방식을 사용하여 멀티 프로젝트에 사용하기 좋다. 하지만 메모리를 많이 잡아먹는다는 단점 또한 검색으로 알 수 있었다. </p>
<p>프로젝트의 빌드타임이 비용문제로 이어질 경우 Gradle을 사용해야 할 것 같고, &#39;익숙함&#39;에서 벗어나는 것이 두려워 Gradle 사용을 망설이는 Maven 기반 개발자들도 한번쯤 사용을 고려해볼 가치가 충분하다고 생각한다. </p>
<p>나 또한 개인 프로젝트를 Gradle로 진행하며 쓸데없는 XML 형식을 지키지 않아도 된다는 점에서 굉장히 매력을 느꼈다.
<br><br><br></p>
<h2 id="참고">참고</h2>
<ul>
<li><a href="https://gradle.org/">https://gradle.org/</a></li>
<li><a href="https://bkim.tistory.com/13">https://bkim.tistory.com/13</a></li>
<li><a href="https://goddaehee.tistory.com/199">https://goddaehee.tistory.com/199</a></li>
<li><a href="https://en.wikipedia.org/wiki/Build_automation">https://en.wikipedia.org/wiki/Build_automation</a></li>
<li><a href="https://laptrinhx.com/maven-life-cycle-1301824600/">https://laptrinhx.com/maven-life-cycle-1301824600/</a> (Maven LifeCycle 이미지)</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[웹 서버와 웹 어플리케이션 서버(WAS)]]></title>
            <link>https://velog.io/@suwon-city-boy/%EC%9B%B9-%EC%84%9C%EB%B2%84%EC%99%80-%EC%9B%B9-%EC%96%B4%ED%94%8C%EB%A6%AC%EC%BC%80%EC%9D%B4%EC%85%98-%EC%84%9C%EB%B2%84WAS</link>
            <guid>https://velog.io/@suwon-city-boy/%EC%9B%B9-%EC%84%9C%EB%B2%84%EC%99%80-%EC%9B%B9-%EC%96%B4%ED%94%8C%EB%A6%AC%EC%BC%80%EC%9D%B4%EC%85%98-%EC%84%9C%EB%B2%84WAS</guid>
            <pubDate>Mon, 24 May 2021 07:17:27 GMT</pubDate>
            <description><![CDATA[<h2 id="웹-서버web-server란">웹 서버(Web Server)란?</h2>
<p>작성된 HTML페이지, 이미지 등을 네트워크망에 종속되지 않고, 웹서비스를 할 수 있도록 하는 어플리케이션</p>
<ul>
<li>동적인 데이터를 요청하게 되면 WAS로 요청을 넘겨줌</li>
<li><strong>소프트웨어 관점</strong>에서의 웹 서버 : 웹 브라우저 클라이언트로부터 HTTP요청을 받아, HTML문서 등을 반환하는 컴퓨터 프로그램</li>
<li><strong>하드웨어 관점</strong>에서의 웹 서버 : 위에서 언급한 기능을 제공하는 컴퓨터 프로그램이 설치되고 실행되는 컴퓨터</li>
</ul>
<h3 id="대표적인-웹-서버-프로그램">대표적인 웹 서버 프로그램</h3>
<ul>
<li>Apache</li>
<li>Nginx<br>

</li>
</ul>
<h2 id="웹-어플리케이션-서버was란">웹 어플리케이션 서버(WAS)란?</h2>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/49bafa46-5404-489f-a974-137a533c85fd/image.png" alt="">
동적 컨텐츠를 제공하기 위해 만들어진 애플리케이션 서버(DB조회, 로직 처리가 요구되는 컨텐츠)</p>
<ul>
<li>미들웨어의 한 종류로 JSP, Servlet 구동 환경 제공</li>
<li><strong>웹 서버</strong> + <strong>웹 컨테이너</strong></li>
</ul>
<blockquote>
<p><strong>웹 컨테이너란?</strong>
     - JSP와 서블릿을 실행시킬 수 있는 소프트웨어
    - 컨테이너, 서블릿 컨테이너라고도 함
    - JSP컨테이너가 탑재 되어 있는 WAS는 JSP페이지를 컴파일 해 동적인 페이지를 생성</p>
</blockquote>
<pre><code>EX) 웹 서버에서 JSP를 요청하면 톰캣에서는 JSP파일을 서블릿으로 변환하여 컴파일을 수행하고,
    서블릿 수행결과를 웹서버에게 전달</code></pre><h3 id="제공하는-기능">제공하는 기능</h3>
<p>1)    프로그램 실행 환경, 데이터베이스 접속 기능 제공
2)    여러 개의 트랜잭션을 관리
3)    비즈니스 로직을 수행
4)    Web Service 플랫폼으로서의 역할</p>
<h3 id="대표적인-was-프로그램">대표적인 WAS 프로그램</h3>
<ul>
<li>Tomcat : 아파치 재단에서 관리하는 WAS</li>
<li>Jetty : 이글립스 재단에서 관리</li>
<li>WebLogic : 오라클에서 관리하는 WAS</li>
<li>JBoss : 레드햇에서 관리하는 WAS</li>
<li>Jeus : 국내 회사인 티맥스소프트에서 관리하는 WAS<br>

</li>
</ul>
<h2 id="웹-서버와-was의-구성에-따른-분류">웹 서버와 WAS의 구성에 따른 분류</h2>
<h3 id="웹-사이트의-가장-기본적인-구성-환경">웹 사이트의 가장 기본적인 구성 환경</h3>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/a406a6be-a1f7-474e-9601-29a729c50f15/1.png" alt=""></p>
<ul>
<li>모든 콘텐츠를 한 곳에 집중시켜 웹 서버와 WAS의 역할을 동시에 수행</li>
<li>사용자 증가시 스위치 장비를 통해 로드 밸런싱 수행</li>
<li>최적화 측면에서 바람직하지 못함</li>
<li>사용자와 트래픽이 적을 때 효율적</li>
</ul>
<h3 id="기능적-분류를-통해-효과적인-분산을-유도한-형태">기능적 분류를 통해 효과적인 분산을 유도한 형태</h3>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/e8bcd146-a5ad-4856-a5e9-2940e624c7f8/2.jpg" alt=""></p>
<ul>
<li>정적인 데이터는 웹 서버에서, 동적인 데이터는 WAS가 처리</li>
<li>웹 서버에서 처리할 것과 WAS에서 처리할 것을 판단하는 건 웹 서버 단의 Configuration을 통해 처리</li>
</ul>
<h3 id="특정-기능에-대한-서버를-별도로-두고-있는-형태">특정 기능에 대한 서버를 별도로 두고 있는 형태</h3>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/e92de98c-2cc2-4c70-8965-6df95d1555cb/3.jpg" alt=""></p>
<ul>
<li>웹 페이지에서 이미지 비중이 증가하고, 이미지들이 전체 네트워크 비중의 상당부분을 차지</li>
<li>이미지 서버를 따로 구성해 웹 서버와 WAS를 좀 더 효과적으로 사용할 수 있는 구조</li>
<li>특정 컨텐츠에 집중적인 요청을 받는 경우에도 유용한 구조<blockquote>
<p>EX) 대학 입시 시즌 경쟁률 조회는 엄청난 트래픽이 발생하고 Reload 또한 빈번하게 일어난다. 이럴 경우 특정시간 간격으로 HTML을 생성하고, 페이지를 특성 서버에 위치시켜 부하를 분산시킬 수 있다.</p>
</blockquote>
</li>
</ul>
<h3 id="was단을-logic으로-구분하여-구성한-형태">WAS단을 Logic으로 구분하여 구성한 형태</h3>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/f5268514-d827-47d5-aa53-9a9f55ca6c62/4.jpg" alt=""></p>
<ul>
<li>WAS단의 프로그램이 많은 비중을 차지하는 경우, 프레젠테이션 로직과 비즈니스 로직을 담당하는 프로그램을 구분하는 구성</li>
<li>구조가 복잡해지지만, 특성 로직 부분의 부하에 따른 대응이 가능하다는 장점이 있음
<br><br><br></li>
</ul>
<h2 id="참고">참고</h2>
<p><a href="https://helloworld-88.tistory.com/71">https://helloworld-88.tistory.com/71</a>
<a href="https://hoon-k.tistory.com/5">https://hoon-k.tistory.com/5</a>
<a href="https://blog.daum.net/hopcount/8658571">https://blog.daum.net/hopcount/8658571</a>
<a href="https://opentutorials.org/course/3084/18892">https://opentutorials.org/course/3084/18892</a> (썸네일 이미지)</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[템플릿 엔진(Template Engine)이란?]]></title>
            <link>https://velog.io/@suwon-city-boy/%ED%85%9C%ED%94%8C%EB%A6%BF-%EC%97%94%EC%A7%84Template-Engine%EC%9D%B4%EB%9E%80</link>
            <guid>https://velog.io/@suwon-city-boy/%ED%85%9C%ED%94%8C%EB%A6%BF-%EC%97%94%EC%A7%84Template-Engine%EC%9D%B4%EB%9E%80</guid>
            <pubDate>Fri, 14 May 2021 12:22:37 GMT</pubDate>
            <description><![CDATA[<h3 id="참고-및-이미지-출처">참고 및 이미지 출처</h3>
<ul>
<li><a href="https://gmlwjd9405.github.io/2018/12/21/template-engine.html">https://gmlwjd9405.github.io/2018/12/21/template-engine.html</a></li>
<li><a href="https://dlgkstjq623.tistory.com/304?category=786635">https://dlgkstjq623.tistory.com/304?category=786635</a></li>
<li><a href="https://refactoring.guru">https://refactoring.guru</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[스프링(Spring)과 스프링 부트(Spring Boot)의 차이]]></title>
            <link>https://velog.io/@suwon-city-boy/%EC%8A%A4%ED%94%84%EB%A7%81%EA%B3%BC-%EC%8A%A4%ED%94%84%EB%A7%81%EB%B6%80%ED%8A%B8%EC%9D%98-%EC%B0%A8%EC%9D%B4</link>
            <guid>https://velog.io/@suwon-city-boy/%EC%8A%A4%ED%94%84%EB%A7%81%EA%B3%BC-%EC%8A%A4%ED%94%84%EB%A7%81%EB%B6%80%ED%8A%B8%EC%9D%98-%EC%B0%A8%EC%9D%B4</guid>
            <pubDate>Sat, 08 May 2021 09:16:41 GMT</pubDate>
            <description><![CDATA[<h2 id="스프링-부트spring-boot란">스프링 부트(Spring Boot)란?</h2>
<p>스프링 부트 공식 문서에서는 아래와 같이 설명함</p>
<blockquote>
<p>Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can &quot;just run&quot;. We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need minimal Spring configuration.</p>
<p>&quot;Spring Boot는 단독 실행되는, 상용화 가능한 수준의 스프링 기반 애플리케이션을 쉽게 만들어 낼 수 있습니다. <strong>최소한의 설정</strong>으로 스프링 플랫폼과 서드파티 라이브러리들을 사용할 수 있도록 하고 있습니다.&quot;</p>
</blockquote>
<p>즉, <strong>스프링 기반 애플리케이션</strong>을 <strong>쉽게</strong> 만들도록 도와줌</p>
<br>

<h2 id="스프링-부트spring-boot의-특징">스프링 부트(Spring Boot)의 특징</h2>
<h3 id="auto-configuration자동-설정">Auto Configuration(자동 설정)</h3>
<blockquote>
<p>Automatic config for spring functionality</p>
</blockquote>
<p>&quot;스프링 기능을 위한 자동 설정을 지원한다.&quot;</p>
<blockquote>
<p>Enable auto-configuration of the Spring Application Context, attempting to guess and configure beans that you are likely to need. Auto-configuration classes are usually applied based on your classpath and what beans you have defined. </p>
</blockquote>
<p>&quot;당신이 필요할 것 같은 빈들을 추측하고 설정하여 스프링 application context의 auto-configuration을 가능하게 한다. auto-configuration 클래스들은 대게 classpath와 당신이 정의한 빈을 바탕으로 적용된다. &quot;</p>
<h4 id="자동-설정-관련-어노테이션">자동 설정 관련 어노테이션</h4>
<table>
<thead>
<tr>
<th>이름</th>
<th>역할</th>
</tr>
</thead>
<tbody><tr>
<td><strong>@SpringBootConfiguration</strong></td>
<td>Spring boot의 설정을 나타내는 어노테이션으로, Spring의 @Configuration을 대체</td>
</tr>
<tr>
<td><strong>@EnableAutoConfiguration</strong></td>
<td>자동 설정의 핵심 어노테이션으로, 클래스 경로에 지정된 내용을 기반으로 설정 자동화를 수행</td>
</tr>
<tr>
<td><strong>@ComponentScan</strong></td>
<td>basePackages 프로퍼티 값에 별도의 경로를 설정하지 않으면 해당 어노테이션이 위치한 패키지가 루트 경로가 되어 빈으로 등록할 클래스들을 탐색</td>
</tr>
</tbody></table>
<h4 id="spring-boot가-bean을-등록하는-과정">Spring Boot가 Bean을 등록하는 과정</h4>
<p><strong>1. @ComponentScan</strong></p>
<ul>
<li>Spring과 마찬가지로 component-scan을 통해 component를 찾고 bean 생성을 진행
이 과정에서 우리가 설정한 bean들이 생성됨</li>
<li>@component 어노테이션을 선언한 클래스들(Controller, RestController, Service, Repository, @Configuration에 등록한 @Bean 등)</li>
</ul>
<p><strong>2. @EnableAutoConfiguration</strong></p>
<ul>
<li>@EnableAutoConfiguration으로 추가적인 Bean들을 읽어서 등록</li>
<li>메인 클래스(@SpringBootApplication)를 실행하면, @EnableAutoConfiguration에 의해 spring.factories 안에 들어있는 수많은 자동 설정들이 조건에 따라 적용이 되어 수많은 Bean이 생성, 스프링 부트 애플리케이션이 실행</li>
</ul>
<p>즉, <strong>@EnableAutoConfiguration</strong>에 의해 <strong>spring.factories</strong> 안에 들어있는 수많은 <strong>자동 설정들이 조건에 따라 적용</strong>이 되어 수 많은 <strong>Bean이 생성</strong>되고, <strong>자동 설정</strong>이 되는 것</p>
<h4 id="bean의-등록과-자동-설정에-필요한-파일">Bean의 등록과 자동 설정에 필요한 파일</h4>
<ul>
<li>모두 Spring-boot-AutoConfiguration에 미리 정의되어 있음</li>
<li>지정된 프로퍼티 값을 사용하여 설정 클래스 내부의 값들을 변경 가능</li>
</ul>
<table>
<thead>
<tr>
<th>이름</th>
<th>역할</th>
</tr>
</thead>
<tbody><tr>
<td><strong>META-INF/spring.factories</strong></td>
<td>자동 설정 타깃 클래스 목록, 이곳에 선언된 클래스들이 @EnableAutoConfiguration 사용 시 자동 설정 타깃이 됨</td>
</tr>
<tr>
<td><strong>META-INF/spring-configuration-metadata.json</strong></td>
<td>자동 설정에 사용할 프로퍼티 정의 파일. 미리 구현되어 있는 자동 설정에 프로퍼티만 주입해주면 됨. 별도의 환경설정 필요 없음</td>
</tr>
<tr>
<td><strong>org/springframework/boot/autoconfigure</strong></td>
<td>미리 구현해놓은 자동 설정 리스트. 이름은 &#39;{특정 설정의 이름}AutoConfiguration&#39; 형식으로 지정되어 있으며 모두 자바 설정 방식을 따르고 있음</td>
</tr>
</tbody></table>
<pre><code>※ Spring을 사용했다면 수많은 bean과 설정 파일을 개발자가 직접 하나하나 등록해줘야 함</code></pre><br>

<h3 id="easy-dependency-management쉬운-의존성-관리">Easy dependency Management(쉬운 의존성 관리)</h3>
<p><strong>(1) Spring-boot-starter</strong></p>
<p>웹 어플리케이션을 개발할 때 spring-web, spring-webmvc, jackson-databind 등과 같은 의존성이 필요함. 즉, Spring으로 웹 어플리케이션 개발 시 위와 같은 의존성들을 일일이 찾고, 호환되는 버전에 맞춰 의존성을 추가하는 번거로움이 존재. Spring Boot는 이런 번거로움을 줄이기 위해 Spring boot Starter라고 불리는 것을 도입. 
<img src="https://images.velog.io/images/suwon-city-boy/post/0588c78a-f783-48ea-a82c-152513eb6e17/starter.PNG" alt="">
starter-web은 spring-web, spring-webmvc, jackson-databind로 이루어져 있고, 의존성에 spring-boot-starter-web만 적어주면 web과 관련된 의존성들을 추가할 수 있음</p>
<p><strong>(2) io.spring.dependency-management</strong></p>
<p>스프링부트의 의존성을 관리해주는 플러그인, dependency manager가 관리하는 프로젝트들은 알아서 버전 관리를 해줌. 따라서 build 설정에 dependency에 대한 버전을 명시할 필요가 없음. Spring Boot 자체를 업그레이드하면 하위 종속성들도 일관된 방식으로 업그레이드됨. (직접 버전을 명시하는 경우 해당 버전으로 오버라이딩)
<img src="https://images.velog.io/images/suwon-city-boy/post/4fcc5661-e679-49f8-8fdf-5ced6882290e/%EC%89%AC%EC%9A%B4%20%EC%9D%98%EC%A1%B4%EC%84%B1%20%EA%B4%80%EB%A6%AC.PNG" alt="">
즉, Spring Boot의 <strong>dependency-management</strong>를 이용하여 <strong>단 한 줄로 수많은 프로젝트의 버전을 충돌 없이 관리</strong>할 수 있게 됨</p>
<br>

<h3 id="embedded-servlet-container-support내장-서블릿-컨테이너--내장-서버">Embedded Servlet Container Support(내장 서블릿 컨테이너) = 내장 서버</h3>
<blockquote>
<p>Not War, Just Jar</p>
</blockquote>
<ul>
<li><strong>Spring을 이용한 프로젝트</strong> : WAR(Web application ARchive)파일로 배포할 수 있음</li>
</ul>
<blockquote>
<p><strong>WAR란?</strong></p>
</blockquote>
<ul>
<li>웹 애플리케이션을 압축해 저장해놓은 파일 </li>
<li>Tomcat과 같은 WAS에서 돌아감</li>
<li>단독으로 실행은 불가하며 서버 컨테이너(was)에 의해 실행되어야 하므로 배포디스크립터(web.xml)가 담겨있음</li>
<li>실행 조건 : Spring으로 개발한 프로젝트를 배포하기 위해서는 WAR 파일과 WAS가 필요</li>
<li>-&gt; 그렇기에, WAS 설정이 필요함</li>
</ul>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/6ed71a15-91aa-4625-895a-50b5eee88ae2/warjar.png" alt=""></p>
<ul>
<li><strong>Spring Boot를 이용한 프로젝트</strong> : 스프링 부트 내부에 Tomcat이나 Jetty같은 내장 서버를 가지고 있기 때문에 JAR파일로 배포가능, Spring Boot로 개발한 프로젝트를 배포하기 위해서는 단순히 JAR파일만 필요 </li>
</ul>
<blockquote>
<p><strong>JAR란?</strong></p>
</blockquote>
<ul>
<li>Java ARchive</li>
<li>하나의 Application 기능이 가능하도록 java 파일을 압축하고 지원</li>
<li>엔터프라이즈 Java Bean(클래스 파일)과 EJB 전개 디스크립터를 포함한 EJB 모듈은 .jar 확장을 사용하여 JAR 파일로 압축</li>
<li>실행 조건 : Java 설치</li>
</ul>
<p>즉, 스프링 부트가 Tomcat을 내장하면서, Servlet Container에 종속되던 Web Application의 문제를 해결하였음</p>
<p><br><br></p>
<h2 id="참고">참고</h2>
<ul>
<li><a href="https://ssoco.tistory.com/66">https://ssoco.tistory.com/66</a></li>
<li><a href="https://gptjs409.github.io/java/2019/08/06/war-jar.html">https://gptjs409.github.io/java/2019/08/06/war-jar.html</a></li>
<li><a href="https://programmer93.tistory.com/40">https://programmer93.tistory.com/40</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[스프링(Spring Framework)이란?]]></title>
            <link>https://velog.io/@suwon-city-boy/%EC%8A%A4%ED%94%84%EB%A7%81%EC%9D%B4%EB%9E%80</link>
            <guid>https://velog.io/@suwon-city-boy/%EC%8A%A4%ED%94%84%EB%A7%81%EC%9D%B4%EB%9E%80</guid>
            <pubDate>Fri, 07 May 2021 09:44:23 GMT</pubDate>
            <description><![CDATA[<h2 id="스프링spring-framework">스프링(Spring Framework)</h2>
<ul>
<li>자바 플랫폼을 위한 오픈소스 애플리케이션 프레임워크</li>
<li>엔터프라이즈급 애플리케이션을 개발하기 위한 기능을 종합적으로 제공하는 경량화된 솔루션</li>
</ul>
<blockquote>
<p><strong>엔터프라이즈급이란?</strong>
＞ 대규모 데이터 처리와 트랜잭션이 동시에 여러 사용자로 부터 행해지는 매우 큰 규모의 환경</p>
</blockquote>
<ul>
<li>POJO 기반의 Enterprise Application 개발을 쉽고 편하게 할 수 있도록 함</li>
</ul>
<blockquote>
<p><strong>POJO(Plain Old Java Object)란?</strong>
＞ 이전의 자바는 EJB를 거치면서 무겁기도 하고 특정 환경에 종속되는 등 자바다움을 잃어가기 시작
＞ 상속, 인터페이스가 필요없는, 속성과 기능만 있는 아주 단순하고 가벼운 객체를 의미
＞ POJO는 gettet/setter를 가진 단순 자바 오브젝트로 정의
＞ 장점 : 의존성이 없고 추후 테스트 및 유지보수가 편리함</p>
</blockquote>
<ul>
<li>Java Application을 개발하는데 필요한 하부구조(Infrastructure)를 포괄적으로 제공</li>
<li>Spring이 하부구조를 처리하기 때문에 개발자는 Application 개발에 집중할 수 있음</li>
<li>동적 웹 사이트를 개발하기 위한 여러 가지 서비스를 제공</li>
<li>전자 정부 표준 프레임워크의 기반 기술</li>
</ul>
<br>

<h2 id="스프링spring-framework의-주요-특징">스프링(Spring Framework)의 주요 특징</h2>
<h3 id="iocinversion-of-control">IOC(Inversion of Control)</h3>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/8a7575e5-05cc-4e0a-9ef8-47f5e19e9f6a/IOC.png" alt=""></p>
<ul>
<li>제어의 역전</li>
</ul>
<p><strong>일반적인 프로그램에서는..</strong></p>
<ul>
<li>객체 결정 및 생성 -&gt; 의존성 객체 생성 -&gt; 객채 내의 메소드 호출 -&gt; (반복)</li>
<li>각 객체들이 프로그램의 흐름을 결정하고 각 객체를 구성하는 작업에 직접적으로 참여</li>
<li>즉, 모든 작업을 사용자가 제어하는 구조  </li>
</ul>
<p><strong>반면 IOC는..</strong></p>
<ul>
<li><p>모든 권한을 다른 대상에 위임함으로써 제어 권한을 위임받은 특별한 객체에 의해 결정되고 만들어짐</p>
</li>
<li><p>즉, 제어의 흐름을 사용자가 컨트롤 하지 않고 권한을 위임한 특별한 객체에 모든 것을 맡기는 구조</p>
</li>
<li><p>IOC의 구성요소 : DI(Dependency Lookup, 의존성 검색), DL</p>
<ul>
<li><strong>DL(Dependency Lookup, 의존성 검색)</strong>
컨테이너에서는 객체들을 관리하기 위해 별도의 저장소에 Bean을 저장하는데 저장소에 저장되어 있는 컨테이너에서 제공하는 API 를 이용하여 사용하고자 하는 Bean을 검색하는 방법</li>
</ul>
</li>
<li><p><strong>DI(Dependency Injection, 의존성 주입)</strong>
의존성 주입이란 객체가 서로 의존하는 관계가 되게 의존성을 주입하는 것
객체지향 프로그램에서 의존성 이란 하나의 객체가 어떠한 다른 객체를 사용하고 있음을 의미
각 클래스(POJO 객체들) 사이에 필요로 하는 의존 관계를 Bean 설정 정보를 바탕으로 컨테이너가 자동으로 연결해 주는 것</p>
</li>
</ul>
<br>

<h3 id="aopaspect-orientated-programming">AOP(Aspect Orientated Programming)</h3>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/ed7d0f05-6348-485b-8df6-3ab4c9907e36/AOP.jpg" alt=""></p>
<ul>
<li>관점 중심 프로그래밍</li>
<li>흩어진 Aspect 를 모듈화 할 수 있는 프로그래밍 기법</li>
<li>여러 곳에서 쓰이는 공통 기능을 모듈화하고, 쓰이는 곳에 필요할 때 연결함으로써, 유지 보수 혹은 재사용에 용이하도록 프로그래밍 하는 것</li>
</ul>
<p><strong>OOP에서는..</strong></p>
<ul>
<li>객체지향 원칙에 따라 관심사가 같은 데이터를 한곳에 모아 분리, 낮은 결합도를 갖게 해 독립적이고 유연한 모듈로 캡슐화를 함</li>
<li>이러한 과정 중 중복된 코드들이 많아지고 가독성, 확장성, 유지 보수성을 떨어뜨림</li>
</ul>
<p><strong>AOP에서는..</strong></p>
<ul>
<li>핵심기능과 공통기능을 분리시켜 핵심 로직에 영향을 끼치지 않게 공통기능을 끼워 넣는 개발 형태</li>
<li>무분별하게 중복되는 코드를 한 곳에 모아 공통기능을 한 곳에 보관함으로써 공통 기능 하나의 수정으로 모든 핵심기능들의 공통기능을 수정 할 수 있어 효율적인 유지보수 가능 및 재활용성이 극대화</li>
</ul>
<br>

<h3 id="portable-service-abstraction">Portable Service Abstraction</h3>
<p>이식 가능한 서비스 추상화
완성도가 높은 라이브러리와 연결할 수 있는 인터페이스 제공
다른 프레임워크들과의 통합 지원</p>
<br>

<h3 id="mvcmodel2">MVC(Model2)</h3>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/43e5b798-cbc9-486e-93db-587c690b512f/MVC.png" alt=""></p>
<p>Model-View-Controller 구조로 사용자 인터페이스와 비지니스 로직을 분리하여 개발 하는 것
Model1과 Model2로 나누어져 있으며, 일반적인 MVC는 Model2를 지칭</p>
<br>

<h2 id="스프링spring-framework의-구조">스프링(Spring Framework)의 구조</h2>
<p><img src="https://images.velog.io/images/suwon-city-boy/post/9d757263-530b-4b5a-aa03-44afacfe99e9/%EC%8A%A4%ED%94%84%EB%A7%81%20%EA%B5%AC%EC%A1%B0.png" alt=""></p>
<h3 id="spring-core">Spring Core</h3>
<p>Spring Core는 Spring Container 의미
Container는 Spring Framework의 핵심이며 그중 핵심은 Bean Factory Container
Bean Factory는 IOC패턴을 적용하여 객체 구성 부터 의존성 처리까지 모든 일을 담당하는 역할</p>
<h3 id="spring-context">Spring Context</h3>
<p>Spring Framework의 Context 정보들을 제공하는 설정 파일
Spring Context는 JNDI, EJB, Validation, Scheduiling, Internaliztaion 등 엔터프라이즈 서비스들을 포함하고 있음</p>
<h3 id="spring-aop">Spring AOP</h3>
<p>Spring Framework에서 관점지향 프로그래밍을 할 수 있고, AOP를 적용 할수 있게 도와주는 Module</p>
<h3 id="spring-dao">Spring DAO</h3>
<p>Data Access Object
Database Data에 접근하는 객체
Spring JDBC DAO는 추상 레이어 지원</p>
<h3 id="spring-orm">Spring ORM</h3>
<p>Object Relational Mapping
간단하게 객체와의 관계 설정을 하는 것
Spring에서 Ibatis, Hibernate 등 인기 있는 객체 관계형 도구를 사용할 수 있도록 지원</p>
<h3 id="spring-web">Spring Web</h3>
<p>Application Module에 내장되어 있음
Web 기반 응용 프로그램에 대한 Context를 제공, 일반적인 Web Application 개발에 필요한 기본적인 기능을 지원</p>
<h3 id="spring-mvc">Spring MVC</h3>
<p>Model2 구조로 Apllication을 만들 수 있도록 지원
웹 응용 프로그램을 작성하기 위한 완전한 기능을 갖춘 MVC를 구현
전략 인터페이스를 통해 고급 구성 가능하며 JSP, Velocity, Tiles, iText 및 POI를 포함한 수많은 뷰 기술을 지원</p>
<br>

<h2 id="참고">참고</h2>
<ul>
<li><a href="https://khj93.tistory.com/entry/Spring-Spring-Framework%EB%9E%80-%EA%B8%B0%EB%B3%B8-%EA%B0%9C%EB%85%90-%ED%95%B5%EC%8B%AC-%EC%A0%95%EB%A6%AC">https://khj93.tistory.com/entry/Spring-Spring-Framework%EB%9E%80-%EA%B8%B0%EB%B3%B8-%EA%B0%9C%EB%85%90-%ED%95%B5%EC%8B%AC-%EC%A0%95%EB%A6%AC</a></li>
<li><a href="https://ko.wikipedia.org/wiki/%EC%8A%A4%ED%94%84%EB%A7%81_%ED%94%84%EB%A0%88%EC%9E%84%EC%9B%8C%ED%81%AC">https://ko.wikipedia.org/wiki/%EC%8A%A4%ED%94%84%EB%A7%81_%ED%94%84%EB%A0%88%EC%9E%84%EC%9B%8C%ED%81%AC</a></li>
<li><a href="https://shlee0882.tistory.com/201">https://shlee0882.tistory.com/201</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[月刊 金成奎] 2021년 5월]]></title>
            <link>https://velog.io/@suwon-city-boy/%E6%9C%88%E5%88%8A-%E9%87%91%E6%88%90%E5%A5%8E-2021%EB%85%84-5%EC%9B%94</link>
            <guid>https://velog.io/@suwon-city-boy/%E6%9C%88%E5%88%8A-%E9%87%91%E6%88%90%E5%A5%8E-2021%EB%85%84-5%EC%9B%94</guid>
            <pubDate>Fri, 30 Apr 2021 06:36:36 GMT</pubDate>
            <description><![CDATA[<hr>
<ul>
<li><span style="color: red">운전면허 취득하기 🚗</span></li>
<li><span style="color: red">[챌린저스] 9시 기상 챌린지 85%이상으로 완료 👍🏻 </span></li>
<li><span style="color: Orange">[온라인 강의] &#39;it 취업을 위한 알고리즘 문제풀이 (with C/C++) : 코딩테스트 대비&#39; 완강 👨🏻‍💻 </span></li>
<li><span style="color: Green">프로젝트 기술서 작성 📝 </span></li>
<li><span style="color: Green">블로그에 게시글 꾸준히 작성 📖</span></li>
<li><span style="color: Green">입사 지원 📑 </span></li>
<li><span style="color: Green">맨몸 운동 주 3회 🏋🏻‍♂️ </span></li>
<li><span style="color: Orange">Sunday Runday 🏃🏻‍♂️ </span></li>
</ul>
<hr>
<h3 id="운전면허-취득하기">운전면허 취득하기</h3>
<ul>
<li>학원 등록하여 기능, 도로주행 시험 통과하기 </li>
<li><strong>6월에는 꼭 따는 걸로...</strong><br>

</li>
</ul>
<h3 id="챌린저스-9시-기상-챌린지-85이상으로-완료">[챌린저스] 9시 기상 챌린지 85%이상으로 완료</h3>
<ul>
<li>취준 기간이 길어지며 불규칙적인 생활습관이 생겼음</li>
<li>평일 아침 9시 기상 챌린지를 통해 좋은 습관 기르기</li>
<li>100% 환급 기준인 85%이상 인증이 목표</li>
<li>효과가 좋다면 8시 기상 챌린지 도전도 고려해보기
<img src="https://images.velog.io/images/suwon-city-boy/post/5b42f57c-6e77-4ecb-b277-8b1d80f343b3/%EC%B1%8C%EB%A6%B0%EC%A0%80%EC%8A%A4.jpg" alt=""></li>
<li><strong>두번 시도를 했지만 두번 다 아쉽게 실패하였다. 사실 인증하고 다시 잔날도 많아서 여러모로 대실패. 제일 시급한 문제인 만큼 6월에는 자체 챌린지로 재도전 해봐야겠다.</strong><br>

</li>
</ul>
<h3 id="온라인-강의-it-취업을-위한-알고리즘-문제풀이-with-cc--코딩테스트-대비-완강">[온라인 강의] &#39;it 취업을 위한 알고리즘 문제풀이 (with C/C++) : 코딩테스트 대비&#39; 완강</h3>
<ul>
<li>혼자 준비하다보면 어떤 카테고리의 알고리즘을 학습해야할지, 어떤 문제를 풀어야할지 감이 안잡히는 것 같아 온라인 강의를 신청</li>
<li>완강 및 문제 풀이 후 Github 커밋이 목표</li>
</ul>
<p><strong>- 기초 구현력 기르기 부분은 다 들었으나, bfs/dfs, dp등의 후반 응용 과정을 놓쳤다. 서류 지원 기간이 마무리되어가니 다시 비중을 크게 두고 단기간에 끝내는 게 목표.</strong>
<br></p>
<h3 id="프로젝트-기술서-작성">프로젝트 기술서 작성</h3>
<ul>
<li>노션을 활용해 만든 온라인 포트폴리오가 있지만 파일 형태로 된 프로젝트 기술서, 포트폴리오를 요구하는 기업이 많기에 프로젝트 기술서 작성이 필요함</li>
<li>전 회사에서 진행한 4개의 프로젝트, 개인 프로젝트 2가지 기술</li>
<li>작성한 기술서 기반으로 기술면접 시 프로젝트 경험 답변에 활용할 수 있도록 준비하면 좋을 듯<br>

</li>
</ul>
<h3 id="블로그에-게시글-꾸준히-작성">블로그에 게시글 꾸준히 작성</h3>
<ul>
<li>공부하며 알게 된 내용, 자주 까먹는 내용 기록하기<blockquote>
<p><a href="https://velog.io/@suwon-city-boy/series/Web">https://velog.io/@suwon-city-boy/series/Web</a>
<a href="https://velog.io/@suwon-city-boy/series/Spring">https://velog.io/@suwon-city-boy/series/Spring</a>
<a href="https://velog.io/@suwon-city-boy/series/Design-Pattern">https://velog.io/@suwon-city-boy/series/Design-Pattern</a></p>
</blockquote>
</li>
</ul>
<p><strong>결과 : WEB 기반 기술, Spring, Design Pattern 관련하여 새로운 시리즈를 만들고 글을 업로드 하였다.</strong>
<br></p>
<h3 id="입사-지원">입사 지원</h3>
<ul>
<li><strong>삼성 SSAFY, LG CNS, 동원그룹, 웍스모바일, 한국투자증권 등에 지원하였다.</strong><br>

</li>
</ul>
<h3 id="맨몸-운동-주-3회">맨몸 운동 주 3회</h3>
<ul>
<li>주 3회 분할 없이 자유롭게 하는 것이 목표 💪🏻</li>
<li>&quot;죄수 운동법&quot;이란 책을 참고하여 단계별로 진행
<img src="https://images.velog.io/images/suwon-city-boy/post/93ff57cb-431a-4cfd-9b9f-5eacde4c784a/%EC%9A%B4%EB%8F%99.PNG" alt=""></li>
</ul>
<ul>
<li><strong>주 3회를 칼 같이 지키지는 못했지만, 저번달에 비해 확실히 수행 횟수도 많아지고 운동 빈도도 늘었다. 1kg 정도 살도 찌고, 근육도 붙기 시작하는 것 같아서 뿌듯했다. 6월에도 무리하지 않고 천천히 늘려나가야겠다.</strong><br>

</li>
</ul>
<h3 id="sunday-runday">Sunday Runday</h3>
<ul>
<li>일요일마다 공원에서 달리기
<img src="https://images.velog.io/images/suwon-city-boy/post/7b219517-ba2a-4ae6-b8d6-d8198328d10d/0509.jpg" alt=""></li>
</ul>
<p><strong>결과 : 한번빼곤 못 뛰었다. 미세먼지 + 황사라는 알량한 핑계 아닌 핑계.. 6월에는 매주 뛰는 것을 목표로.</strong>
<br></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[[C++ STL] Deque]]></title>
            <link>https://velog.io/@suwon-city-boy/C-STL-Deque</link>
            <guid>https://velog.io/@suwon-city-boy/C-STL-Deque</guid>
            <pubDate>Sat, 17 Apr 2021 13:27:50 GMT</pubDate>
            <description><![CDATA[<h1 id="deque">Deque</h1>
<ul>
<li>연속적인 메모리를 기반으로 하는 순차 컨테이너</li>
<li>front, end에서 삭제와 삽입이 모두 가능</li>
<li>임의 원소에 접근이 가능(인덱스 존재)</li>
<li>크기가 가변적이기 떄문에 삽입할 때 크기 고려하지 않아도 됨<br>

</li>
</ul>
<h2 id="1-생성">1. 생성</h2>
<ul>
<li><p>헤더 파일
<code>#include &lt;deque&gt;</code></p>
</li>
<li><p>생성
<code>deque&lt;자료형&gt; 변수명</code>
<code>deque&lt;자료형&gt; 변수명(n)</code>
<code>set&lt;자료형&gt; 변수명 = {원소1, 원소2, 원소3}</code>  </p>
</li>
</ul>
<blockquote>
<p>ex) <strong><code>deque&lt;int&gt; dq;</code></strong> , <strong><code>deque&lt;int&gt; dq(5);</code></strong></p>
</blockquote>
<br>

<h2 id="2-멤버-함수">2. 멤버 함수</h2>
<table>
<thead>
<tr>
<th>종류</th>
<th>상세설명</th>
</tr>
</thead>
<tbody><tr>
<td><strong>begin()</strong></td>
<td>시작 지점의 주소값 반환</td>
</tr>
<tr>
<td><strong>end()</strong></td>
<td>끝 지점 주소값 반환(마지막 원소가 아니라 <strong>마지막 원소 다음</strong>)</td>
</tr>
<tr>
<td><strong>front()</strong></td>
<td>첫 번째 원소</td>
</tr>
<tr>
<td><strong>back()</strong></td>
<td>마지막 원소</td>
</tr>
<tr>
<td><strong>at(i)</strong></td>
<td>i번째 원소</td>
</tr>
<tr>
<td><strong>clear()</strong></td>
<td>모든 원소를 제거</td>
</tr>
<tr>
<td><strong>push_front()</strong></td>
<td>첫번째 원소 앞으로 원소 삽입</td>
</tr>
<tr>
<td><strong>push_back()</strong></td>
<td>마지막 원소 뒤에 새로운 원소 삽입</td>
</tr>
<tr>
<td><strong>pop_front()</strong></td>
<td>앞에서 원소 삭제</td>
</tr>
<tr>
<td><strong>pop_back()</strong></td>
<td>뒤에서 원소 삭제</td>
</tr>
<tr>
<td><strong>empty()</strong></td>
<td>set s가 비어있는지 확인</td>
</tr>
<tr>
<td><strong>insert(k, n)</strong></td>
<td>iterator가 가리키는 위치에 n 추가(가리키는 iterator 반환)</td>
</tr>
<tr>
<td><strong>erase(k)</strong></td>
<td>iterator가 가리키는 원소 삭제</td>
</tr>
<tr>
<td><strong>find(k)</strong></td>
<td>원소 k를 가리키는 반복자 반환 (없으면 s.end() 반환</td>
</tr>
<tr>
<td><strong>size()</strong></td>
<td>사이즈 반환</td>
</tr>
<tr>
<td><strong>resize(n)</strong></td>
<td>메모리 공간 크기를 n으로 변경</td>
</tr>
</tbody></table>
<br>


<h2 id="3-예시">3. 예시</h2>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;deque&gt;
using namespace std;

void main() {
    deque&lt;int&gt; dq;

    dq.push_back(2);
    dq.push_back(3);
    dq.push_front(1);

    for (int i = 0; i &lt; dq.size(); i++) {
        cout &lt;&lt; dq[i] &lt;&lt; endl; // 1 2 3
    }

    dq.pop_back();
    dq.push_back(4);

    deque&lt;int&gt;::iterator iter;
    for (iter = dq.begin(); iter != dq.end(); iter++) {
        cout &lt;&lt; *iter &lt;&lt; endl; // 1 2 4
    }

    cout &lt;&lt; dq.empty() &lt;&lt; endl; // 0(false);

    dq.clear();

    cout &lt;&lt; dq.empty() &lt;&lt; endl; // 1(true);
}</code></pre>
<br>

<h3 id="참고">참고</h3>
<ul>
<li><a href="https://en.cppreference.com/w/cpp/container/deque">https://en.cppreference.com/w/cpp/container/deque</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[C++ STL] Set]]></title>
            <link>https://velog.io/@suwon-city-boy/C-STL-Set</link>
            <guid>https://velog.io/@suwon-city-boy/C-STL-Set</guid>
            <pubDate>Sat, 17 Apr 2021 13:00:12 GMT</pubDate>
            <description><![CDATA[<h1 id="set">SET</h1>
<ul>
<li>연관 컨테이너(associative container) </li>
<li>노드 기반 컨테이너이며 내부적으로 균형 이진트리로 구현됨</li>
<li>Key라 불리는 원소들의 집합</li>
<li><strong>key값은 중복이 허용 안됨</strong></li>
<li>원소 삽입시 <strong>자동으로 정렬 됨</strong>       </li>
<li>정렬은 less(오름차순)가 Default</li>
</ul>
<br>

<h2 id="1-생성">1. 생성</h2>
<ul>
<li><p>헤더 파일
<code>#include &lt;set&gt;</code></p>
</li>
<li><p>생성
<code>set&lt;자료형&gt; 변수명</code>
<code>set&lt;자료형&gt; 변수명(정렬 기준)</code>
<code>set&lt;자료형&gt; 변수명(변수명)</code>  </p>
</li>
</ul>
<blockquote>
<p>ex) <strong><code>set&lt;int&gt; s;</code></strong> </p>
</blockquote>
<br>

<h2 id="2-멤버-함수">2. 멤버 함수</h2>
<table>
<thead>
<tr>
<th>종류</th>
<th>상세설명</th>
</tr>
</thead>
<tbody><tr>
<td><strong>begin()</strong></td>
<td>시작 지점의 주소값 반환</td>
</tr>
<tr>
<td><strong>end()</strong></td>
<td>끝 지점 주소값 반환</td>
</tr>
<tr>
<td><strong>rbegin()</strong></td>
<td>끝 지점을 시작 지점으로 반환</td>
</tr>
<tr>
<td><strong>rend()</strong></td>
<td>시작 지점을 끝 지점으로 반환</td>
</tr>
<tr>
<td><strong>clear()</strong></td>
<td>모든 원소를 제거</td>
</tr>
<tr>
<td><strong>count(k)</strong></td>
<td>원소 갯수 반환</td>
</tr>
<tr>
<td><strong>empty()</strong></td>
<td>비었을 경우 True, 아닐 경우 False 반환</td>
</tr>
<tr>
<td><strong>insert(n)</strong></td>
<td>원소를 삽입(삽입시 자동 정렬된 위치에 삽입)</td>
</tr>
<tr>
<td><strong>insert(iter, n)</strong></td>
<td>iter의 위치부터 원소를 삽입할 위치를 탐색하여 삽입</td>
</tr>
<tr>
<td><strong>erase(iter)</strong></td>
<td>iter가 가리키는 원소 제거(제거한 원소 다음 원소의 반복자 리턴)</td>
</tr>
<tr>
<td><strong>erase(start, end)</strong></td>
<td>[start, end) 범위의 원소를 모두 제거</td>
</tr>
<tr>
<td><strong>find(k)</strong></td>
<td>원소 k를 가리키는 반복자 반환 (없으면 s.end() 반환</td>
</tr>
<tr>
<td><strong>s2.swap(s1)</strong></td>
<td>s1과 s2를 바꿈</td>
</tr>
<tr>
<td><strong>upper_bound(k)</strong></td>
<td>원소 k가 끝나는 구간의 반복자</td>
</tr>
<tr>
<td><strong>lower_bound(k)</strong></td>
<td>원소 k가 시작하는 구간의 반복자</td>
</tr>
<tr>
<td><strong>equal_range(k)</strong></td>
<td>upper_bound(k), lower_bound(k)가 합쳐진 멤버함수</td>
</tr>
<tr>
<td><strong>key_comp();</strong></td>
<td>정렬 기준 조건자 반환</td>
</tr>
<tr>
<td><strong>size()</strong></td>
<td>사이즈 반환</td>
</tr>
<tr>
<td><strong>max_size()</strong></td>
<td>최대 사이즈(남은 메모리 크기) 반환</td>
</tr>
</tbody></table>
<br>

<blockquote>
<ul>
<li>삽입시 성공 실패에 대한 여부는 리턴값 pair&lt;iterator, bool&gt;)으로 나옴 </li>
<li>pair&lt;iterator, bool&gt;에서 pair.first는 삽입한 원소를 가리키는 반복자</li>
<li>pair.second는 성공(true), 실패(false)를 나타냄</li>
</ul>
</blockquote>
<br>

<h2 id="3-예시">3. 예시</h2>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;set&gt;
using namespace std;

void main() {
    set&lt;int&gt; s;

    s.insert(1);
    s.insert(2);
    s.insert(5);
    s.insert(6);
    s.insert(3);
    s.insert(4);

    set&lt;int&gt;::iterator iter;
    for (iter = s.begin(); iter != s.end(); iter++) {
        cout &lt;&lt; *iter &lt;&lt; endl; // 1 2 3 4 5 6
    }

    iter = s.find(2);

    if (iter != s.end()) {
        cout &lt;&lt; *iter &lt;&lt; endl; // 2
    }

    set&lt;int&gt; s2;
    s2.swap(s);
    s2.erase(4);

    for (iter = s2.begin(); iter != s2.end(); iter++) {
        cout &lt;&lt; *iter &lt;&lt; endl; // 1 2 3 5 6
    }
}</code></pre>
<br>

<h2 id="참고">참고</h2>
<ul>
<li><a href="https://blockdmask.tistory.com/79">https://blockdmask.tistory.com/79</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[C++ STL] Map]]></title>
            <link>https://velog.io/@suwon-city-boy/C-STL-Map</link>
            <guid>https://velog.io/@suwon-city-boy/C-STL-Map</guid>
            <pubDate>Sat, 17 Apr 2021 08:51:26 GMT</pubDate>
            <description><![CDATA[<h1 id="map">Map</h1>
<ul>
<li>각 노드가 Key와 Value 쌍으로 이루어진 트리</li>
<li>중복을 허용하지 않음</li>
<li><code>Pair</code> 객체 형태로 저장</li>
<li>검색, 삽입, 삭제 시간 복잡도 :  O(logN)</li>
<li>원소 삽입시 Key를 기준으로 오른차순 정렬이 Default</li>
</ul>
<br>

<h2 id="1-생성">1. 생성</h2>
<ul>
<li><p>헤더 파일
<code>#include &lt;map&gt;</code></p>
</li>
<li><p>생성
<code>map&lt;key,value&gt;</code></p>
<blockquote>
<p>ex) <strong><code>map&lt;string, int&gt; m;</code></strong> </p>
</blockquote>
</li>
<li><p>내림차 순으로 정렬되는 Map 생성</p>
<blockquote>
<p>ex) <strong><code>map&lt;string, int, greater&lt;string&gt;&gt; m</code></strong> </p>
</blockquote>
</li>
</ul>
<br>

<h2 id="2-멤버-함수">2. 멤버 함수</h2>
<table>
<thead>
<tr>
<th>종류</th>
<th>상세설명</th>
</tr>
</thead>
<tbody><tr>
<td><strong>begin()</strong></td>
<td>맨 시작 iterator를 반환</td>
</tr>
<tr>
<td><strong>end()</strong></td>
<td>맨 끝 iterator를 반환</td>
</tr>
<tr>
<td><strong>insert( make_pair(key,value) )</strong></td>
<td>맵에 원소를  <code>pair</code>  형태로 추가</td>
</tr>
<tr>
<td><strong>erase(key)</strong></td>
<td>key(키값)에 해당하는 원소 삭제</td>
</tr>
<tr>
<td><strong>clear()</strong></td>
<td>원소들 모두 삭제</td>
</tr>
<tr>
<td><strong>find(key)</strong></td>
<td>key(키값)에 해당하는 iterator를 반환</td>
</tr>
<tr>
<td><strong>count(key)</strong></td>
<td>key(키값)에 해당하는 원소들(value들)의 개수를 반환</td>
</tr>
<tr>
<td><strong>empty()</strong></td>
<td>비어있으면 true 아니면 false를 반환</td>
</tr>
<tr>
<td><strong>size()</strong></td>
<td>사이즈 반환</td>
</tr>
<tr>
<td><strong>lower_bound(key)</strong></td>
<td>비교 결과 주어진 값보다 먼저 나오지 않는 첫 원소의 iterator를 반환</td>
</tr>
<tr>
<td><strong>upper_bound(key)</strong></td>
<td>비교 결과 주어진 값보다 나중에 나오는 첫 원소 iterator를 반환</td>
</tr>
</tbody></table>
<blockquote>
<p>find()로 데이터를 찾지 못했을 경우, map.end() 반환</p>
</blockquote>
<br>

<h2 id="3-예시">3. 예시</h2>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;map&gt;
#include &lt;string&gt;
using namespace std;

void main() {
    map&lt;string, int&gt; m;

    m.insert(make_pair(&quot;a&quot;, 1));
    m.insert(make_pair(&quot;b&quot;, 2));
    m.insert(make_pair(&quot;c&quot;, 3));
    m.insert(make_pair(&quot;d&quot;, 4));
    m[&quot;e&quot;] = 5;

    cout &lt;&lt; m.size() &lt;&lt; endl; // 5
    cout &lt;&lt; m.count(&quot;a&quot;) &lt;&lt; endl; // 1

    for (auto iter : m) {
        cout &lt;&lt; iter.first &lt;&lt; &quot; &quot; &lt;&lt; iter.second &lt;&lt; endl;
    }

    /*
        a, 1
        b, 2
        c, 3
        d, 4
        e, 5
    */

    m.erase(&quot;a&quot;);
    m.erase(&quot;b&quot;);
    m.erase(m.find(&quot;d&quot;));

    for (auto iter = m.begin(); iter != m.end(); iter++) {
        cout &lt;&lt; iter-&gt;first &lt;&lt; &quot; &quot; &lt;&lt; iter-&gt;second &lt;&lt; endl;
    }

    /*
        c, 3
        e, 5
    */

    m.clear();
    cout &lt;&lt; m.empty() &lt;&lt; endl; // 1(true)
}</code></pre>
<br>

<h3 id="참고">참고</h3>
<ul>
<li><a href="https://life-with-coding.tistory.com/305">https://life-with-coding.tistory.com/305</a></li>
<li><a href="https://twpower.github.io/91-how-to-use-map-in-cpp">https://twpower.github.io/91-how-to-use-map-in-cpp</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[月刊 金成奎] 2021년 4월]]></title>
            <link>https://velog.io/@suwon-city-boy/%E6%9C%88%E5%88%8A-%E9%87%91%E6%88%90%E5%A5%8E-2021%EB%85%84-4%EC%9B%94-wdu6rwn1</link>
            <guid>https://velog.io/@suwon-city-boy/%E6%9C%88%E5%88%8A-%E9%87%91%E6%88%90%E5%A5%8E-2021%EB%85%84-4%EC%9B%94-wdu6rwn1</guid>
            <pubDate>Sat, 17 Apr 2021 07:14:08 GMT</pubDate>
            <description><![CDATA[<hr>
<ul>
<li><span style="color: orange">운전면허 취득하기 🚗</span></li>
<li><span style="color: green">CodeUp 기초 100제 풀기 💯</li>
<li><span style="color: orange">&#39;구현&#39; 관련 알고리즘 문제 풀이(20문제) 👨🏻‍💻</li>
<li><span style="color: red">&#39;탐색&#39; 관련 알고리즘 문제 풀이(20문제) 👨🏻‍💻</li>
<li><span style="color: green">C++ STL 사용법 정리(velog) 📖</li>
<li><span style="color: green">입사 지원 📃</li>
<li><span style="color: green">맨몸 운동 주 3회 🏋🏻‍♂️</li>
<li><span style="color: red">Sunday Runday 🏃🏻‍♂️</li>
</ul>
<hr>
<h3 id="운전면허-취득하기">운전면허 취득하기</h3>
<ul>
<li>친구와 함께 필기 시험에 응시, 78점으로 합격하였다.
<img src="https://images.velog.io/images/suwon-city-boy/post/14d6f038-081b-4503-b4a4-60fb8335aa24/%EC%9A%B4%EC%A0%84%EB%A9%B4%ED%97%88%20%ED%95%84%EA%B8%B0.jpg" alt=""></li>
<li><strong>필기 합격 후 학원을 찾다보니 어느새 5월. 찾은 학원을 5월 시작하자마자 등록할 예정</strong></li>
</ul>
<br>

<h3 id="codeup-기초-100제-풀기">CodeUp 기초 100제 풀기</h3>
<p>C++ 기초를 위해 CodeUP 기초 100제를 풀었다.
Github에 업로드 완료(<a href="https://github.com/suwon-city-boy/algorithm-study/tree/main/CodeUp">https://github.com/suwon-city-boy/algorithm-study/tree/main/CodeUp</a>)
<img src="https://images.velog.io/images/suwon-city-boy/post/ea20236f-0cfa-4343-938e-79d4b0f8bc19/%EC%BD%94%EB%93%9C%EC%97%85.PNG" alt="">
<br></p>
<h3 id="구현-관련-알고리즘-문제-풀이">&#39;구현&#39; 관련 알고리즘 문제 풀이</h3>
<ul>
<li><strong>매일 꾸준히 풀었다. 다만 목표했던 문제수에는 약간 못 미치는 것 같다. 혼자 하다보니 시간을 너무 많이 뺏기고 진도 나가기가 어려운 것 같아 강의를 들을 예정.</strong></li>
</ul>
<br>


<h3 id="탐색-관련-알고리즘-문제-풀이">&#39;탐색&#39; 관련 알고리즘 문제 풀이</h3>
<ul>
<li><strong>구현 / 시뮬레이션 카테고리의 문제를 풀다보니 시간이 없어 못 풀었다. 특히 BOJ 기준 실버2 ~ 골드5 문제 풀다보니 문제마다 시간이 너무 많이 들었다.</strong></li>
<li><strong>5월에는 혼자 하기보단 강의를 신청해 효과적으로 할 예정.</strong><br>


</li>
</ul>
<h3 id="c-stl-사용법-정리velog">C++ STL 사용법 정리(velog)</h3>
<ul>
<li>STL이란? <a href="https://velog.io/@suwon-city-boy/STL%EC%9D%B4%EB%9E%80">https://velog.io/@suwon-city-boy/STL%EC%9D%B4%EB%9E%80</a></li>
<li>Vector <a href="https://velog.io/@suwon-city-boy/C-STL-Vector">https://velog.io/@suwon-city-boy/C-STL-Vector</a></li>
<li>Stack <a href="https://velog.io/@suwon-city-boy/C-STL-Stack">https://velog.io/@suwon-city-boy/C-STL-Stack</a></li>
<li>Queue <a href="https://velog.io/@suwon-city-boy/C-STL-Queue">https://velog.io/@suwon-city-boy/C-STL-Queue</a></li>
<li>Priority Queue <a href="https://velog.io/@suwon-city-boy/C-STL-Priority-Queue">https://velog.io/@suwon-city-boy/C-STL-Priority-Queue</a></li>
<li>Map <a href="https://velog.io/@suwon-city-boy/C-STL-Map">https://velog.io/@suwon-city-boy/C-STL-Map</a></li>
<li>Set <a href="https://velog.io/@suwon-city-boy/C-STL-Set">https://velog.io/@suwon-city-boy/C-STL-Set</a></li>
<li>Deque <a href="https://velog.io/@suwon-city-boy/C-STL-Deque">https://velog.io/@suwon-city-boy/C-STL-Deque</a><br>


</li>
</ul>
<h3 id="입사-지원">입사 지원</h3>
<p>  <img src="https://images.velog.io/images/suwon-city-boy/post/086f1014-52ba-4761-8c60-43084ec2dffb/%EC%A7%80%EC%9B%90.PNG" alt="">
  <u>서류 지원</u></p>
<ul>
<li>신한은행</li>
<li>교보생명</li>
<li>CJ 올리브 네트웍스<br>

</li>
</ul>
<p><U>인적성 &amp; 코딩테스트</u></p>
<ul>
<li>롯데 정보통신(불합, 코테 공부가 시급하다) -&gt; CodeUp 기초 100제, 구현, 탐색 공부<br>


</li>
</ul>
<h3 id="맨몸-운동-주-3회">맨몸 운동 주 3회</h3>
<ul>
<li>월, 수, 금 주 3회 분할 없이 자유롭게 하는 것이 목표 💪🏻</li>
<li>죄수 운동법이란 책을 참고하여 단계별로 진행</li>
<li>4월의 목표 : 푸쉬업 2단계, 풀업 1단계, 스쿼트 2단계
<img src="https://images.velog.io/images/suwon-city-boy/post/004ec0c5-7ad0-4717-b684-e1d2c7a01f41/image.png" alt=""></li>
<li><strong>욕심 안내고 꾸준히 하는 습관을 들이는 것이 목표였기에 만족스러운 결과다.</strong></li>
<li><strong>데이트가 있어 못한 날엔 주기에 어긋나더라도 다음 날 실천한 것이 특히 뿌듯했었다.</strong><br>

</li>
</ul>
<h3 id="sunday-runday">Sunday Runday</h3>
<ul>
<li>코로나와 취준으로 집에만 있다보니 체력이 떨어진 게 느껴짐😥</li>
<li>일요일마다 공원에서 달리기(기록보다는 수행에 중점을 두는 것으로..)<br></li>
<li><strong>결국 한번도 못 뛰었다. 4월 3째주부터 시작한 계획이고, 황사로 인해 야외활동이 불가한 것도 있었으나 결국엔 의지가 부족했다.. 맨몸운동은 꾸준히 지켰으니, 5월에는 매주 뛰는 것으로 다시 도전하는 걸로!</strong></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[C++ STL] Priority Queue]]></title>
            <link>https://velog.io/@suwon-city-boy/C-STL-Priority-Queue</link>
            <guid>https://velog.io/@suwon-city-boy/C-STL-Priority-Queue</guid>
            <pubDate>Sat, 17 Apr 2021 06:50:11 GMT</pubDate>
            <description><![CDATA[<h1 id="priority-queue">Priority Queue</h1>
<ul>
<li>Queue의 한 종류</li>
<li>우선순위에 따라 정렬된 Queue</li>
<li>원소 삽입(push)시 우선순위에 맞춰 Queue가 정렬됨</li>
<li>Heap으로 구현되어있음</li>
<li>Push 중 생기는 정렬 과정의 시간 복잡도는 O(logN)<br>

</li>
</ul>
<h2 id="1-생성">1. 생성</h2>
<ul>
<li><p>헤더 파일
<code>#include &lt;queue&gt;</code> (Queue와 동일)  </p>
</li>
<li><p>생성
<code>priority_queue&lt;자료형&gt; 변수명</code>
<code>priority_queue&lt;자료형, Container, 비교함수&gt; 변수명</code></p>
</li>
</ul>
<blockquote>
<p>자료형만 명시할 경우 Default는 내림차순</p>
</blockquote>
<blockquote>
<p>ex) <strong>priority_queue&lt;int, vector<int>, greater<int>&gt; pq;</strong>  // 오름차순에 따라 정렬되는 우선순위 큐 생성</p>
</blockquote>
<br>

<h2 id="2-멤버-함수">2. 멤버 함수</h2>
<table>
<thead>
<tr>
<th>종류</th>
<th>상세설명</th>
</tr>
</thead>
<tbody><tr>
<td><strong>empty()</strong></td>
<td>비어있는지 확인</td>
</tr>
<tr>
<td><strong>size()</strong></td>
<td>사이즈 반환</td>
</tr>
<tr>
<td><strong>top()</strong></td>
<td>맨 앞의 원소 리턴</td>
</tr>
<tr>
<td><strong>push(n)</strong></td>
<td>큐에 원소를 추가(<strong>비교함수에 따라 내부적으로 정렬됨</strong>)</td>
</tr>
<tr>
<td><strong>pop()</strong></td>
<td>맨 앞의 원소를 삭제</td>
</tr>
</tbody></table>
<p><br><br></p>
<h2 id="3-예시">3. 예시</h2>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;queue&gt;
using namespace std;

void main() {
    priority_queue&lt;int&gt; pq1;

    pq1.push(1);
    pq1.push(8);
    pq1.push(3);
    pq1.push(5);

    for (int i = 0; pq1.size(); i++) {
        cout &lt;&lt; pq1.top() &lt;&lt; endl; // 8 5 3 1
        pq1.pop();
    }
    cout &lt;&lt; pq1.empty() &lt;&lt; endl; // 1(true)

    priority_queue&lt;int, vector&lt;int&gt;, greater&lt;int&gt;&gt; pq2;
    pq2.push(1);
    pq2.push(8);
    pq2.push(3);
    pq2.push(5);

    for (int i = 0; pq2.size(); i++) {
        cout &lt;&lt; pq2.top() &lt;&lt; endl; // 1 3 5 8
        pq2.pop();
    }
    cout &lt;&lt; pq2.empty() &lt;&lt; endl; // 1(true)

}</code></pre>
<br>

<h2 id="참고">참고</h2>
<ul>
<li><a href="http://www.cplusplus.com/reference/queue/priority_queue/">http://www.cplusplus.com/reference/queue/priority_queue/</a></li>
<li><a href="https://travelbeeee.tistory.com/126">https://travelbeeee.tistory.com/126</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[C++ STL] Queue]]></title>
            <link>https://velog.io/@suwon-city-boy/C-STL-Queue</link>
            <guid>https://velog.io/@suwon-city-boy/C-STL-Queue</guid>
            <pubDate>Fri, 16 Apr 2021 12:41:53 GMT</pubDate>
            <description><![CDATA[<h1 id="stack">Stack</h1>
<ul>
<li>FIFO(First In FIrst Out) 구조  </li>
<li>앞 쪽 끝은 프런트(front)로 정하여 삭제 연산 수행  </li>
<li>뒤 쪽 끝은 리어(rear)로 정하여 삽입 연산 수행<br>

</li>
</ul>
<h2 id="1-생성">1. 생성</h2>
<ul>
<li><p>헤더 파일
<code>#include &lt;queue&gt;</code>  </p>
</li>
<li><p>생성
<code>queue&lt;자료형&gt; 변수명</code></p>
<br>


</li>
</ul>
<h2 id="2-멤버-함수">2. 멤버 함수</h2>
<table>
<thead>
<tr>
<th>종류</th>
<th>상세설명</th>
</tr>
</thead>
<tbody><tr>
<td><strong>empty()</strong></td>
<td>비어있는지 확인</td>
</tr>
<tr>
<td><strong>size()</strong></td>
<td>사이즈 반환</td>
</tr>
<tr>
<td><strong>front()</strong></td>
<td>맨 앞의 원소 리턴</td>
</tr>
<tr>
<td><strong>back()</strong></td>
<td>맨 뒤의 원소 리턴</td>
</tr>
<tr>
<td><strong>push(n)</strong></td>
<td>큐에 원소를 추가(뒤에서)</td>
</tr>
<tr>
<td><strong>pop()</strong></td>
<td>큐에 있는 원소를 삭제(앞에서)</td>
</tr>
<tr>
<td><br></td>
<td></td>
</tr>
</tbody></table>
<h2 id="3-예시">3. 예시</h2>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;queue&gt;
using namespace std;

void main() {
    queue&lt;int&gt; q;

    q.push(1);
    q.push(2);
    q.push(3);
    q.push(4);
    q.push(5);

    cout &lt;&lt; q.size() &lt;&lt; endl; // 5
    cout &lt;&lt; q.front() &lt;&lt; endl; // 1
    cout &lt;&lt; q.back() &lt;&lt; endl; // 5

    q.pop();

    cout &lt;&lt; q.size() &lt;&lt; endl; // 4
    cout &lt;&lt; q.front() &lt;&lt; endl; // 2
    cout &lt;&lt; q.back() &lt;&lt; endl; // 5

    q.pop();
    q.pop();
    q.pop();

    cout &lt;&lt; q.empty() &lt;&lt; endl; // 0(false)

    q.pop();

    cout &lt;&lt; q.empty() &lt;&lt; endl; // 1(true)
}</code></pre>
<br>

<h2 id="참고">참고</h2>
<p><a href="http://www.cplusplus.com/reference/queue/queue/">http://www.cplusplus.com/reference/queue/queue/</a></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[[C++ STL] Stack]]></title>
            <link>https://velog.io/@suwon-city-boy/C-STL-Stack</link>
            <guid>https://velog.io/@suwon-city-boy/C-STL-Stack</guid>
            <pubDate>Fri, 16 Apr 2021 12:13:13 GMT</pubDate>
            <description><![CDATA[<h1 id="stack">Stack</h1>
<ul>
<li><strong>LIFO(Last In First Out)</strong> 구조</li>
<li>top(맨 위 요소)을 통해서만 내부 데이터에 접근 가능</li>
<li>Stack Container Adapter는 vector, deque, list container 기반</li>
<li>내부적인 구현은 vector, deque, list container 구조</li>
<li>stack과 같이 작동하도록 멤버 함수 등을 지원<br>

</li>
</ul>
<h2 id="1-생성">1. 생성</h2>
<ul>
<li><p>헤더 파일
<code>#include &lt;stack&gt;</code>  </p>
</li>
<li><p>생성
<code>stack&lt;자료형&gt; 변수명</code></p>
<br>

</li>
</ul>
<h2 id="2-멤버-함수">2. 멤버 함수</h2>
<table>
<thead>
<tr>
<th>종류</th>
<th>상세설명</th>
</tr>
</thead>
<tbody><tr>
<td><strong>empty()</strong></td>
<td>비어있는지 확인</td>
</tr>
<tr>
<td><strong>size()</strong></td>
<td>사이즈를 반환</td>
</tr>
<tr>
<td><strong>top()</strong></td>
<td>맨 위의 원소 리턴</td>
</tr>
<tr>
<td><strong>push(n)</strong></td>
<td>맨 위에 원소 추가</td>
</tr>
<tr>
<td><strong>pop()</strong></td>
<td>맨 위의 원소 삭제</td>
</tr>
<tr>
<td><br></td>
<td></td>
</tr>
</tbody></table>
<h2 id="3-예시">3. 예시</h2>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;stack&gt;
using namespace std;

void main() {
    stack&lt;int&gt; stk;

    stk.push(2);
    stk.push(4);
    stk.push(6);

    cout &lt;&lt; stk.top() &lt;&lt; endl; // 6
    cout &lt;&lt; stk.size() &lt;&lt; endl; // 3

    stk.pop();
    cout &lt;&lt; stk.top() &lt;&lt; endl; // 4

    stk.pop();
    cout &lt;&lt; stk.empty() &lt;&lt; endl; // 0(false)

    stk.pop();
    cout &lt;&lt; stk.empty() &lt;&lt; endl; // 1(true)
}</code></pre>
<br>


<h3 id="참고">참고</h3>
<ul>
<li><a href="https://blockdmask.tistory.com/100">https://blockdmask.tistory.com/100</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[C++ STL] Vector]]></title>
            <link>https://velog.io/@suwon-city-boy/C-STL-Vector</link>
            <guid>https://velog.io/@suwon-city-boy/C-STL-Vector</guid>
            <pubDate>Fri, 16 Apr 2021 11:34:05 GMT</pubDate>
            <description><![CDATA[<h1 id="vector">Vector</h1>
<ul>
<li>동적 배열 구조</li>
<li>자동으로 배열의 크기 조절과 객체의 추가와 삭제가 가능<br>

</li>
</ul>
<h2 id="1-생성-및-초기화">1. 생성 및 초기화</h2>
<table>
<thead>
<tr>
<th>종류</th>
<th>상세 설명</th>
</tr>
</thead>
<tbody><tr>
<td><strong>vector&lt;자료형&gt; 변수명</strong></td>
<td>백터 생성</td>
</tr>
<tr>
<td><strong>vector&lt;자료형&gt; 변수명(숫자)</strong></td>
<td>숫자만큼 백터 생성 후 0으로 초기화</td>
</tr>
<tr>
<td><strong>vector&lt;자료형&gt; 변수명 = { 변수1, 변수2, 변수3... }</strong></td>
<td>백터 생성 후 오른쪽 변수 값으로 초기화</td>
</tr>
<tr>
<td><strong>vector&lt;vector&lt;자료형&gt; 변수명</strong></td>
<td>2차원 백터 생성(열과 행 모두 가변)</td>
</tr>
<tr>
<td><strong>vector&lt;자료형&gt;변수명.assign(범위, 초기화할 값)</strong></td>
<td>백터의 범위 내에서 해당 값으로 초기화</td>
</tr>
<tr>
<td><br></td>
<td></td>
</tr>
</tbody></table>
<h2 id="2-iterators">2. Iterators</h2>
<table>
<thead>
<tr>
<th>종류</th>
<th>상세 설명</th>
</tr>
</thead>
<tbody><tr>
<td><strong>begin()</strong></td>
<td>시작 지점의 주소값 반환</td>
</tr>
<tr>
<td><strong>end()</strong></td>
<td>끝 지점 주소값 반환</td>
</tr>
<tr>
<td><strong>rbegin()</strong></td>
<td>끝 지점을 시작 지점으로 반환</td>
</tr>
<tr>
<td><strong>rend()</strong></td>
<td>시작 지점을 끝 지점으로 반환</td>
</tr>
<tr>
<td><br></td>
<td></td>
</tr>
</tbody></table>
<p><strong>rbegin(), rend()를 이용한 역순 출력 예시</strong></p>
<pre><code class="language-c++">#include &lt;iostream&gt;
#include &lt;vector&gt;
using namespace std;

void main() 
{
    vector&lt;int&gt; v = {1,2,3,4,5};

    vector&lt;int&gt;::reverse_iterator itr;
    for (itr=v.rbegin(); itr!=v.rend(); itr++) 
    {
        printf(&quot;%d\n&quot;, *itr); // 5, 4, 3, 2, 1
    }
}</code></pre>
<br>



<h2 id="3-요소-접근">3. 요소 접근</h2>
<table>
<thead>
<tr>
<th>종류</th>
<th>상세 설명</th>
</tr>
</thead>
<tbody><tr>
<td><strong>at(i)</strong></td>
<td>백터의 i번째 요소 접근 (범위 검사함)</td>
</tr>
<tr>
<td><strong>v[i]</strong></td>
<td>백터의 i번째 요소 접근 (범위 검사 안함)</td>
</tr>
<tr>
<td><strong>front()</strong></td>
<td>백터의 첫번째 요소 접근</td>
</tr>
<tr>
<td><strong>back()</strong></td>
<td>백터의 마지막 요소 접근</td>
</tr>
</tbody></table>
<br>

<blockquote>
<p><strong>※ at과 []의 차이점</strong></p>
<ul>
<li><strong>at</strong>은 범위를 검사하여 범위 밖의 요소에 접근 시 예외처리를 발생시킴(std::out_of_range)</li>
<li><strong>[]</strong>는 범위검사를 하지 않으며 예외처리 발생시키지 않음</li>
</ul>
</blockquote>
<br>



<h2 id="4-요소-삽입-삭제">4. 요소 삽입, 삭제</h2>
<table>
<thead>
<tr>
<th>종류</th>
<th>상세 설명</th>
</tr>
</thead>
<tbody><tr>
<td><strong>push_back()</strong></td>
<td>백터의 마지막 부분에 새로운 요소 추가</td>
</tr>
<tr>
<td><strong>pop_back()</strong></td>
<td>백터의 마지막 부분 제거</td>
</tr>
<tr>
<td><strong>insert(삽입할 위치의 주소 값, 변수 값)</strong></td>
<td>사용자가 원하는 위치에 요소 삽입</td>
</tr>
<tr>
<td><strong>emplace(삽입할 위치의 주소 값, 변수 값)</strong></td>
<td>사용자가 원하는 위치에 요소 삽입(복사생성자 X)</td>
</tr>
<tr>
<td><strong>emplace_back()</strong></td>
<td>백터의 마지막 부분에 새로운 요소 추가(복사생성자 X)</td>
</tr>
<tr>
<td><strong>erase(삭제할 위치)</strong> / <strong>erase(시작위치, 끝위치)</strong></td>
<td>사용자가 원하는 index값 위치의 요소를 삭제</td>
</tr>
<tr>
<td><strong>clear()</strong></td>
<td>백터의 모든 요소를 지움(return size = 0)</td>
</tr>
<tr>
<td><strong>resize(수정 값)</strong></td>
<td>백터의 사이즈를 조정(범위 초과시 0으로 초기화)</td>
</tr>
<tr>
<td><strong>swap(백터 변수)</strong></td>
<td>백터와 백터를 스왑</td>
</tr>
<tr>
<td><br></td>
<td></td>
</tr>
</tbody></table>
<h2 id="5-크기용량-관리">5. 크기(용량) 관리</h2>
<table>
<thead>
<tr>
<th>종류</th>
<th>상세 설명</th>
</tr>
</thead>
<tbody><tr>
<td><strong>empty()</strong></td>
<td>백터가 빈공간이면 true, 값이 있다면 false</td>
</tr>
<tr>
<td><strong>size()</strong></td>
<td>백터의 크기 반환</td>
</tr>
<tr>
<td><strong>capacity()</strong></td>
<td>heap에 할당된 백터의 실제크기(최대크기) 반환</td>
</tr>
<tr>
<td><strong>max_size()</strong></td>
<td>백터가 system에서 만들어 질 수 있는 최대 크기 반환</td>
</tr>
<tr>
<td><strong>reserve(숫자)</strong></td>
<td>백터의 크기 설정</td>
</tr>
<tr>
<td><strong>shrink_to_fit()</strong></td>
<td>capacity의 크기를 백터의 실제 크기에 맞춤</td>
</tr>
<tr>
<td><br></td>
<td></td>
</tr>
</tbody></table>
<p><strong>size()와 capacity()의 차이점 예시</strong></p>
<pre><code class="language-c++">#include  &lt;iostream&gt;
#include  &lt;vector&gt;
using  namespace  std;


int  main() {
    vector&lt;int&gt; v = { 1, 2, 3, 4, 5};

    v.reserve(10);

    cout &lt;&lt;  v.size() &lt;&lt;  endl; // 5
    cout &lt;&lt;  v.capacity() &lt;&lt;  endl; // 10
}</code></pre>
<br>

<h2 id="참고">참고</h2>
<ul>
<li><a href="https://ko.wikipedia.org/wiki/%EB%B2%A1%ED%84%B0_(STL)">https://ko.wikipedia.org/wiki/%EB%B2%A1%ED%84%B0_(STL)</a></li>
<li><a href="https://hwan-shell.tistory.com/119">https://hwan-shell.tistory.com/119</a></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[STL이란?]]></title>
            <link>https://velog.io/@suwon-city-boy/STL%EC%9D%B4%EB%9E%80</link>
            <guid>https://velog.io/@suwon-city-boy/STL%EC%9D%B4%EB%9E%80</guid>
            <pubDate>Thu, 15 Apr 2021 15:33:59 GMT</pubDate>
            <description><![CDATA[<p><img src="https://images.velog.io/images/suwon-city-boy/post/376665ca-243f-49e6-84e9-1d7dea92b4b6/STL.jpeg" alt=""></p>
<h1 id="stl">STL</h1>
<ul>
<li>C++ 표준 템플릿 라이브러리 (Standard Template Library)</li>
<li>프로그램에 필요한 자료구조와 알고리즘을 Template으로 제공 <br>


</li>
</ul>
<h2 id="1-장단점">1. 장단점</h2>
<table>
<thead>
<tr>
<th>장점</th>
<th>단점</th>
</tr>
</thead>
<tbody><tr>
<td>일반화 지원</td>
<td>템플릿 기반이므로 코드가 비대해짐</td>
</tr>
<tr>
<td>실행시 효율 저하 거의 없음</td>
<td>가독성이 떨어짐</td>
</tr>
<tr>
<td>표준이므로 이식성 뛰어남</td>
<td></td>
</tr>
<tr>
<td>확장 가능</td>
<td></td>
</tr>
<tr>
<td><br></td>
<td></td>
</tr>
</tbody></table>
<h2 id="2-구조">2. 구조</h2>
<p><strong>iterator(반복자)</strong></p>
<ul>
<li>STL 전용 포인터, 가리키는 원소에 접근하여 다음 원소를 가리킴</li>
</ul>
<p><strong>Algorithm(알고리즘)</strong></p>
<ul>
<li>정렬, 삭제, 검색, 연산 등 간단하게 호출하여 사용하게 구성되어 있음</li>
</ul>
<p><strong>Allocator(할당기)</strong></p>
<ul>
<li>컨테이너의 메모리 할당 정책을 캡슐화한 클래스 객체</li>
<li>모든 컨테이너는 자신만의 할당 크기를 가지고 있음</li>
</ul>
<p><strong>Function Object(함수 객체)</strong></p>
<ul>
<li>함수처럼 동작하는 객체</li>
<li>operator() 연산자를 오버로딩</li>
</ul>
<p><strong>Adaptor(어댑터)</strong></p>
<ul>
<li>구성 요소의 인터페이스를 변경하여 새로운 인터페이스를 갖는 구성 요소로 변경</li>
<li>어댑터 컨테이너<br>

</li>
</ul>
<h2 id="3-종류">3. 종류</h2>
<p><strong>시퀸스 컨테이너(Sequence Container)</strong></p>
<ul>
<li>자료를 입력한 순서대로 저장</li>
<li>검색 및 삽입, 삭제 속도가 느림</li>
<li>많지 않은 양의 자료 / 검색 속도가 중요하지 않으면 사용.</li>
<li><span style="color:blue">종류 : array (C++ 11), vector, list, deque</span><br>

</li>
</ul>
<p><strong>연관 컨테이너(Associative Container)</strong></p>
<ul>
<li>트리 구조</li>
<li>검색 및 삽입, 삭제 속도가 빠름</li>
<li>많은 양의 자료 / 빠른 검색이 중요한 경우 사용</li>
<li><span style="color:blue">종류 : set, multiset, map, multimap</span><br>

</li>
</ul>
<p><strong>어댑터 컨테이너(Adaptor Container)</strong></p>
<ul>
<li>시퀸스 컨테이너를 변형하여 사용</li>
<li><span style="color:blue">종류 : stack, queue, priority_queue</span><br>

</li>
</ul>
<h2 id="4-상황별-컨테이너-선택">4. 상황별 컨테이너 선택</h2>
<p><strong>1. 적은양의 데이터</strong></p>
<ul>
<li><strong>array</strong></li>
<li><strong>vector</strong></li>
<li><strong>list / forward_list</strong><br><br></li>
</ul>
<p><strong>2. 많은양의 데이터 + 검색 활발</strong></p>
<ul>
<li><strong>map</strong></li>
<li><strong>set</strong><br><br><br></li>
</ul>
<h3 id="참고">참고</h3>
<p><a href="https://code-algalon.tistory.com/188">https://code-algalon.tistory.com/188</a>
<a href="https://ko.wikipedia.org/wiki/%ED%91%9C%EC%A4%80_%ED%85%9C%ED%94%8C%EB%A6%BF_%EB%9D%BC%EC%9D%B4%EB%B8%8C%EB%9F%AC%EB%A6%AC">https://ko.wikipedia.org/wiki/%ED%91%9C%EC%A4%80_%ED%85%9C%ED%94%8C%EB%A6%BF_%EB%9D%BC%EC%9D%B4%EB%B8%8C%EB%9F%AC%EB%A6%AC</a></p>
]]></description>
        </item>
    </channel>
</rss>