Technical Interview Prep

์ทจ๋ฝ€ ๊ฐ€์ฆˆ์•„

1. Spring Class ์ค‘ Helper Class (Util Class)?

Wikipedia

: In object-oriented programming, a helper class is used to assist in providing some functionality, which isn't the main goal of the application or class in which it is used

  • Utility Class, also known as Helper class means that contains just static methods

  • Stateless & cannot be instantiated (์ธ์Šคํ„ด์Šคํ™” ๋  ์ˆ˜ ์—†๋‹ค)

  • ๋ฐ˜๋ณต์ ์ด๊ฑฐ๋‚˜ ๊ณตํ†ต์œผ๋กœ ์“ฐ์ด๋Š” ๊ธฐ๋Šฅ๋“ค์„ ์ฒ˜๋ฆฌํ•  ๋•Œ Util Class๋ฅผ ์‚ฌ์šฉํ•จ!

ex)

1-1. org.springframework.util.ClassUtils

boolean isPresent(String className, @Nullable ClassLoader classLoader)

ํ•ด๋‹น ํด๋ž˜์Šค๊ฐ€ ์žˆ๋Š”์ง€ ํ™•์ธ ([class].class.getName() ์„ ์“ฐ๋ฉด ์•ˆ๋จ - ์—†๋Š” ๊ฒฝ์šฐ ์—๋Ÿฌ ๋ฐœ์ƒํ•จ)

boolean isPresent = ClassUtils.isPresent("org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter", null);

1-2. org.springframework.util.StringUtils

boolean isEmpty(@Nullable Object str)

String null ๊ณผ empty ์ฒดํฌ

StringUtils.isEmpty(stringValue);

boolean containsWhitespace(@Nullable String str)

๊ณต๋ฐฑ์ด ์žˆ๋Š”์ง€ ์—ฌ๋ถ€ ํ™•์ธ

String trimWhitespace(String str)

์•ž๋’ค ๊ณต๋ฐฑ ์ œ๊ฑฐ

String replace(String inString, String oldPattern, @Nullable String newPattern)

ํ•ด๋‹นํ•˜๋Š” ๋ฌธ์ž์—ด ๋ชจ๋‘ ๋ณ€๊ฒฝ. newPattern์ด null์ธ ๊ฒฝ์šฐ ๋ณ€๊ฒฝํ•˜์ง€ ์•Š์Œ

String delete(String inString, String pattern)

ํ•ด๋‹นํ•˜๋Š” ๋ฌธ์ž์—ด ๋ชจ๋‘ ์‚ญ์ œ

String getFilename(@Nullable String path)

path ๊ฒฝ๋กœ์—์„œ ํŒŒ์ผ ์ด๋ฆ„์„ ๋ฐ˜ํ™˜ (๋งˆ์ง€๋ง‰ ๋ฌธ์ž์—ด์„ ๋ฐ˜ํ™˜)

String delete(String inString, String pattern)

ํ•ด๋‹นํ•˜๋Š” ๋ฌธ์ž์—ด ๋ชจ๋‘ ์‚ญ์ œ

1-3. org.springframework.util.TypeUtils

boolean isAssignable(Type lhsType, Type rhsType)

์˜ค๋ฅธ์ชฝ์— ์žˆ๋Š” ํƒ€์ž…์ด ์™ผ์ชฝ์— ์žˆ๋Š” ํƒ€์ž…์˜ ํ•˜์œ„ ํƒ€์ž…์ธ์ง€ ์ฒดํฌ

+

Service Class vs Helper Class

  • A Service class/interface provides a way of a client to interact with some functionality in the application. This is typically public, with some business meaning. For example, a TicketingService interface might allow you to buyTicket, sellTicket and so on.

  • A helper class tends to be hidden from the client and is used internally to provide some boiler plate work that has no business domain meaning. For example, let's say you wanted to convert a date into a timestamp in order to save it to your particular datastore. You might have a utility class called DateConvertor with a convertDateToTimestamp method that performs this processing.

