[design mode] simple factory mode

Factory mode Factory pattern: one of the most common design patterns in Java. This type of design pattern is a creation pattern, which provides the best way to create objects. In factory mode, we do not expose the creation logic to the client when we create the object, and we point to the newly create ...

Posted by ek5932 on Tue, 23 Jun 2020 00:50:38 -0700

JavaWeb-6, filter, listener

JavaWeb-6, filter, listener 1. Filter Is there such a pain when we write servlets? Every time, we need to set the page code at the beginning of the servlet. If there are fewer servlets in the project, it's OK. But if there are dozens or even hundreds of servlets in the project, it's a bit hard. At t ...

Posted by roygbiv on Tue, 23 Jun 2020 00:42:56 -0700

Java basic knowledge: object oriented

object-oriented 1. Definition of object-oriented Creating objects can be things or things. In the program, objects are used to map things in reality, and objects are used to describe the relationship between them.2, Features of object-orientedEncapsulation Encapsulation is the core idea of object-ori ...

Posted by tomlei on Mon, 22 Jun 2020 23:39:31 -0700

Employee management system

catalog 1. Function introduction and display (multi figure warning) 2. Code design 1 database 2 login interface and verification 3 main interface 4 change of information 5 information display Tip: this semester, Java class is going to do a project of employee management system. When we first hea ...

Posted by Garethp on Mon, 22 Jun 2020 22:40:29 -0700

How to write one to many page SQL?

1. Preface One to many paging of MySQL data is a very common requirement. For example, we need to query the product and the image information of the product. But many people will encounter the mistake of pagination here and get incorrect results. Let's analyze and solve this problem today. 2. Problem analysis First, we create a simple product ...

Posted by cs-web on Mon, 22 Jun 2020 20:39:35 -0700

Introduction and implementation of Json field picker

Recently, I wrote a gadget for the convenience of work. The utility is very simple, which is to sift out the parts you want from a json string. introduce The background is like this. For the convenience of online debugging, a tool can simulate to launch a data request, and then display the results to the page in the form of json. But the probl ...

Posted by scofansnags on Mon, 22 Jun 2020 19:57:44 -0700

Zookeeper learning -- basic use and cluster building of zookeeper

Zookeeper learning - basic use and cluster building of zookeeper This chapter records the environment construction and basic api use of Zookeeper. Part of the summary is from Zookeeper's official website. The version of Zookeeper used this time is 3.4.9. Here, I installed VMWare on this machine and cr ...

Posted by homerjsimpson on Mon, 22 Jun 2020 02:58:30 -0700

Design pattern learning notes (39) -- command pattern and its implementation

Command mode1, Tight coupling design package operation; class Barbecuer{ public void BakeMutton() { System.out.println("shish kebab!"); } public void BakeChickenWing() { System.out.println("Roast chicken wings!"); } } public class Main{ public static void main(String[] args){ Barbecuer boy ...

Posted by scottd on Sun, 21 Jun 2020 22:57:09 -0700

Java knowledge summary 1 - Java program foundation

1.1 Java introduction What is Java Java is a programming language developed by James Gosling of SUN (acquired by Oracle) in the early 1990s. It was officially released in 1995. Java is a cross platform language based on JVM Programming languages are compiled and interpreted. Compiled languages suc ...

Posted by Kurt on Sun, 21 Jun 2020 22:09:13 -0700

Detail javascript Design Mode (single interest mode)

I try to use the least words and space to explain all aspects of the design pattern.Article link Understanding the simple interest model Ensure that there is only one instance and provide global access. For example, store, thread pool, global cache, browser window object in redux. Upper Code: General inert single interest mode let getSingle = ...

Posted by dud3r on Sun, 21 Jun 2020 21:54:51 -0700