Django ORM

https://www.slideshare.net/perhapsspy/django-42665652

 

Django, 저는 이렇게 씁니다.

Django로 알파카코믹스 프로젝트를 진행하면서 겪은 몇가지 문제 해결에 대한 간략한 소개입니다. 파이썬 코리아 세미나에서 발표한 자료입니다.

www.slideshare.net

https://docs.djangoproject.com/en/2.2/topics/db/examples/

 

Examples of model relationship API usage | Django documentation | Django

Django The web framework for perfectionists with deadlines.

docs.djangoproject.com

 

비동기 IO

- 필요한 이유, Worker 의 개념

http://egloos.zum.com/killins/v/3093026

 

Celery, Distributed task queue 혹은 worker

웹서비스에서 뒷단의 작업을 처리하는 별도의 프레임웍을 사용하는 케이스가 많은데 보통 이런 기능을 하는 프레임웍을 worker라고 많이들 부른다. 그중 파이썬으로 작성된 celery 및 worker의 간단한 개념을 정리해본다.사실 celery를 무엇이라고 불러야할지 명확하게 잘 모르겠다. Celery 공식 홈페이지에는 Distributed task queue

egloos.zum.com

 

메시지 큐 오픈소스https://www.rabbitmq.com/tutorials/tutorial-one-python.html

 

RabbitMQ tutorial - "Hello world!" — RabbitMQ

Introduction Prerequisites This tutorial assumes RabbitMQ is installed and running on localhost on standard port (5672). In case you use a different host, port or credentials, connections settings would require adjusting. Where to get help If you're having

www.rabbitmq.com

 

- Demo

https://spoqa.github.io/2012/05/29/distribute-task-with-celery.html

 

Celery를 이용한 긴 작업 처리

처리 시간이 오래 걸리는 작업을 Celery를 통해 개선하는 방법을 알아봅니다.

spoqa.github.io

https://www.slideshare.net/JueunSeo1/django-64975491

 

Django에서의 대용량 트래픽 처리 - 병목을 찾아라

서주은 - zuneseo@buzzvil.com Django에서의 대용량 트래픽 처리 - 병목을 찾아라

www.slideshare.net

 

- Usage

https://www.linode.com/docs/development/python/task-queue-celery-rabbitmq/

 

How to Set Up a Task Queue with Celery and RabbitMQ

How to Set Up a Task Queue with Celery and RabbitMQ

www.linode.com

 

Docker 배포

https://github.com/chrisk314/django-celery-docker-example

 

chrisk314/django-celery-docker-example

Example Docker setup for a Django app behind an Nginx proxy with Celery workers - chrisk314/django-celery-docker-example

github.com

 

 

 

 

기존에 Unity 개발을 위해 SDK를 설치했는데, 안드로이드 개발이 필요해서 Eclipse 를 사용하려던 찰나 SDK Manager가 Eclipse에서 열리지 않는 문제가 발생

 

원인은 Android Studio에서 사용하는 SDK와 Eclipse 에서 사용하는 SDK 가 다른거기 때문이다;

 

버전이 달라서 구버전 SDK를 설치해서 써야함

 

https://stackoverflow.com/questions/42724450/failed-to-get-the-required-adt-version-number-from-the

 

Failed to get the required ADT version number from the

Yesterday I tried to install ADT plugin to Eclipse, but when I restarted it I found the next screen: When I click on "Open SDK Manager", I see something loading but after waiting it doesn't open

stackoverflow.com

 

그 외 경로문제도 있는 듯

http://egloos.zum.com/thegoodmen/v/6133033

 

Fail to get the required adt version number from the sdk

참조 : https://stackoverflow.com/questions/42724450/failed-to-get-the-required-adt-version-number-from-the 이클립스에 SDK를 연동하는 과정에서 이런 현상이 계속해서 발생한다.위와 같은 팝업이 발생하고,이렇게 SDK Manager가 실행되는듯 하다가 아무 창도 열리지가 않았

egloos.zum.com

 

또한, 버전 (현재 API 29 까지 나온 상태) 문제로 인해 sdk manager 로 설치되지 않은 라이브러리는 사용할 수 없음. 애초에 프로젝트 생성할 때 최소, 최대 SDK 를 모두 최신으로 맞춰놓고 시작해야 이런 성가신 문제가 안생김

https://yoonandro.tistory.com/6?category=903143

 

안드로이드 appcompat_v7

안드로이드 4.4(Android KitKat) 버전으로 프로젝트 생성 시 자동으로 appcompat_v7 이라는 프로젝트가 함께 생성됩니다. appcompat_v7를 삭제하면 프로젝트에 x 와 함께 오류가 발생하여 오류 수정하기도 참 귀찮..

yoonandro.tistory.com

 

한 가지 더, 이클립스에서 빌드 툴 버전은 25.0.3 까지만 허용된다. 그 위로는 오류 발생함..

https://m.blog.naver.com/PostView.nhn?blogId=kkson50&logNo=221208277244&proxyReferer=https%3A%2F%2Fwww.google.com%2F

 

