Https://course.tianmaying.com/java-basic%2Bjava-environment#0
David
Links: https://www.zhihu.com/question/25255189/answer/86898400
Source: Know
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
This tutorial runs the basics of getting started with Java in one instance, and goes a step further to help you get to the world of Java programming quickly. The beginning of everything is difficult, and gradually follow this tutorial go through, Java should have a sense of getting started. Then go on to learn more advanced topics, or learn some of the points in more detail.
- 1th Lesson Java Development Environment installation and configuration
- 2nd lesson the First Java program
- Lesson 3rd Object-oriented Foundation
- Lesson 4th Basic Data Types
- 5th Lesson operator
- 6th lesson String Manipulation
- the control flow of the 7th lesson Program
- The 8th lesson static variable and static method
- 9th Lesson Java Collection
- 10th Lesson Encapsulation and inheritance
- Lesson 11th Abstract classes and Interfaces
- 12th Lesson Exception Handling
- A Comprehensive example of the 13th lesson
- 14th Session Installation and use of Eclipse
After you get started, consider the following learning paths and content:
1, the basic path of learning
It is very important to establish a good development environment first, 工欲善其事, its prerequisite. To do any development, the first is to prepare the environment, then you can do a variety of attempts, the process can gradually build confidence. Beginners tend to be frustrated by unexpected problems in their environment configuration.
Build up the environment and change the world depends on your code. Learning a programming language does not have a lot of tricks, you may be able to find a better classic introductory books, now there is a lot of information on the web, graphics or video can be, according to personal preferences. The most important exercises, practice makes perfect, in the continuous practice to deepen their understanding of the programming language.
Next you need to understand these three terms, called the SDK, API and LIB, respectively, representing the software development Kit, application programming interface and library. There is a certain connection between the three, or a cross. In general, they are a few of the infrastructure that encapsulates the underlying functionality. In Java development, these things are often represented as "frameworks" that we often say. In fact, to be a senior Java developer, learning about the various APIs and frameworks is probably the most time-spent place.
Of course, you won't be able to fully understand all the APIs or all the content of the SDK. There are 28 principles in software development, and a handful of APIs are capable of doing most of the scenarios in development. So all you need to do is take a look at the key parts and see the Help documentation when you encounter new problems that can't be solved in a new scenario. So the reading of the Help document is also a key factor in technical learning. Once you've learned the basics, you'll generally be able to get started, and help documents help you learn in practice.
2, three artifacts
Three artifacts, very important for software developers.
- The first Google, although for a variety of reasons, sometimes we can not access, but this is basically the best way to find technical information.
- The second is GitHub, which mentioned the concept of a library, and GitHub is a place where you can find a large number of third-party libraries, which are reusable code that others have packaged for us. For example, to build a car, we often do not build wheels ourselves, and GitHub can find a lot of quality wheels, these wheels are free (the code is open source), we should try to use them to assemble their own cars.
- The third is the StackOverflow website, where you can quickly find answers to almost any development problem you encounter on this quiz site.
3. Recommended learning content for Java Web full stack development
Briefly summarize, probably including the following content. Each part can be refined into a lot of knowledge points, this is just a rough list. Just think of it as a technical map.
- Development environment Building and project management: Eclipse, maven, and Git
- Fundamentals of Java Programming: Basic syntax, object-oriented features, JAVA8 new features, use of higher-level libraries (such as guava), etc.
- Front-end development technology: HTML, CSS, Bootstrap, and JavaScript basics
- Spring Basics: Dependency Injection IOC, aspect-oriented programming AOP, Springboot
- MVC framework: Spring MVC, struts, etc., including URL routing, templates, forms, sessions, interceptors and other knowledge
- Data access: relational database, JDBC, Spring JDBC, transaction, ORM Framework (Mybatis,hibernate, JPA)
- Key feature implementations for mature applications: Mail sending, asynchronous tasks, caches, logs, and more
- Testing and deployment of applications
Here is a detailed description of each section.
4, Jsp/servlet of the relevant content
Although now a variety of mature MVC framework has made Java Web development rarely use the native functionality of JSP and servlet, basically do a layer of encapsulation. But this part of the basic knowledge suggests that beginners should study hard.
- c/S model, browser access to website process
- Basic knowledge of URLs
- HTTP message--Request and response
- Applications that handle HTTP requests
- servlet/jsp Introduction
- servlet container, servlet processing mechanism, servlet life cycle
- Deploying Servlets
- ServletContext, ServletConfig
- Filter, Event Listener
- expression, scriptlet, declaration
- Accessing Java classes in JSPs
- JSP built-in objects
- http method--get V.s. POST
- Reading form data
- Building an MVC Application
- servlets/jsp Existing problems
- MVC design Pattern
- Using RequestDispatcher
- Passing data in Servlets and JSPs, El expression
- JSP Tag Lib
- Core Tag (if, loop)
- Function Tag (String, FMT, Utils)
- Session&&cookie Basic Concepts
- Record user status via cookie (like shopping cart example)
- Use session to track users (login)
5, database-related content
With servlet/jsp technology in hand, we have been able to create dynamic Web applications. In addition to the Dynamic Web interface, a valuable Web application necessarily requires data storage, which we generally call data persistence (persistence).
From the point of view of business function, simple application can be considered as the data deletion and modification. For example, a product-level blog application, the most important feature is the creation of blog content, modification, deletion and query, and these functions are inseparable from the Web server behind the database system.
- Basic concepts of databases
- Entities, relationships (tables), records (rows), Columns (properties)
- Primary key, foreign key, etc.
- Basic principles of database table design
- MySQL Basic use
- Ddl--create,drop,alter in SQL, establishing constraints such as the foreign key of the primary key
- Dml--insert in SQL, select, delete, Update,join
- database connections, connection pooling
- Accessing the database using the JDBC API
- Paging Query
- Basic concepts of transactions
- Three-tier architecture for the encapsulation and data access of JDBC code
6. Spring Related content
Spring's most important two core features are dependency injection (di,dependency injection) and aspect-oriented programming (Aop,aspect oriented programming). Where di is used to manage dependencies between Java objects, AOP is used to decouple business code and Public Service code (such as logs, security, transactions, and so on). Di and AOP make code simpler, have good loose-coupling characteristics and testability, and greatly simplify development. Understanding the two is the basis for using the spring framework.
- Dependency Injection
- Facet-oriented programming (AOP)
- Pojo-based programming model
- Pre-built template code (such as spring JDBC)
- Fundamentals of Dependency Injection
- Benefits of Dependency Injection
- How dependency injection is implemented
- Use of Dependency Injection
- An XML-based assembly approach
- Assembly mode based on Java configuration
- Automatic assembly
- Mixing with multiple assembly methods
- Ambiguity in handling assembly
- How to inject property values
- Singleton
- Prototype
- Request
- Session
- Global
- Basic concepts such as facets, target objects, tangent points, notifications, weaving, etc.
- How to: Define Tangency points ASPECTJ syntax for defining pointcuts
- Defining notifications
- Pre-notification (before)
- Post Notification (afterreturning)
- Exception Notification (afterthrowing)
- Final notification (after)
- Surround Notification (Around)
- How to pass a parameter to a plane
7. Spring MVC related content
Spring, as a full-stack (full-stack) Development framework for the Java system, is of course very well supported for web development. Spring's web MVC framework makes it easy for developers to develop Web applications while seamlessly enjoying the many benefits of spring itself--IOC containers, AOP programming, and more.
- Spring MVC Fundamentals, configuration
- Dispatcherservlet
- Webapplicationcontext
- Processing the HTTP request process
- Implementing a Controller
- @Controller, @RequestMapping annotations
- URL template mode, @PathVariable
- Gets the HTTP request parameters, @RequestParam
- Parameters supported by the @RequestMapping method
- Return values supported by the @RequestMapping method
- An analysis of visual illustrations
- Working with Static resources
- Configure JSP
- Configuring additional template Engines
- Redirect, Flash Attribute
- form data binding
- Spring form Labels
- Form validation
- File Upload
- Flash Attribute
- Spring MVC Request Processing Flow
- Handlerinterceptor interface
- Configure Interceptor
- Configuration Error page
- Using HTTP status Codes
- @ExceptionHandler
- Controlleradvice Global Exception Handling
- @ResponseBody and @requestbody
- Handling put and delete requests
8, MyBatis related content
MyBatis is an excellent persistence layer framework that supports the customization of SQL, stored procedures, and advanced mapping. MyBatis avoids almost all JDBC code and manually sets parameters and gets the result set. MyBatis can use simple XML or annotations on configuration and native map to map interfaces and Java POJOs (Plain old Java Objects, ordinary Java objects) to records in a database
- The concept of ORM
- How to define the Mapper interface
- How to define XML Mapper mappings
- How to use Mapper
- Sqlsessionfactory
- Sqlsessionfactorybuilder
- Sqlsession
- Based on how spring configures and uses mapper
- Configuration of the Sqlsessionfactorybean
- MyBatis the use of Spring Boot starter
- Familiarity with mapper configuration files
- Select element
- The Resulttype property of the Select
- Insert Element
- Update element
- Delete Element
- Resultmap elements
- Association elements
- Nested results and nested queries
- Collection elements
- Discriminator Elements
- Dynamic SQL
- Paging query (Paging plugin)
9. JPA
The advent of ORM frameworks allows us to manipulate relational databases in an object-oriented manner, but it is still very tedious to implement the data access layer in the application system for a long time, and simple queries often involve a lot of repetitive code. Spring data JPA Further simplifies the implementation of the data access layer based on JPA, which provides a method similar to declarative programming, where developers only need to write data access interfaces (called repository), and spring data JPA can automatically generate implementations based on the method name in the interface.
JPA (Java persistence Api,java persistence API) that defines the standard interface for Object relational mapping (objects Relation Mapping,orm) and entity object persistence. JPA is a set of interface specifications, and JPA implementations include JBoss Hibernate Entitymanager, Oracle's donation to the Eclipse community Eclipselink, and Apache OpenJPA.
- Core concepts of Spring Data JPA
- Repository
- Steps to use repository
- Custom Repository Interface
- Repository interface hierarchy and its methods
- Automatically generate database schema
- @Entity and @table
- @Id and @generatedvalue
- @Basic
- @Column
- @Transient
- @Temporal
- @Lob
- Define a one-to-one relationship
- @OneToOn
- @JoinColumn
- Unique attribute
- Bidirectional @onetoone Association
- Bidirectional correlation and Cascade
- Automatic mapping of naming rules
- One-to-many and many-to-many relationships
- @ManyToOne
- @OneToMany
- @ManyToMany
- Jointable
- Using @manytoone to achieve many-to-many
- How to create a query from a method name
- Paging and sorting
- @Query annotations
- Transaction
10. Deployment of Java Web applications
- War package specification and structure
- Debugging and deploying in the IDE
- Exporting a war package using the IDE
- Deploy the war package to the server
- Spring Boot-based deployment
11. Other topics
Cache: EhCache, Spring cache Manager, Data tier cache, service tier cache, page cache
Security: Spring Security (HTTP Basic Authentication, role verification, permission validation)
Task Scheduler: Spring Task Executor (Executor)
Mail sending: SMTP protocol, Spring-boot-starter-mail
Web Socket: @SubscribeMapping, Websocketconfig
Logs: Slf4j and Logback, Spring Boot Logging, Consoleappender/rollingfileappender, Sentry, ELK
12. Design mode
Reference Java to write a beautiful set of code, which design patterns are more commonly used? -David's answer--know
13. Further
Distributed, in-depth Java virtual machines, for different scenarios of the Java Technology Framework, to this stage is not just Java learning, but the large-scale application of technology accumulation, architecture design of the refined.
can refer to Java Web full-stack development of practical courses
Basics of getting Started with Java