2. MVC ๋ž€?

  • ๊ฐœ๋ฐœ ํ•  ๋•Œ 3๊ฐ€์ง€ ํ˜•ํƒœ๋กœ ์—ญํ• ์„ ๋‚˜๋ˆ„์–ด ๊ฐœ๋ฐœํ•˜๋Š” ๋ฐฉ๋ฒ•๋ก 

    • ๋””์ž์ธ ํŒจํ„ด ์ค‘ ํ•˜๋‚˜

  • ๋น„์ฆˆ๋‹ˆ์Šค ์ฒ˜๋ฆฌ ๋กœ์ง๊ณผ ์‚ฌ์šฉ์ž Interface ์š”์†Œ๋ฅผ ๋ถ„๋ฆฌ์‹œ์ผœ ์„œ๋กœ ์˜ํ–ฅ์—†์ด ๊ฐœ๋ฐœ ํ•˜๊ธฐ ์ˆ˜์›”ํ•˜๋‹ค๋Š” ์žฅ์ ์ด ์žˆ์Œ!

  • Model

    • Application์ด ๋ฌด์—‡์„ ํ•  ๊ฒƒ์ธ์ง€๋ฅผ ์ •์˜

    • ๋‚ด๋ถ€ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์„ ์ฒ˜๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ ์—ญํ• 

    • ex) ์ฒ˜๋ฆฌ๋˜๋Š” ์•Œ๊ณ ๋ฆฌ์ฆ˜, DB, Data, etc

  • View

    • ํ™”๋ฉด์— ๋ฌด์—‡์ธ๊ฐ€๋ฅผ ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•œ ์—ญํ• 

    • Controller ํ•˜์œ„์— ์ข…์†๋˜์–ด, Model์ด๋‚˜ Controller๊ฐ€ ๋ณด์—ฌ์ฃผ๋ ค๊ณ  ํ•˜๋Š” ๋ชจ๋“  ํ•„์š”ํ•œ ๊ฒƒ๋“ค์„ ๋ณด์—ฌ์คŒ

    • ์‚ฌ์šฉ์ž์˜ ์ž…๋ ฅ์„ ๋ฐ›์•„์„œ ๋ชจ๋ธ์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์—…๋ฐ์ดํŠธ ํ•จ

  • Controller

    • Model์ด ์–ด๋–ป๊ฒŒ ์ฒ˜๋ฆฌํ•  ์ง€๋ฅผ ์•Œ๋ ค์ฃผ๋Š” ์—ญํ• 

    • ๋ชจ๋ฐ”์ผ์—์„œ๋Š” ํ™”๋ฉด์˜ ๋กœ์ง ์ฒ˜๋ฆฌ ๋ถ€๋ถ„

๊ฐ„๋‹จ ์ •๋ฆฌ

Django project ๊ธฐ์ค€

  • M

    • Data ex) models.py

  • V (T)

    • UI (html + js)

  • C

    • Data & UI ์˜ ์ค‘์žฌ์ž ex) views.py

3. CORS Policy

Same-Origin Policy (๋™์ผ ์ถœ์ฒ˜ ์ •์ฑ…)

  • ์–ด๋–ค ์ถœ์ฒ˜์—์„œ ๋ถˆ๋Ÿฌ์˜จ ๋ฌธ์„œ๋‚˜ script๊ฐ€ ๋‹ค๋ฅธ ์ถœ์ฒ˜์—์„œ ๊ฐ€์ ธ์˜จ resource ์™€ ์ƒํ˜ธ์ž‘์šฉ ํ•˜๋Š” ๊ฒƒ์„ ์ œํ•œํ•˜๋Š” Browser ์˜ ๋ณด์•ˆ ๋ฐฉ์‹

  • ๊ฐ™์€ ์ถœ์ฒ˜๋ฅผ ๊ตฌ๋ถ„ํ•˜๋Š” ๊ธฐ์ค€

    • Protocol

    • Host

    • Port

