Spring Boot Software Testing 1, Partitioning and Functioning testing

Spring Boot is a project under the Spring Framework that simplifies developing, configuring, and deploying Spring-based applications. It promotes convention over configuration by offering pre-configured setups and auto-configuration based on project dependencies, eliminating much of the manual setup and configuration work. Spring Boot applications are stand-alone, containing an embedded web server for easy deployment as a single executable JAR. It offers opinionated defaults to reduce development effort, while still allowing for customization. Features like Actuator provide built-in endpoints for application monitoring and management. Primarily written in Java, Spring Boot supports other JVM languages like Kotlin and Groovy, making it versatile for various enterprise applications. Its goal is to enable quick application startup with less code and configuration hassle. ...

March 30, 2024 · 10 min · 2050 words · Mr.W

Size measurement parameters -- client, offset and scroll

Prerequisite: You need to familiar with the box model Understanding the differences between clientHeight/clientLeft, offsetHeight/offsetLeft, and scrollTop/scrollLeft in the context of the Document Object Model (DOM) is crucial for effective web design and development. These properties are used to measure different aspects of elements’ size and position in relation to their content, padding, border, and scroll position. Client clientHeight and clientLeft will give you the height and width of an element including padding. However, client will not calculate the size of the borders and margins. clientHeight/clientLeft are useful for understanding the visible part of an element, particularly for styling purposes or when dealing with scrolling. It’s a read-only property, which means you can not modify the params and generate action. Offset Similar with client, offsetHeight, offsetLeft will output the element height and width but including verical and horizontal border, in pixel. offsetHeight/offsetLeft are often used when you need to know the actual size of the element including borders and its position in the layout. Same as client, offsetHeight/offsetLeft is a read only param. ...

January 8, 2024 · 2 min · 406 words · Mr.W

Scroll Event

The scroll event in JavaScript is an important event that is triggered whenever an element or the window is scrolled. This event is particularly useful for creating dynamic effects based on the scroll position, such as parallax animations, infinite scrolling, or showing/hiding navigation bars. Here’s an overview of the scroll event: 1. How it Works: The scroll event fires when the document view or an element has been scrolled. It applies to any scrollable element, including the window. ...

January 7, 2024 · 2 min · 332 words · Mr.W

Event flow , capture, bubble and how to stop bubbling

Event Bubbling in JavaScript Event capturing is an event handling mechanism in JavaScript, contrasting with event bubbling. During the capturing phase, an event starts at the root node (usually the document object) and propagates down the DOM tree to the target element, where the event actually took place. The process of event capturing is as follows: Capturing Phase: When an event occurs, it is first captured at the topmost node of the DOM tree, then propagates downwards, level by level, until it reaches the target element. During this phase, only those event listeners set to use capturing mode are triggered. ...

December 30, 2023 · 3 min · 499 words · Mr.W

Timer

Javascript timer function can make some code be excueted repeatedly over time. Syntax: // open setInterval(function,interaval-time) // close let t = setInterval(function,interaval-time) clearInterval(t) t: variable interaval-time unit: ms Example: <body> <button class="btn" disabled>aggree(5)</button> <script> const btn = document.querySelector('.btn') let i = 5 let timer = setInterval(function(){ i-- btn.innerHTML = `aggree(${i})` if (i === 0){ clearInterval(timer) btn.disabled = false btn.innerHTML = 'aggree' } },1000) </script> </body>

December 26, 2023 · 1 min · 65 words · Mr.W