'Back-End'에 해당되는 글 135건

donaricano-btn

 AOP_1


1. What is AOP?

- AOP란 업무 등 특정 책임이 있는 클래스(예로 주문 클래스, 계좌클래스) 안에 본질적인 처리만 기술하고, 본질적이지 않은 처리는 밖으로 꺼내는 기술(로그, 트랜잭션)


- AOP를 도입함으로 오브젝트가 원래 실행해야 하는 본질적인 처리와 그밖에 횡단관심사(Crosscutting concerns)로 불리는, 복수의 오브젝트에 걸쳐 기술되기 쉬운 처리를 분리해 모듈성을 높인다


1_1. AOP

1) Aspect

- Advice(동작) + Pointcut(동작 적용조건)

- 횡단관심사의 동작그 횡단관심사를 적용하는 소스 코드상의 포인트를 모은 것\


2) Joinpoint

- 어드바이스가 실행하는 동작을 끼워 넣을 수 있는 때

- 메소드가 정확히는 메소드가 호출 될 떄와 메소드가 원래 호출한 곳으로 돌아갈 떄를 말한다


3) Advice

- 조인포인트에서 실행되는 코드


4) Pointcut

- 조인포인트와 어드바이스의 중간에 위치 하여 처리가 조인포인트에 이르렀을때 어드바이스를 호출할지 선별한다




2. Advice

2_1. Advice의 종류

        • Before : 조인포인트 앞에서 실행할 어드바이스
        • After :  조인포인트 뒤에서 실행할 어드바이스
        • AfterReturning : 조인포인트가 완전히 정상 종료한 다음에 실행되는 어드바이스
        • Around : 조인포인트 앞뒤에서 실행되는 어드바이스
        • AfterThrowing : 조인포인트에서 예외가 발생했을 떄 실행되는 어드바이스


3. Proxy

- 프록시를 이용한 AOP 구현


1) Q클래스엔 R 인터페이스 타입의 인스턴스 변수가 있으며 @Autowired 되어있다

2) RImpl 클래스의 어느 메소드를 실행해도 어드바이스가 동작한다고 가정

3) DIxAOP 컨테이너는 R인터페이스를 구현한 프록시 클래스의 인스턴스 자동생하여 Q클래스의 R인터페이스형 인스턴스에 인젝션해버린다

4) Q클래스는 인젝션 된 내용이 R인지 프록시인지 알수 없다

5) 자동 생성된 프록시 클래스의 인스턴스는 진짜 RImpl 클래스로 구현된 메소드를 호출하게 되어있고 종류에 따라 RImpl 클래스의 메소드를 호출하기 전후에 어드바이스를 호출한다 




'Back-End > SpringFrame_1' 카테고리의 다른 글

[Spring] DI_2  (0) 2016.07.17
[Spring] DI_1  (0) 2016.07.16
[Spring]8_4 Skill of Spring  (0) 2016.02.28
[Spring]8_2.Purpose of Spring - 스프링의 목적  (0) 2016.02.28
[Spring]8_1.Definition of Spring - 스프링이란?  (0) 2016.02.28
블로그 이미지

리딩리드

,

[Jsp] Cycle of Jsp

Back-End/Jsp 2016. 7. 4. 18:11
donaricano-btn

Cycle of Jsp


1. Jsp

- Jsp technology is used to create web application just like Servlet technology. It can be thought of as an extension to servlet because it provides more functionality than servlet such as expression language, jstl...


2. Advantage of JSP over Servlet


2_1. Extension to servlet

- JSP technology is the extension to servlet technology. We can use all the feature of servlet in JSP

- We can use implicit objects, predefined tags, expression language and Custom tags in JSP


2_2. Easy to maintain

- JSP can be easily managed because we can easily separate our business logic with presentation logic


2_3. Fast Development: No need to recompile and redeploy

- If JSP page is modified, we don't need to recompile and redeploy the project.


2_4. Less code than Servlet