Cross-Origin Resource Sharing(CORS)

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

  • ์ถ”๊ฐ€ HTTP Header๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ browser๊ฐ€ ํ•œ ์ถœ์ฒ˜์—์„œ ์‹คํ–‰ ์ค‘์ธ Web application์ด ๋‹ค๋ฅธ ์ถœ์ฒ˜์˜ ์„ ํƒํ•œ ์ž์›์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š” ๊ถŒํ•œ์„ ๋ถ€์—ฌํ•˜๋„๋ก browser์—์„œ ์•Œ๋ ค์ฃผ๋Š” ์ฒด์ œ

  • Web application์€ resource ๊ฐ€ ์ž์‹ ์˜ ์ถœ์ฒ˜ (Domain, Protocol, Port) ์™€ ๋‹ค๋ฅผ ๋•Œ CORS HTTP request๋ฅผ ์‹คํ–‰ํ•จ

    • ์ถœ์ฒ˜๊ฐ€ ๋‹ค๋ฅธ ๋„๋ฉ”์ธ์—์„œ์˜ AJAX์š”์ฒญ์ด๋ผ๋„ ์„œ๋ฒ„ ๋‹จ์—์„œ ๋ฐ์ดํ„ฐ ์ ‘๊ทผ ๊ถŒํ•œ์„ ํ—ˆ์šฉํ•˜๋Š” ์ •์ฑ…!

4. GET ์š”์ฒญ๊ณผ POST ์š”์ฒญ

GET

  • Server ๋กœ๋ถ€ํ„ฐ ์ •๋ณด๋ฅผ ์กฐํšŒํ•˜๊ธฐ ์œ„ํ•ด ์„ค๊ณ„๋œ method

  • Data๋ฅผ Body์— ๋‹ด์ง€ ์•Š๊ณ  Query string์„ ํ†ตํ•ด ์ „์†ก

    • Query string

      • URL ๋์— ? ์™€ ํ•จ๊ป˜ ์ด๋ฆ„๊ณผ ๊ฐ’์œผ๋กœ ์Œ์„ ์ด๋ฃจ๋Š” request parameter

      • parameter๊ฐ€ ์—ฌ๋Ÿฌ๊ฐœ์ด๋ฉด &๋กœ ์—ฐ๊ฒฐ

        ex)

        https://movie-box1.herokuapp.com/movies/genre/?option=Fantasy
  • ๋ถˆํ•„์š”ํ•œ ์š”์ฒญ์„ ์ œํ•œํ•˜๊ธฐ ์œ„ํ•ด ์š”์ฒญ์ด cache ๋  ์ˆ˜ ์žˆ์Œ

  • Idempotent (๋ฉฑ๋“ฑ)

    • ์„œ๋ฒ„์— ๋™์ผํ•œ ์š”์ฒญ์„ ์—ฌ๋Ÿฌ๋ฒˆ ์ „์†กํ•˜๋”๋ผ๋„ ๋™์ผํ•œ ์‘๋‹ต์ด ๋Œ์•„์™€์•ผ ํ•จ

      • ์กฐํšŒ๋ฅผ ํ•  ๋•Œ ์ฃผ๋กœ ์‚ฌ์šฉ

POST

  • Resouce๋ฅผ ์ƒ์„ฑ/๋ณ€๊ฒฝํ•˜๊ธฐ ์œ„ํ•ด ์„ค๊ณ„๋œ method

  • ์ „์†กํ•ด์•ผ ๋  data๋ฅผ Body์— ๋‹ด์•„์„œ ์ „์†ก

  • ๊ธธ์ด์˜ ์ œํ•œ ์—†์ด data ์ „์†ก ๊ฐ€๋Šฅ

    • GET ๋ฐฉ์‹๊ณผ๋Š” ๋‹ค๋ฅด๊ฒŒ ๋Œ€์šฉ๋Ÿ‰ data ์ „์†ก์ด ๊ฐ€๋Šฅํ•˜๋‹ค!

  • ์š”์ฒญ ํ—ค๋”์˜ Content-Type์— ์š”์ฒญ ๋ฐ์ดํ„ฐ์˜ ํƒ€์ž…์„ ํ‘œ์‹œํ•ด์•ผ ํ•จ

  • Non-idempotent

    • ์„œ๋ฒ„์— ๋™์ผํ•œ ์š”์ฒญ์„ ์—ฌ๋Ÿฌ๋ฒˆ ์ „์†กํ•  ๋•Œ ์‘๋‹ต์€ ํ•ญ์ƒ ๋‹ค๋ฅผ ์ˆ˜ ์žˆ์Œ

    • ์„œ๋ฒ„์˜ ์ƒํƒœ๋‚˜ data๋ฅผ ๋ณ€๊ฒฝ์‹œํ‚ฌ ๋•Œ ์‚ฌ์šฉ

      • ์ƒ์„ฑ/์ˆ˜์ •/์‚ญ์ œ์— ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•˜์ง€๋งŒ, ์ฃผ๋กœ ์•„๋ž˜์™€ ๊ฐ™์ด ์‚ฌ์šฉ

        • ์ƒ์„ฑ - POST

        • ์ˆ˜์ • - PUT or PATCH

        • ์‚ญ์ œ - DELETE

