Framework
-
Enhancing Node PerformanceFramework/Node.js 2020. 2. 21. 22:41
1. Overview 2. Intuition 2.1 Blocking the Event Loop const express = require('express'); const app = express(); function doWork(duration) { const start = Date.now(); while(Date.now() - start { doWork(5000); res.send('Hi there'); }); app.listen(3000) as soon as you and I start writing some javascript code that takes some amount of time to execute our en..
-
Single Thread, Event Loop, and Blocking CodeFramework/Node.js 2020. 2. 21. 21:16
1. Overview 1.1 Event Loop The event loop is automatically started by node.js when your program starts. This is responsible for handling event callbacks though. The event loop is responsible for basically running that code when a certain event occurs you could say, it's aware of all these callbacks and basically well, execute said code. It's important to understand that this operation is not han..
-
The Internals of Node.jsFramework/Node.js 2020. 2. 21. 14:33
1. Overview Node.js is an open-source, cross-platform, JavaScript library that executes JavaScript code outside of a browser. Node.js lets developers use JavaScript to write command-line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user's web browser. Consequently, Node.js represents a "JavaScript everywhere" p..
-
Spring Inversion of Control (IoC)Framework/SPRING 2020. 2. 6. 15:30
1. Overview Inversion of Control is a principle in software engineering by which the control of objects or portions of a program is transferred to a container or framework. The container will create the objects, wire them together, configure them, and manage their complete life cycle from creation till destruction. The responsibilities of IoC container are: Instantiating the bean Wiring the bean..
-
Spring FrameworkFramework/SPRING 2020. 2. 6. 13:26
1. Overview Check how to improve the reusability of SW, the Relationship between design pattern and framework, and Spring framework Components. 1.1 Plain Old Java Object (POJO) Objects which are no need to inherit specific parent or environment but only JVM. So MyServlet which extends HttpServlet and runs on Web Container is not POJO. 1.2 Portable Service Abstraction (PSA) Separate complex low-l..
-
Spring MVC and Request Life CycleFramework/SPRING 2020. 2. 3. 13:29
1. Overview 1.1 Spring MVC Spring MVC is a web application framework that implements the Model View Controller pattern. It allows to implement controller classes equipped with mapping annotations to map HTTP requests into method invocations and bind request parameters and payloads to method arguments. @RestController // 1 class MyController { @GetMapping("/hello") // 2 String sayHelloTo(@Request..
-
Spring Bean ScopesFramework/SPRING 2019. 9. 29. 00:01
1. Overview The scope of a bean defines the life cycle and visibility of that bean in the contexts in which it is used. The latest version of Spring framework defines 6 types of scopes singleton prototype request session application WebSocket global session 2. Description 2.1 Singleton Scope The container creates a single instance of that bean, and all requests for that bean name will return the..
-
DispatcherServlet in SpringFramework/SPRING 2019. 9. 28. 23:46
1. Overview In the Front Controller design pattern, a single controller is responsible for directing incoming HTTP requests to all of an application's other controllers and handlers. Spring's DispatcherServlet implements this pattern and is responsible for correctly coordinating the HTTP requests to their right handlers. It is inherited from javax.servlet.http.HttpServlet, it is typically config..