- In JSP, we can use a lot of tags such as action tags, jstl, custom tags etc. that reduces the code


3. Life cycle of a JSP Page

        • Translation of JSP Page
        • Compilation of JSP Page
        • Classloading(class file is loaded by the classloader)
        • Instantiation(object of the Generated Servlet is created)
        • Initialization(jspinit() method is invoked by the container)
        • Request processing( _jspService() method is invoked by the container)
        • Destroy (jspDestroy() method is invoked by the contaier)


1) JSP page is translated into servlet by the help of JSP Translator

- JSP Translator is a part of webserver


2) Servlet page is compiled by the compiler and gets converted into the class file

3) All the processes that happens in servlet is performed on JSP later like initailization, committing response to the browser and destroy


4. Directory structure of JSP

The directory structure of JSP page is same as servlet.



'Back-End > Jsp' 카테고리의 다른 글

[Jsp] Page directives  (0) 2016.07.06
[Jsp] Implicit Object_2  (0) 2016.07.06
[Jsp] Implicit Objects_1  (0) 2016.07.05
[Jsp] JSP tags  (0) 2016.07.05
[Jsp] JSP API  (0) 2016.07.05
블로그 이미지

리딩리드

,
donaricano-btn

  Object and Class


- Object is the physical as well as logical entity

- Class is the logical entity only


1. Object in java

- An entity that has state and behavior is known as an object

- An object has three characteristics

1_1. state: represents data(value) of an object

1_2. behavior : represents the behavior(functionality) of an object such as deposit, withdraw

1_3. identity : Object identity is typically implemented via a unique ID. The value of the ID is not visible to the external user. But is is used internally by the JVM to identify each object uniquely


- Object is an instance of a class

: Class is a template or blueprint from which objects are created


2. Class in Java

- A class is a group of objects that has common properties. It is a template or blueprint from which objects are created

- A class in java can contain

        • data member
        • method
        • constructor
        • block
        • class and interface

2_1. new Keyword

- The new keyword is used to allocate memory at runtime


3. Example

- Object gets the memory in Heap area and reference variable refers to the object allocated in the Heap memory area

'Back-End > Java_1' 카테고리의 다른 글

[Java] Constructor_2  (0) 2016.07.26
[Java] Method Overloading  (0) 2016.07.25
[Java] Java OOPs Concepts  (0) 2016.06.27
[Java] Json  (0) 2016.06.15
[Java] UnicodeSystem  (0) 2016.06.10
블로그 이미지

리딩리드

,
donaricano-btn

 Java OOPs Concepts


1. OOPs(Object Oriented Programming System)

- Object means a real world entity such as pen, chair, table, etc..

- OOPs is a methodology or paradigm to design a program using classes and objects

- Object, Class, Inheritance, Polymorphism, Abstaraction, Encapsulation


1_1. Object 

- Any entity that has state and behavior is known as an object


1_2. Class

- Collection of objects 


1_3. Inheritance

- When on object acquires all the properties and behaviours of parent object

- It provides code reusability. It is used to achieve runtime polymorphism


1_4. Polymorphism

- When one task is performed by different ways i.e. known as polymorphism

- In java, we use method overloading and method overriding to achieve polymorphism


1_5. Abstraction

- Hiding internal details and showing functionality

- In java, we use abstraction class and interface to achieve abstraciton


1_6. Encapsulation

- Binding (or wrapping) code and data together into a single unit 

- A java class is the example of encapsulation, Java bean is the fully encapsulated class

because all the data members are private here


2. What is difference between object-oriented programming language and object-based programming language(Javascript)?

- Object based programming language follows all the features of OOPs except Inheritance.





'Back-End > Java_1' 카테고리의 다른 글

[Java] Method Overloading  (0) 2016.07.25
[Java] Object and Class  (0) 2016.06.27
[Java] Json  (0) 2016.06.15
[Java] UnicodeSystem  (0) 2016.06.10
[Java] JVM  (0) 2016.06.03
블로그 이미지

리딩리드

,