[문제해결] Unable to build: the file dx.jar was not loaded from the SDK folder

에러현상Eclipse ADT에서 발생한 에러입니다. Failed to load d:\Android\sdk\build-tools\26.0.2\li...

blog.naver.com

https://triest.tistory.com/2

 

Unable to build: the file dx.jar was not loaded from the SDK folder! 오류 해결

안드로이드 스튜디오 3.0으로 업데이트 하면서 기존 이클립스에서 안드로이드 프로젝트 빌드를 하려고 하면 아래와 같은 오류가 발생한다. build-tools/26.0.2/dx.jar was not loaded from the SDK folder! dx.ja..

triest.tistory.com

 

 

[+] 추가

https://s2junn.tistory.com/84

 

맥(Mac) 에서 Eclipse 로 Android 개발하기

0 - 1. 아래 URL 을 참고하여 JDK 를 설치한다. http://s2junn.tistory.com/82 0 - 2. 아래 URL 을 참고하여 Eclipse 를 설치한다. http://s2junn.tistory.com/83 1. Eclipse 를 실행 후 Help - Install New Softw..

s2junn.tistory.com

 

 

 

 

컴포넌트(Component)

 

배포의 단위로, 계속 요구사항을 수용하며 바뀔 수 있는 타입들의 집합이다. 이러한 타입들을 여러 컴포넌트로 구성할 경우 컴포넌트화(Componentiation)라고 한다. 단순히 소스코드만 포함된 것이 아니라, 정말 소프트웨어를 배포할 때 필요한 모든 것을 일컫는다.

 

 

의존성(Dependency)

 

프로그램이 실행되기 위해 다른 일부를 요구할 때를 의미하며, 보통 A(=요구하는 프로그램)가 B(=다른 일부)에 의존한다고 표현한다. 

 

예를 들어, 자동차가 기름이 있어야 동작하는데 그 기름이 특정 공장에서 제조한 기름이어야 할 경우 자동차는 그 기름에 의존한다고 할 수 있다. 이처럼 소프트웨어 개발에도 특정 일부가 있어야만 프로그램이 동작할 수 있는 경우 의존한다, 의존성이 존재한다고 말한다.

 

소프트웨어가 커지면 커질수록 의존성을 관리할 필요가 있다. 프로그래머는 제품의 컴포넌트(Component)를 개발할 때 빈번하게 다른 컴포넌트를 재사용할 수 있다. 이는 실제 사례에서 많이 볼 수 있다. 문제는 재사용할 코드도 많고, 그 코드들은 또 다른 코드를 재사용하고, ... 이러한 상황이 계속 반복되면 굉장히 복잡하고 골치아파진다. 그래서 이미 이용 가능한, 같은 유형의 컴포넌트를 개발하는데 시간을 쏟기보다 비즈니스 로직에 집중하기 위해 의존성 관리(Dependency Management)를 알아두는 것이 매우 중요하다.

 

또한, 의존자(dependant)가 프로젝트에서 필수적인 구성요소일 경우 hard dependency 라고 하고, 선택적인 구성요소일 경우 soft dependency 라고 한다.

 

객체 지향 프로그래밍(Object-Oriented Programming, OOP)에서 의존성은 크게 4가지로 분류될 수다.

  • Class Dependency: A 클래스의 생성자나 메소드에서 B 클래스를 사용 중일 경우, B 클래스가 다른 패키지 또는 컴포넌트에 존재한다면 A 클래스는 해당 패키지나 컴포넌트를 선언하지 않고서는 실행할 수 없다. B 클래스 없이 A 클래스가 객체로 인스턴스화될 수 없는 것이다.
  • Interface Dependency: 클래스에서 특정 인터페이스 타입을 사용 중일 경우 위와 마찬가지로 해당 인터페이스에 대한 정보 없이 클래스를 객체로 인스턴스화할 수 없다.
  • Method or Field Dependency: 클래스에서 특정 객체의 메소드나 필드를 사용 중일 때 발생한다.
  • Direct and indirect Dependency: A 클래스가 B 클래스를 의존하고, B 클래스가 C 클래스를 의존할 때, A 클래스는 C 클래스를 간접적으로 의존한다고 한다. 왜냐하면 어차피 C 클래스가 없으면 B 뿐만 아니라 A 클래스도 객체로 인스턴스화될 수 없기 때문이다.

좀 더 큰 범위에서는 다음과 같이 분류된다.

  • API Dependency (Surface Dependency): 함수의 인자, 반환 값, 인터페이스 등 외부 API에 접근하는 부분을 포함할 경우 발생한다. Interface, Parameter, Return Type, Attribute, Nested Type 이 API Dependency의 좋은 예이다.
  • Implementation Dependency: 내부적으로 특정 Type 을 사용하거나 메소드를 사용하는 경우에 해당된다.
  • Circular Dependency: A 와 B 가 서로 의존하는 경우에 해당되며, 간접적인 경우도 포함된다. 최악의 의존성이다.

 