5. JSP์˜ application class

https://gmlwjd9405.github.io/2018/11/03/jsp.html

JSP(Java Server Pages)๋ž€?

  • Java ์–ธ์–ด๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•˜๋Š” Server Side script language

    • HTML ๋‚ด์— Java code ๋ฅผ ์‚ฝ์ž…ํ•˜์—ฌ Web Server์—์„œ ๋™์ ์œผ๋กœ web page๋ฅผ ์ƒ์„ฑํ•˜์—ฌ web browser์— ๋Œ๋ ค์ฃผ๋Š” ์–ธ์–ด

JSP์˜ ์ฃผ์š” Class

  • Request

    • client ๊ฐ€ ์ „์†กํ•œ request ์ •๋ณด๋ฅผ ์ œ๊ณตํ•˜๋Š” ๊ฐ์ฒด

  • Response

    • client ์˜ request์— ๋Œ€ํ•œ HTTP response๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ๊ฐ์ฒด

  • pageContext

    • ํ•œ page ์— ๋Œ€ํ•œ ๋‚ด์žฅ ๊ฐ์ฒด

  • Session

  • Application

    • Page๋ฅผ service ํ•ด์ฃผ๋Š” web application ์— ๋Œ€ํ•œ ๊ฐ์ฒด

    • Server ์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ๊ฐ€์ง€๊ณ  ์œ ์ง€ํ•จ

์ฐธ๊ณ : https://jeong-pro.tistory.com/80

: **HTTP Protocol**์˜ ํŠน์ง•์ด์ž ์•ฝ์ ์„ ๋ณด์™„ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ

  1. Connectionless

    • Client ๊ฐ€ request๋ฅผ server์— ๋ณด๋‚ด๋ฉด, server๋Š” client์—๊ฒŒ ์š”์ฒญ์— ๋งž๋Š” response๋ฅผ ๋ณด๋‚ด๊ณ  ์ ‘์†์„ ๋Š๋Š”๋‹ค

  2. Stateless

    • ์—ฐ๊ฒฐ์„ ๋Š๋Š” ์ˆœ๊ฐ„ client ์™€ server์˜ ํ†ต์‹ ์ด ๋๋‚˜๋ฉฐ ์ƒํƒœ ์ •๋ณด๋Š” ์œ ์ง€ํ•˜์ง€ ์•Š๋Š”๋‹ค

Cookie์™€ Session์ด ์—†๋‹ค๋ฉด ์–ด๋–ค page ์—์„œ ์˜ฎ๊ฒจ๋‹ค๋‹ ๋•Œ๋งˆ๋‹ค ๋‹ค์‹œ login ์„ ํ•ด์•ผํ•จ!

  • Client์˜ local ์— ์ €์žฅ๋˜๋Š” key์™€ value๊ฐ€ ๋“ค์–ด์žˆ๋Š” ์ž‘์€ data file

  • ์ฟ ํ‚ค์—๋Š” ์ด๋ฆ„, ๊ฐ’, ๋งŒ๋ฃŒ๋‚ ์งœ(์ฟ ํ‚ค ์ €์žฅ๊ธฐ๊ฐ„), ๊ฒฝ๋กœ ์ •๋ณด๊ฐ€ ๋“ค์–ด์žˆ๋‹ค.

  • ์ฟ ํ‚ค๋Š” ์ผ์ •์‹œ๊ฐ„๋™์•ˆ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•  ์ˆ˜ ์žˆ๋‹ค.

    • ๋กœ๊ทธ์ธ ์ƒํƒœ ์œ ์ง€์— ํ™œ์šฉ

  • ์ฟ ํ‚ค๋Š” ํด๋ผ์ด์–ธํŠธ์˜ ์ƒํƒœ ์ •๋ณด๋ฅผ ๋กœ์ปฌ์— ์ €์žฅํ–ˆ๋‹ค๊ฐ€ ์ฐธ์กฐํ•œ๋‹ค.

  • ์ฟ ํ‚ค๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ๋”ฐ๋กœ ์š”์ฒญํ•˜์ง€ ์•Š์•„๋„ ๋ธŒ๋ผ์šฐ์ €๊ฐ€ Request์‹œ์— Request Header๋ฅผ ๋„ฃ์–ด์„œ ์ž๋™์œผ๋กœ ์„œ๋ฒ„์— ์ „์†ก ํ•œ๋‹ค

