среда, 18 апреля 2018 г.
понедельник, 16 апреля 2018 г.
пятница, 13 апреля 2018 г.
среда, 11 апреля 2018 г.
вторник, 10 апреля 2018 г.
воскресенье, 8 апреля 2018 г.
In Java, what exactly will the JVM interpreter and the JIT compiler do with the bytecode?
https://www.quora.com/In-Java-what-exactly-will-the-JVM-interpreter-and-the-JIT-compiler-do-with-the-bytecode
The Just-In-Time (JIT) compiler is a component of the Java™ Runtime Environment that improves the performance of Java applications at run time.
Java programs consists of classes, which contain platform-neutral bytecodes that can be interpreted by a JVM on many different computer architectures. At run time, the JVM loads the class files, determines the semantics of each individual bytecode, and performs the appropriate computation. The additional processor and memory usage during interpretation means that a Java application performs more slowly than a native application. The JIT compiler helps improve the performance of Java programs by compiling bytecodes into native machine code at run time.
The JIT compiler is enabled by default, and is activated when a Java method is called. The JIT compiler compiles the bytecodes of that method into native machine code, compiling it "just in time" to run. When a method has been compiled, the JVM calls the compiled code of that method directly instead of interpreting it. Theoretically, if compilation did not require processor time and memory usage, compiling every method could allow the speed of the Java program to approach that of a native application.
The Just-In-Time (JIT) compiler is a component of the Java™ Runtime Environment that improves the performance of Java applications at run time.
Java programs consists of classes, which contain platform-neutral bytecodes that can be interpreted by a JVM on many different computer architectures. At run time, the JVM loads the class files, determines the semantics of each individual bytecode, and performs the appropriate computation. The additional processor and memory usage during interpretation means that a Java application performs more slowly than a native application. The JIT compiler helps improve the performance of Java programs by compiling bytecodes into native machine code at run time.
The JIT compiler is enabled by default, and is activated when a Java method is called. The JIT compiler compiles the bytecodes of that method into native machine code, compiling it "just in time" to run. When a method has been compiled, the JVM calls the compiled code of that method directly instead of interpreting it. Theoretically, if compilation did not require processor time and memory usage, compiling every method could allow the speed of the Java program to approach that of a native application.
Understanding Dynamic Proxy : Spring AOP Basics
http://www.javaroots.com/2013/03/understanding-dynamic-proxy-spring-aop.html
Why AOP :
To Understand AOP(Aspect Oriented Programming), we need to understand Cross Cutting Concerns in software development . In every project , there is some amount of code which gets repeated in multiple classes , across several modules.For example logging which needs to be done for almost all classes and for all module.This kind of code reduces code's re usability , maintainability and scalability.For example , if you want to take the class and reuse it somewhere else , where logging is not needed , you have to change this class . Similarly, if validation or logging is changed , we have to change almost each and every class wherever this is used .
A class should focus on it's core functionality , things like logging ,validation , transaction etc are not part of class functionality .
Aspect Oriented Programming is the paradigm to help us removing these cross cutting concerns. It provides us the tools and methodology to separate our cross cutting code from classes .
Proxy Pattern:
We can create a proxy of the object , which will take care of the cross cutting concern code.There are two kind of proxy patterns :Static Proxy :
Where we create a proxy object for every class. This is not feasible and practicalDynamic Proxy :
In this , proxies are created dynamically through reflection . This functionality is added from JDK 1.3 . dynamic Proxy form the basic building block of Spring AOP
package com.somaniab.blog.ex; public class Example1 implements Basicfunc{ @Override public void method1() { System.out.println("executing method 1"); } }
суббота, 7 апреля 2018 г.
Подписаться на:
Сообщения (Atom)