의존성을 없애는 방법: https://medium.com/@harivigneshjayapalan/dagger-2-for-android-beginners-di-part-i-f5cc4e5ad878

 

Dagger 2 for Android Beginners — DI part I

This story is the second part of the series, Dagger 2 for Android Beginners. If you did not read the previous one, you can start from here.

medium.com

 

 

빌드(Build)

 

소스코드를 오브젝트 코드로 변경하는 것을 컴파일(Compile)이라 한다. 흔히 .java를 .class나 .o 파일로 만든다거나, .cpp 파일을 .o 파일로 만드는 행위를 의미하는데, 애플리케이션을 빌드한다는 것은 이보다 더 큰 범위를 뜻한다.

 

어떤 프로젝트 단위에서 특정 플랫폼 위에서 홀로 돌아갈 수 있는 프로그램을 만들려면, 소스코드 외에 다양한 파일들이 요구되기도 한다. 의존성 관련 파일도 포함될 것이다. 그리고 소스코드를 포함한 프로젝트 내 여러 파일들을 실행가능한 프로그램으로 변환하는 절차를 빌딩(Building)이라 한다. 빌딩은 컴파일링(Compiling), 링킹(Linking), 패키징(Packaging) 같은 단계들의 집합으로 구성된다.

 

그리고 이 역할을 수행하기 위해 빌드 도구(Build Tool)가 존재한다. 빌드 도구란 소스코드로부터 실행가능한 애플리케이션을 제작하는 과정을 자동화하는 프로그램이다.

 

빌드 도구는 주로 아래의 내용을 수행한다.

  • 의존성 있는 라이브러리, 패키지, 파일 등을 다운로드하기
  • 바이너리 코드로 컴파일 해서 패키징하기
  • 프로그램 테스트
  • 배포하기

빌드 도구: Maven, Ant, Gradle, Gulp, Webpack

 

[+] 추가

Maven vs Gradle

Ant vs Maven vs Gradle

 

 

Reference

 

의존성: https://medium.com/@harivigneshjayapalan/dagger-2-for-android-beginners-introduction-be6580cb3edb

 

Dagger 2 for Android Beginners — Introduction

Dagger is a fully static, compile-time dependency injection framework for both Java and Android. It is an adaptation of an earlier version…

medium.com

 

의존성 관리: https://arload.wordpress.com/2008/07/10/dependency/

 

Dependency에 대한 고찰

요즘 소프트웨어가 갈수록 거대해지면서 소프트웨어 통제에 대해 많은 애기를 들을수 있습니다. 그리고 소프트웨어 통제를 들어보신 분이라면, xDepend 라는 툴은 한번쯤 들어보셨을 겁니다. 이번  post는 아키텍쳐 설계시 dependency는 무엇이고 어떠한 종류가 있는지 설명하고, dependency를 관리할때 유용한 Layering과  xdepen…

arload.wordpress.com

 

인트로: https://medium.com/@dulajdilshan/do-you-know-maven-a-dependency-manager-or-a-build-tool-what-is-pom-bd7dd8b43e80

 

Do you know MAVEN ? A Dependency Manager or a Build tool ? What is POM ?

How would you like to understand maven ? Build tool ?

medium.com

 

For Java

https://www.diatomenterprises.com/dependency-management-tools-for-java/

 

Dependency management tools for Java

Regardless of your experience in Java you have certainly heard about building applications. Even if your single Java code consists of just one class declaration...

www.diatomenterprises.com

 

 

For Python

https://packaging.python.org/tutorials/managing-dependencies/

 

Managing Application Dependencies — Python Packaging User Guide

Managing Application Dependencies The package installation tutorial covered the basics of getting set up to install and update Python packages. However, running these commands interactively can get tedious even for your own personal projects, and things ge

packaging.python.org

 

https://medium.com/@jimjh/managing-dependencies-in-python-applications-b9c93dda98c2

 

Managing Dependencies in Python Applications

How to build reliable environments, share internal libraries, and migrate major versions in a growing organization.

medium.com

 

For C/C++

https://foonathan.net/blog/2016/07/07/cmake-dependency-handling.html

 

Tutorial: Easy dependency management for C++ with CMake and Git

This tutorial describes a simple way to handle external dependencies for C++ projects. It only uses native CMake and git, doesn't require any external package managers and is completely transparent for the user.

foonathan.net

 

https://hackernoon.com/approaches-to-c-dependency-management-or-why-we-built-buckaroo-26049d4646e7

 

Approaches to C++ Dependency Management, or Why We Built Buckaroo

C++ is an unusual language in that it does not yet have a dominant package manager (we’re working on it!).

hackernoon.com

 

 

'Note' 카테고리의 다른 글

오픈소스 가이드  (0) 2019.06.30
Eclipse + Android SDK  (0) 2019.04.06
Android Plugin 만들기 / Unity 에서 사용하기  (0) 2019.03.30
NginX 프록시 환경설정 방법 (Nginx - WSGI)  (0) 2019.02.27
[GooglePlay] 인앱 결제  (0) 2018.12.29

+ Recent posts