Cookie process

  1. ๋ธŒ๋ผ์šฐ์ €์—์„œ ์›นํŽ˜์ด์ง€ ์ ‘์†

  2. ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์š”์ฒญํ•œ ์›นํŽ˜์ด์ง€๋ฅผ ๋ฐ›์œผ๋ฉด์„œ ์ฟ ํ‚ค๋ฅผ ํด๋ผ์ด์–ธํŠธ ๋กœ์ปฌ(ํ•˜๋“œ)์— ์ €์žฅ

  3. ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์žฌ ์š”์ฒญ์‹œ ์›นํŽ˜์ด์ง€ ์š”์ฒญ๊ณผ ํ•จ๊ป˜ ์ฟ ํ‚ค๊ฐ’๋„ ์ „์†ก

  4. ์ง€์†์ ์œผ๋กœ ๋กœ๊ทธ์ธ ์ •๋ณด๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ์‚ฌ์šฉ

์ฟ ํ‚ค ์‚ฌ์šฉ ์‚ฌ๋ก€

  • ์ž๋™๋กœ๊ทธ์ธ

  • ํŒ์—…์—์„œ "์˜ค๋Š˜ ๋” ์ด์ƒ ์ด ์ฐฝ์„ ๋ณด์ง€ ์•Š์Œ" ์ฒดํฌ

  • ์‡ผํ•‘๋ชฐ์˜ ์žฅ๋ฐ”๊ตฌ๋‹ˆ

Session

  • ์ผ์ • ์‹œ๊ฐ„๋™์•ˆ ๊ฐ™์€ ๋ธŒ๋ผ์šฐ์ €๋กœ ๋ถ€ํ„ฐ ๋“ค์–ด์˜ค๋Š” ์ผ๋ จ์˜ ์š”๊ตฌ๋ฅผ ํ•˜๋‚˜์˜ ์ƒํƒœ๋กœ ๋ณด๊ณ  ๊ทธ ์ƒํƒœ๋ฅผ ์œ ์ง€ํ•˜๋Š” ๊ธฐ์ˆ 

    • ์›น ๋ธŒ๋ผ์šฐ์ €๋ฅผ ํ†ตํ•ด ์›น ์„œ๋ฒ„์— ์ ‘์†ํ•œ ์ดํ›„๋กœ ๋ธŒ๋ผ์šฐ์ €๋ฅผ ์ข…๋ฃŒํ•  ๋•Œ ๊นŒ์ง€ ์œ ์ง€๋˜๋Š” ์ƒํƒœ

Session process

  1. ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์„œ๋ฒ„์— ์ ‘์†์‹œ session ID๋ฅผ ๋ฐœ๊ธ‰

  2. ์„œ๋ฒ„์—์„œ๋Š” ํด๋ผ์ด์–ธํŠธ๋กœ ๋ฐœ๊ธ‰ํ•ด์ค€ session ID๋ฅผ ์ฟ ํ‚ค๋ฅผ ์‚ฌ์šฉํ•ด ์ €์žฅ (JSESSIONID)

  3. ํด๋ผ์ด์–ธํŠธ๋Š” ๋‹ค์‹œ ์ ‘์†ํ•  ๋•Œ, ์ด ์ฟ ํ‚ค(JSESSIONID)๋ฅผ ์ด์šฉํ•ด์„œ sessionID๊ฐ’์„ ์„œ๋ฒ„์— ์ „๋‹ฌ

    • session์„ ๊ตฌ๋ณ„ํ•˜๊ธฐ ์œ„ํ•ด ID๊ฐ€ ํ•„์š”ํ•˜๊ณ  ๊ทธ ID๋งŒ ์ฟ ํ‚ค๋ฅผ ์ด์šฉํ•ด์„œ ์ €์žฅํ•ด๋†“๋Š”๋‹ค. (์ฟ ํ‚ค์‚ฌ์šฉ)

    • ์ฟ ํ‚ค๋Š” ์ž๋™์œผ๋กœ ์„œ๋ฒ„์— ์ „์†ก๋˜๋‹ˆ๊นŒ ์„œ๋ฒ„์—์„œ session์•„์ด๋””์— ๋”ฐ๋ฅธ ์ฒ˜๋ฆฌ๋ฅผ ํ•  ์ˆ˜ ์žˆ์Œ

