Java Advanced programmer face test
1. What do you think is the most important process in the project?
Try to identify progress priorities in the analysis and design phase
2. If you give a team of 4-6 people, how to assign.
Pick a technically competent person as my substitute. Others distribute tasks evenly, perform a comprehensive task assignment every week, and each person receives a week's work
and report progress Daily.
3. A brief description of the software development document?
Requirements analysis, outline design, detailed design, operation manual, test plan
4. How do you think a project is correct?
Is the maximization of corporate interests.
5. You often read those books.
Java programming idea Java Model man-month myth
6.SPRINGMVC working principle?
Client requests are submitted to the Dispacherservlet by the Dispacherservlet controller to query handlermapping to find the controller to process the request
Controller calls the business logic processing, returns the Modelandview
Dispacherservlet Query view resolution, find Modelandview specified view
View is responsible for displaying the results to the client
What is the difference between 7.SPRINGMVC and struts2?
Mechanism: SPRINGMVC's entrance is the SERVLET,STRUTS2 's inlet is the filter
Performance: SPRINGMVC will be faster than STRUTS2. SPRINGMVC is based on the method design, Struts2 is based on the class, each time the request will be an instance of the action, each action will be injected attributes.
Parameter passing: STRUTS2 is the time to accept parameters, you can use attributes to receive parameters, this description can be used to share multiple methods
Interceptor mechanism: STRUTS2 has its own interceptor mechanism, SPRINGMVC uses independent AOP way, STRTUS2 configuration file is larger than SPRINGMVC, SPRINGMVC use concise, SPRINGMVC is more efficient than struts2 development.
8.struts2 working principle.
Client initiates a request to execute a servlet
This request passes through a series of filters, is called by Filterdispatcher, asks Actionmapper to decide whether to call the action
Filterdispatcher the processing of the request to Actionproxy
Actionproxy the desired action class by asking the relevant profile via Configuraction Manager
Actionproxy Create an instance of Actioninvocation
Actioninvocation the interceptor before and after the action is invoked
After the action completes, the corresponding view page is found according to the Struts.xml configuration file
9.Hibernate working principle.
Read and resolve configuration files
Create Sessionfactory
Open session
Create transaction: Transaction
Persistence operation
Commit a transaction
Close session
Close Sessionfactory
10. Why use Spring?
Spring can be well integrated with the major frameworks
Spring manages object creation and destruction factory patterns through the IOC container
When using Hiberna,mybatis, you can use spring's AOP to manage transactions without having to write the code for the committed transaction every time. AOP is actually a dynamic proxy implementation
Declarative transactions and programmatic transactions
11.mybatis advantages and disadvantages.
Advantages: SQL is written in XML to facilitate unified management and optimization
Provides mapping labels that support ORM field relationship mappings for objects and databases
can be optimized for SQL
Disadvantage: Large SQL workload
Mybagtis transplant surname is not good
Cascading not supported
12. What about SSH integration?
Struts (presentation layer) +spring (business layer) +hibernate (persistence layer)
Struts is a framework for the presentation layer that is used primarily to receive requests and distribute requests. Struts actually belong to the VC level in MVC
Hibernate is a persistent layer framework that is primarily responsible for operations with relational databases
Spring is a framework for a business layer, an integrated framework that can be well bonded to presentation and persistence layers.
What is 13.maven?
is a project management, build tool
Role: Help download Jar search dependencies, help download dependent hot deployment, hot compile
14.WEB front-end optimization.
Reduce the number of HTTP requests (merge CSS, JS, picture)
Using the browser's caching mechanism
Using the gzip compressor system: Only for text-class resources effective
Put the CSS file at the beginning of HTML
Put JavaScript files at the end of HTML
Avoid CSS expressions (judging browsers)
Using JavaScript compression
Reduce DNS Lookup
Avoid redirection
Using Ajax
15. Security Testing
Exploit security testing techniques to identify potential vulnerabilities
16. Transaction ISOLATION Level (4 kinds)
Serializable (serialization): A transaction does not see anything else in the execution of an update to the database (the transaction executes without allowing other transactions to execute concurrently, and the transaction can only be executed one after the other, not concurrently)
REPEATABLE READ (REPEATABLE): A transaction can see new inserted records that other transactions have committed during execution, but cannot see updates to existing records by other transactions
Read commited (reading submitted data): A transaction can see new inserted records that other transactions have committed during execution, and can see updates to existing records that have been committed by other transactions.
READ UNCOMMITTED (Reading uncommitted data): A transaction can see updates of newly inserted records that are not submitted by other transactions during execution, and can see that other transactions are not committed to an update of an existing record
17.MYSQL Storage Engine (4 kinds)
MyISAM it does not support transactions, nor does it support foreign keys, especially when access is fast, there is no requirement for transactional integrity or a SELECT, insert-oriented application can basically use this engine to create a table.
Each myisam is stored on disk as 3 files, with the same filename and table name, but the extension is:. frm (storage table definition), YD (MYData, storing data), myi (Myindex, storage index), InnoDB, The InnoDB storage engine provides transaction security with commit, rollback, and crash recovery capabilities. However, compared to the MyISAM storage engine, InnoDB writes less efficiently and consumes more disk space to preserve data and indexes.
1 automatic Growth column 2) FOREIGN KEY constraint
MEMORY
Memory creates a table using content that exists in memory. Each memory table actually corresponds to a disk file, in the format of. frm. Table access of the memory type is very fast because it is in memory and the hash index is used by default, but once the server shuts down, the data in the table is lost, but the table continues to exist.
MERGE
The merge storage engine is a combination of a set of MyISAM tables that must be exactly the same, with no data in the merge table, and queries, updates, deletes for tables of the merge type, which actually operate on the internal MyISAM table.
18. Transactional propagation characteristics
1. Propagation_required: If a transaction exists, the current transaction is supported. Open if there is no transaction
2. Propagation_supports: If there is a transaction, the current transaction is supported. If there is no transaction, the execution of the non-transaction
3. Propagation_mandatory: If a transaction already exists, the current transaction is supported. If there is no active transaction, an exception is thrown.
4. Propagation_requires_new: Always open a new transaction. If a transaction already exists, the transaction that exists is suspended.
5. Propagation_not_supported: Always executes in a non transactional manner and suspends any existing transactions.
6. Propagation_never: Always execute in a non transactional manner, throw an exception if there is an active transaction
7. propagation_nested: If an active transaction exists, it is run in a nested transaction. If there is no active transaction,
20.TCP Protocol (Control Protocol Transmission Control Protocol)
Establish link: three times handshake (1. Dial 2 for each other. Hello, hello, who is the 3 I am Xiao Liu)
Close link: four times wave to ensure reliable
What's 21.shiro?
The Apache Shiro is a powerful and Easy-to-use Java security framework that provides authentication, authorization, encryption, and session management capabilities.
Authentication: Authenticate the user to verify their identity
Authorization: Session Management
22. Project Technology
Front Desk: Customer facing
Front end: CSS Div js jquery
Back end: Springmvc Spring MyBatis
Optimized technology for use:
1. Page static (Freemarker)
2. Caching
2.1 Page Cache (Oscache)