-
Tips for Class Connection Representation using PlantUML
Distinguishing connecting representation. Extension <|– Composition *– Aggregation o– Normaly developers used to 3 types of line such as Extension, Composition and Aggregation for representing connectivity of classes. For detail, let me explain each ones. Extension is most simple. If you extend class using some interface or some abstract class then use Extension line that…
-
AWS S3 를 활용한 데이터 파일 관리 with Java Source Code
Spring Configuration File @Configuration @EnableContextResourceLoader @EnableContextCredentials( accessKey = “”, secretKey = “”, instanceProfile = true) @EnableContextRegion(region = “us-east-1”) public class AWSConfig { } Upload using InputStream TransferManager tm = new TransferManager(amazonS3); ObjectMetadata metadata = new ObjectMetadata(); byte[] contentBytes = IOUtils.toByteArray(inputStream); Long contentLength = Long.valueOf(contentBytes.length); metadata.setContentLength(contentLength); Upload upload = transferManager.upload(bucketName, filename, new ByteArrayInputStream(contentBytes), metadata); return…
-
Java Spring DDD (Domain Driven Design) 설계 방법론 (2) – Project Packaging
프로젝트를 페키징 하는 것은 향후 유지보수화 소수 가독성을 위해 잘 고려될 필요가 있다. 각 레이어별 기능을 정의하는데 Package 단위로 정의하게될 가능성이 높기 때문이다. 일반적으로 스프링 프레임워크를 사용해 자바 프로젝트의 프로젝트 패키지를 설계할 때, 도메인 레이어의 핵심 비즈니스 로직을 포함하는 domain, 핵심 서비스 기능을 구현하는 application, domain과 application 패키지의 백업 기능을 구현하는 infrastructure, API 등 핵심…
-
파사드(facade) – 디자인패턴 이야기 (Story of design patterns)
드워프의 금광 캐기 금광을 캐기 위해선 3가지 일을 해야한다. 먼저 금광 터널을 뚫어야 하며, 금을 캐야하고 마지막으로 금을 날라야 한다. 이 세가지 작업을 드워프 혼자서 하려면 3단계 업무가 필요하다 굴파기 금캐기 나르기 하지만 드워프 1명이서는 하루에 한가지 작업만 할 수 있는데, 하루 일과는 이렇다. 일어나기 광산으로 이동 일하기 집에가기 잠자기 파사드는 드워프들의 고용주이며,…
-
Parsing World Cities Population Information
In order to make service to use locations, need to get the world cities informations in many cases. Fortunately, [worldcitiespop] is one of the db data to get easier. This source is to parse the information from file [wolrdcitiespop] using Java. Easy to understand, easy to changing source. If you want Have fun! https://github.com/kool22/worldcitiespop
-
Java Spring DDD (Domain Driven Design) 설계 방법론 (1) – Maven 설정
Maven은 Dependency 관리 뿐만 아니라 Build 등 여러가지 기능을 활용할 수 있는 훌륭한 툴입니다. 최근에는 Gradle이 Spring쪽에서 애용되는 것으로 보이나 그 전까지는 충분히 제 역할을 했었던 관리 툴입니다. 단지 XML 설정이라는 제한성때문에 약간 기피대상이 되는 것 같습니다. Maven은 Eclipse나 IntelliJ나 호환성이 상당히 뛰어나고 다루기 쉽습니다. 프로젝트 내에 pom.xml 파일만 있다면 해당 파일을 수정해 Project의 설정을…
-
Java Spring DDD (Domain Driven Design) 설계 방법론 (0)
안녕하세요. 쿠입니다. 이번엔 정말 마음먹고 Java Spring 으로 DDD 설계하는 방법을 블로깅 하기로 했습니다. 최근 2주간 사내 자바 서버 작업자 인수인계를 준비하고 Domain 구조를 변경하면서 격고있는 시행착오와 방법들을 정리해 공유할 목적으로 글을 남깁니다. 이 글을 보시면 Java로 전체 프레임워크를 어떻게 구성하실 수 있을지 대략적으로 구조화 하실 수 있을 것이라고 생각합니다. 서버 기능 구성요소. 일단 사내…