Session ์‚ฌ์šฉ ์‚ฌ๋ก€

: ๋กœ๊ทธ์ธ ์ •๋ณด ์œ ์ง€

7. SOLID ์›์น™

๊ฐ์ฒด์ง€ํ–ฅ 5๋Œ€ ์›์น™

  • SRP (Single Responsiblity Principle)

    • ๋‹จ์ผ ์ฑ…์ž„ ์›์น™

      • ์†Œํ”„ํŠธ์›จ์–ด์˜ ์„ค๊ณ„ ๋ถ€ํ’ˆ (class, method etc.) ์€ ํ•˜๋‚˜์˜ ์ฑ…์ž„ (๊ธฐ๋Šฅ)๋งŒ์„ ๊ฐ€์ ธ์•ผ ํ•œ๋‹ค

  • OCP (Open-Closed Principle)

    • ๊ฐœ๋ฐฉ-ํ์‡„ ์›์น™

      • ๊ธฐ์กด์˜ ์ฝ”๋“œ๋ฅผ ๋ณ€๊ฒฝํ•˜์ง€ ์•Š๊ณ  (closed), ๊ธฐ๋Šฅ์„ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋„๋ก (open) ์„ค๊ฒŒํ•ด์•ผ ํ•œ๋‹ค

  • LSP (Liskov Substitution Principle)

    • ๋ฆฌ์Šค์ฝ”ํ”„ ์น˜ํ™˜ ์›์น™

      • ์ž์‹ class ๋Š” ๋ถ€๋ชจ class์—์„œ ๊ฐ€๋Šฅํ•œ ํ–‰์œ„๋ฅผ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค

  • ISP (Interface Segregation Principle)

    • ์ธํ„ฐํŽ˜์ด์Šค ๋ถ„๋ฆฌ ์›์น™

      • ํ•˜๋‚˜์˜ ์ผ๋ฐ˜์ ์ธ interface ๋ณด๋‹ค๋Š”, ์—ฌ๋Ÿฌ๊ฐœ์˜ ๊ตฌ์ฒด์ ์ธ interface๊ฐ€ ๋‚ซ๋‹ค

  • DIP (Dependency Inversion Principle)

    • ์˜์กด ์—ญ์ „ ์›์น™

      • ์˜์กด ๊ด€๊ณ„๋ฅผ ๋งบ์„ ๋•Œ, ๊ตฌ์ฒด์ ์ธ class๋ณด๋‹จ interface ๋‚˜ abstract class์™€ ๊ด€๊ณ„๋ฅผ ๋งบ์–ด์•ผ ํ•œ๋‹ค

8. Jenkins ๋ž€?

์ง€์†์  ํ†ตํ•ฉ (Continuous Integration)

  • ๊ณต์œ  repository์— code ๋ฅผ ์ถ”๊ฐ€ํ•  ๋•Œ, ์ž๋™์œผ๋กœ project๋ฅผ buildํ•˜๊ณ  error, bug๋ฅผ testํ•˜๊ณ  ๊ฐœ๋ฐœ์ž์—๊ฒŒ ๊ฒฐ๊ณผ๋ฅผ ์•Œ๋ ค์ฃผ์–ด ์•ˆ์ „ํ•˜๊ฒŒ ๊ฐœ๋ฐœ์„ ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•˜๋Š” ๊ฒƒ

    • ์ด๋ฅผ ์œ„ํ•œ ๋Œ€ํ‘œ์ ์ธ Tools

      • Jenkins

      • CircleCI

  • ํ•„์š”ํ•œ ์ด์œ 

    • code ๊ฐ€ repository์— ๋ฐ˜์˜๋˜๊ธฐ ์ „์— ์ž๋™์œผ๋กœ ํ…Œ์ŠคํŠธ๋ฅผ ํ•˜๋ฏ€๋กœ ๋ฒ„๊ทธ๊ฐ€ ์ค„์–ด๋“ค๊ณ , ๋” ๋น ๋ฅธ ๊ฐœ๋ฐœ์ด ๊ฐ€๋Šฅํ•ด์ง!

    • ๊ฐ ๊ฐœ๋ฐœ์ž์˜ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์ด ๋‹ค๋ฅผ ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ ํ†ต์ผ๋œ ํ™˜๊ฒฝ์—์„œ code๋ฅผ test ํ•˜๋Š” ๊ฒƒ์€ ํ•„์ˆ˜!

