|
|
OOD 개발의 설계 원칙대한 내용입니다.
아래 내용은 클래스 설계 원칙에 대한 내용과 패키지 설계원칙으로 구분되어 있습니다.
자세한 내용은 아래 reference를 참고하세요.. ^^
1. 클래스 설계원칙
The first five principles are principles of class design. They are:
2. 패키지 설계원칙
The next six principles are about packages. In this context a package is a binary deliverable like a .jar file, or a dll as opposed to a namespace like a java package or a C++ namespace.
The first three package principles are about package cohesion, they tell us what to put inside packages:
The last three principles are about the couplings between packages, and talk about metrics that evaluate the package structure of a system.
* reference
- http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
Tag // ADP,
CCP,
CRP,
DIP,
iSP,
lsp,
OCP,
ooad,
OOD,
OOP 설계 5원칙,
Rep,
sap,
SDP,
SRP
Trackback Address >> http://www.sjava.net/trackback/229
발표를 위해서 인터넷과 책등의 자료를 통해서 만든 발표자료입니다.
준비기간이 좀 짧아서 내용은 충실하지 못하지만, 그래도 읽어보실 분은 보세요..ㅋㅋ
대략적으로 아래에 대한 내용으로 구성이 되어 있습니다.
1.정의
2.특징
3.배경
3.1이론적 배경
3.2환경적 배경
3.3기술적 배경
4.Data Model별 분류
5.Q&A
Trackback Address >> http://www.sjava.net/trackback/202
Trackback Address >> http://www.sjava.net/trackback/199
CAP Theorem은 분산 시스템이 갖추면 좋은 3가지의 특성입니다 .
wikipedia에 정리된 CAP Theorem의 특성은 아래와 같습니다.
Consistency : all nodes see the same data at the same time
Availability : node failures do not prevent survivors from continuing to operate
Partition Tolerance : the system continues to operate despite arbitrary message loss
흠,, 대충 C, A는 알겠는데, Partition Tolerance는 생소하네요..
Partition Tolerance에 대해서 살펴보니, http://devblog.streamy.com/tag/partition-tolerance/에 잘 설명이 되어 있네요..
Partition tolerance refers to the ability for a system to continue to
operate in the presence of a network partitions. For example, if I have
a database running on 80 nodes across 2 racks and the interconnect
between the racks is lost, my database is now partitioned. If the
system is tolerant of it, then the database will still be able to
perform read and write operations while partitioned. If not, often
times the cluster is completely unusable or is read-only.
모, 대충 이해하기로 네트웍의 문제로 인해서 정말로 서비스하는 노드가 분리(partition)되어서 잘 동작(tolerance)을 해야 된다는 얘기인듯..
그리고, 분산 시스템은 위의 CAP Theorem의 3가지 특성을 만족시킬 수 없기 때문에, 한가지 특성은 포기를 해야 한다고 하는 Brewer's CAP Theorem도 있네요..
위 내용은 분산시스템에 대한 기본적인 이론이라서, 꼭 알아둘 필요가 있을거 같습니다.
추후 NOSQL 관련 시스템 공부를 위해서.. ^^
Trackback Address >> http://www.sjava.net/trackback/188
김윤수님의 블로그에 Reentrant 와 Thread-safe 의 차이점에 대한 아주 좋은 내용이 있습니다.
아래는 블로그에 있는 Thread-safe와 Reentrant에 대한 정의내용입니다.
꼭, 블로그에 가셔서 읽어보시는걸 추천합니다. ^^
어떤 루틴 또는 프로그램이 Thread-safe하다라고 하면 여러 쓰레드에
의해 코드가 실행되더라도 실행 결과의 correctness가 보장되는 것을 뜻합니다.
이
에 비해 어떤 루틴 또는 프로그램이 Reentrant하다라고 하면 여러
쓰레드가 코드를 동시에 수행할 수 있고, 그런 경우에도 실행 결과의 correctness가 보장되는
것을 뜻합니다.
Trackback Address >> http://www.sjava.net/trackback/179
Trackback Address >> http://www.sjava.net/trackback/174
aggregation은 association의 하위 분류로, 집합적인 관계를 표시합니다. 연관관계를 가지는 클래스 객체와 라이프 사이클이 동일하지 않을 경우, aggregation 관계입니다.
1. class diagram
2. code
2.1 I.java
public class I {
private ArrayList<J> array;
public I() {
}
public void setArray(ArrayList<J> array) {
this.array = array;
}
}
2.2 J.java
public class J {
private J j;
}
Trackback Address >> http://www.sjava.net/trackback/173
Trackback Address >> http://www.sjava.net/trackback/172
dependency는 의존적인 관계를 나타냅니다.
1. class diagram
2. code
2.1 E.java
public class E {
public void handle(F f) {
}
}
2.2 F.java
public class F {
}
Trackback Address >> http://www.sjava.net/trackback/171
association은 단순하게 관계가 있다는 말이죵.. 관계에는 단방향과 양방향이 있겠죵.. ^^
그리고, association은 집합적인 개념으로 aggregation과 composition을 포함하고 있습니다..
1. 양방향
- 아래의 그림처럼 실선으로 표현합니다.
- 위 Diagram을 통해서 도출된 코드는 아래와 같습니다.. ^^
A.java
public class A {
/** */
public B Unnamed1;
}
B.java
public class B {
/** */
public A Unnamed1;
}
2. 단방향
- 아래의 그림처럼 화살표와 실선으로 표현합니다.
- 위 Diagram을 통해서 도출된 코드는 아래와 같습니다.. ^^
C.java
public class C {
/** */
public D Unnamed1;
}
D.java
public class D {
}
Trackback Address >> http://www.sjava.net/trackback/170
delegation(위임)에 대한 정의는 아래와 같다.
Delegation means that you use an object of another class as an instance variable, and forward messages to the instance.
아래 예제는 위키의 Delegation Pattern 페이지에 나와있는 Java 예제입니다.
class RealPrinter { // the "delegate"
void print() {
System.out.print("something");
}
}
class Printer { // the "delegator"
RealPrinter p = new RealPrinter(); // create the delegate
void print() {
p.print(); // delegation
}
}
public class Main {
// to the outside world it looks like Printer actually prints.
public static void main(String[] args) {
Printer printer = new Printer();
printer.print();
}
}
누군가 말씀하신, 이벤트 소스/이벤트 핸들러/이벤트 리스너 어쩌주 저쩌구 거창한 얘기가 필요없다..
쉽게쉽게 가장.. ^^
Trackback Address >> http://www.sjava.net/trackback/169
프레임웍과 툴킷의 차이입니다.
아래 내용은 http://kamalmeet.com/?p=24 에서 참고를 하였습니다.
a toolkit is something which will provide you with some tools or methods which will help you achieve your goal.
a framework is something that provides you a way in which the application should be created.
Trackback Address >> http://www.sjava.net/trackback/167
플랫폼과 프레임웍에 대한 비교내용입니다.
wikipedia보다 더 잘 정의가 되어 있는 내용이 있어서 올려봅니다.
아래 내용을 읽어보니, 느낌이 확 오네요.. ^^
출처 정보는 아래와 같습니다. 흠. 복사할때 아래의 정보를 넣어주네요.. 네이버 참 좋다..^^
platform
1) In computers, a platform
is an underlying computer system on which application programs can run.
On personal computers, Windows 2000 and the Mac OS X are examples of two
different platforms. On enterprise servers or mainframes, IBM's S/390 is an
example of a platform.
A platform consists of an operating system, the computer
system's coordinating program, which in turn is built on the instruction
set for a processor or microprocessor, the hardware that
performs logic operations and manages data movement in the computer. The
operating system must be designed to work with the particular
processor's set of instructions. As an example, Microsoft's Windows 2000
is built to work with a series of microprocessors from the Intel
Corporation that share the same or similar sets of instructions. There
are usually other implied parts in any computer platform such as a
motherboard and a data bus, but these parts have increasingly become
modularized and standardized.
Historically,
most application programs have had to be written to run on a particular
platform. Each platform provided a different application program
interface for different system services. Thus, a PC program would have
to be written to run on the Windows 2000 platform and then again to run
on the Mac OS X platform. Although these
platform differences continue to exist and there will probably always be
proprietary differences between them, new open or standards-conforming
interfaces now allow many programs to run on different platforms or to
interoperate with different platforms through mediating or "broker"
programs.
2) A platform is
any base of technologies on which other technologies or processes are
built.
framework

In general, a framework is a real or conceptual structure
intended to serve as a support or guide for the building of something
that expands the structure into something useful.
In computer systems, a
framework is often a layered structure indicating what kind of programs
can or should be built and how they would interrelate. Some computer
system frameworks also include actual programs, specify programming
interfaces, or offer programming tools for using the frameworks. A
framework may be for a set of functions within a system and how they
interrelate; the layers of an operating system; the layers of an
application subsystem; how communication should be standardized at some
level of a network; and so forth. A framework is generally more
comprehensive than a protocol and more prescriptive than a
structure.
Trackback Address >> http://www.sjava.net/trackback/166
Trackback Address >> http://www.sjava.net/trackback/147
Trackback Address >> http://www.sjava.net/trackback/98
Trackback Address >> http://www.sjava.net/trackback/86
|
|
|