9. JSON ๊ณผ XML ์˜ ์ฐจ์ด

JSON ์žฅ์ 

  • XML ๋ฌธ์„œ๋Š” XML DOM(Document Object Model)์„ ์ด์šฉํ•˜์—ฌ ํ•ด๋‹น ๋ฌธ์„œ์— ์ ‘๊ทผ

    • JSON์€ ๋ฌธ์ž์—ด์„ ์ „์†ก๋ฐ›์€ ํ›„์— ํ•ด๋‹น ๋ฌธ์ž์—ด์„ ๋ฐ”๋กœ ํŒŒ์‹ฑ

      • XML๋ณด๋‹ค ๋”์šฑ ๋น ๋ฅธ ์ฒ˜๋ฆฌ ์†๋„๋ฅผ ๋ณด์—ฌ์คŒ!

      • HTML๊ณผ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๊ฐ€ ์—ฐ๋™๋˜์–ด ๋น ๋ฅธ ์‘๋‹ต์ด ํ•„์š”ํ•œ ์›น ํ™˜๊ฒฝ์—์„œ ๋งŽ์ด ์‚ฌ์šฉ๋˜๊ณ  ์žˆ์Œ

XML์žฅ์ 

  • JSON์€ ์ „์†ก๋ฐ›์€ ๋ฐ์ดํ„ฐ์˜ ๋ฌด๊ฒฐ์„ฑ์„ ์‚ฌ์šฉ์ž๊ฐ€ ์ง์ ‘ ๊ฒ€์ฆํ•ด์•ผ ํ•จ

    • ๋ฐ์ดํ„ฐ์˜ ๊ฒ€์ฆ์ด ํ•„์š”ํ•œ ๊ณณ์—์„œ๋Š” ์Šคํ‚ค๋งˆ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ์˜ ๋ฌด๊ฒฐ์„ฑ์„ ๊ฒ€์ฆํ•  ์ˆ˜ ์žˆ๋Š” XML์ด ์•„์ง๋„ ๋งŽ์ด ์‚ฌ์šฉ๋˜๊ณ  ์žˆ์Œ

10. Overloading vs Overriding

  • ์˜ค๋ฒ„๋ผ์ด๋”ฉ(Overriding) ์ƒ์œ„ ํด๋ž˜์Šค์— ์กด์žฌํ•˜๋Š” ๋ฉ”์†Œ๋“œ๋ฅผ ํ•˜์œ„ ํด๋ž˜์Šค์—์„œ ํ•„์š”์— ๋งž๊ฒŒ ์žฌ์ •์˜ํ•˜๋Š” ๊ฒƒ

  • ์˜ค๋ฒ„๋กœ๋”ฉ(Overloading) ์ƒ์œ„ ํด๋ž˜์Šค์˜ ๋ฉ”์†Œ๋“œ์™€ ์ด๋ฆ„, return ๊ฐ’์€ ๋™์ผํ•˜์ง€๋งŒ, ๋งค๊ฐœ๋ณ€์ˆ˜๋งŒ ๋‹ค๋ฅธ ๋ฉ”์†Œ๋“œ๋ฅผ ๋งŒ๋“œ๋Š” ๊ฒƒ

    • ๋‹ค์–‘ํ•œ ์ƒํ™ฉ์—์„œ ๋ฉ”์†Œ๋“œ๊ฐ€ ํ˜ธ์ถœ๋  ์ˆ˜ ์žˆ๋„๋ก ํ•จ

Last updated