Java Programming Common Sense Summary

Source: Internet
Author: User
Tags naming convention version control system netbeans

The following is the Java programming common sense, pay attention to learning accumulation.


1.Java is an object-oriented programming language that can compose cross-platform applications. Java technology, with its versatility, efficiency, platform portability and security, is widely used in PCs, data centers, game consoles, science supercomputers, mobile phones, and the Internet, while owning the world's largest developer professional community.


2.JAVA Programming naming Convention conventions:

Case Sensitive: Java is case-sensitive, which means that the identifier Hello is different from hello.
  • class name : For all classes, the first letter of the class name should be capitalized. If the class name consists of several words, the first letter of each word should be capitalized, such as Myfirstjavaclass.
  • method Name : All method names should start with a lowercase letter. If the method name contains several words, the first letter of each subsequent word, such as Myfirstjavamethod, is capitalized.
  • source file name: The source file name must be the same as the class name. When saving the file, you should use the class name to save the filename (remember that Java is case-sensitive), and the suffix of the file name is. java. (a compilation error is caused if the file name and the class name are not the same).

    Main Method Entry : All Java programs are executed by the public static void Main (String [] args) method.



    3.J2EE (Java 2 Platform, Enterprise Edition) is a Java platform designed for large enterprise host-level computing types.

    The Java EE is a completely different technology architecture from traditional application development, including many components that simplify and standardize the development and deployment of application systems, thus improving portability, security, and reuse value.

    The Java EE core is a set of technical specifications and guidelines, including the various types of components, service architecture and technical level, all have common standards and specifications, so that the different platforms that follow the Java EE architecture, there is good compatibility, to resolve the past enterprise backend use of information products are incompatible with each other, Difficult to communicate within or outside the enterprise.

    The difference between the Java EE component and the "standard" class is that it is assembled in a Java EE application, has a fixed format and adheres to the Java EE specification, which is managed by the Java EE server. The Java EE specification defines the Java EE component in such a way that the client application and the applet are components that run on the client side; EJB) components are business components that run on the server side.


    4.jsp/servlet. There are two main technologies that Java uses to develop Web applications, namely Servlets and JSPs. A servlet is a Java program executed on the server side, and a program called a servlet container (which is actually a server) is responsible for executing Java programs. The JSP (Java Server page) is a page that is executed by the JSP container .

    The most important difference between servlet and JSP is that the servlet is dominated by Java programs, the output of HTML code needs to use the OUT.PRINTLN function, that is, in Java embedded HTML, and JSP is based on HTML pages, When you need to write Java code, you insert Java code directly into the page, which is embedded in the HTML.


    5.AJAX "asynchronous JavascriptandXML" (Asynchronous JavaScript and XML) refers to a web development technique that creates an interactive Web application.

    AJAX = Asynchronous JavaScript and XML (a subset of standard generic markup languages). AJAX is a technique for creating fast, Dynamic Web pages. AJAX enables Web pages to be updated asynchronously by exchanging small amounts of data in the background with the server. This means that you can update a part of a webpage without reloading the entire page. Traditional Web pages (without AJAX) if you need to update the content, you must reload the entire page page.

  • 6.JQuery is another excellent JavaScript library following prototype. It is a lightweight JS library, it is compatible with CSS3, also compatible with various browsers (IE 6.0+,ff 1.5+, Safari 2.0+, Opera 9.0+), jQuery2.0 and subsequent versions will no longer support Ie6/7/8 browser. jquery makes it easier for users to work with HTML (an application under the standard Universal Markup Language), events, animate, and easily provide Ajax interactivity to the site. One of the big advantages of jquery is that its documentation is full, and the various applications are very detailed, as well as a number of mature plugins to choose from. jquery allows the user's HTML page to keep the code and HTML content separate, that is, no more inserting a bunch of JS in the HTML to invoke the command, only need to define the ID.

    jquery is a multi-browser-compatible JavaScript library, with the core idea of write Less,do more (write less and do more). Published in January 2006 by American John Resig in New York's BarCamp, jquery attracted a number of JavaScript gurus from around the world and was developed by Dave Methvin's team. Today, jquery has become the most popular JavaScript library, with more than 55% of the world's top 10,000 most visited sites using jquery. jquery is free, open source, and uses the MIT license Agreement. jquery's syntax is designed to make development easier, such as manipulating document objects, selecting DOM elements, animating effects, event handling, using AJAX, and other features. In addition, JQuery provides APIs for developers to write plugins. Its modular approach makes it easy for developers to develop powerful static or dynamic Web pages. JQuery, as its name implies, is JavaScript and query, which is a library of auxiliary JavaScript development.

    The 7.MVC full name is the model View Controller, which is the abbreviation for the models-view-controller, a software design paradigm that organizes the code with a method of business logic, data, and interface display separation. Aggregating business logic into a single component does not require rewriting business logic while improving and personalizing the interface and user interaction. MVC is uniquely developed to map the traditional input, processing, and output functions in a logical graphical user interface structure.

    MVC begins in the desktop program, M refers to the business model, v refers to the user interface, C is the controller, the purpose of using MVC is to separate m and v implementation code, so that the same program can use different representations. For example, a batch of statistical data can be represented by histogram, pie chart. C exists to ensure the synchronization of M and V, and once M is changed, V should be updated synchronously.[1-2]Model-View-Controller (MVC) is a software design pattern invented by Xerox PARC in the the 1980s for programming language Smalltalk-80, which has been widely used. It was later recommended as a design model for Oracle's Sun Company's Java EE platform and was welcomed by a growing number of developers using ColdFusion and PHP. Model-View-controller mode is a useful toolbox that has many benefits, but also has some drawbacks.[3](Overview of Content sources:[4])
    The two concepts of frame and design pattern are always easy to be confused, but there are still differences between them. Frameworks are often code reuse, while design patterns are reuse, schemas are in between, part of code reuse, partial design reuse, and sometimes analysis can be reused. There are three levels of reuse in software production: internal reuse, an abstract block that can be used publicly in the same application, code reuse, the assembly of common modules into libraries or toolsets for use in multiple applications and domains, and the reuse of application frameworks that provide a common or off-the-shelf infrastructure for specialized areas For the highest level of reusability. Although the framework is similar to the design pattern, it is fundamentally different. The design pattern is a description of the recurring problems in an environment and the solution to the problem, which is more abstract than the framework, the framework can be expressed in code, can be directly executed or reused, and only instances of the schema can be represented in code; Design patterns are smaller elements than frames. A framework often contains one or more design patterns, and the framework is always targeted at a particular application area, but the same pattern can be applied to a variety of applications. It can be said that the framework is software, while design patterns are software knowledge.


    8.JavaServer Faces (JSF) is a standard framework for building Java WEB Applications (the JSR-127 standard defined by the Java Community Process). It provides a component-centric approach to building a user interface (UI) that simplifies the development of Java server-side applications. Driven by Java Community Process (JCP), it belongs to the technical specifications in Java EE 5 and is widely supported by vendors.



    9.Spring is an open source framework, and spring is a lightweight Java development framework that emerged in 2003 by Rod Johnson in his book expert one-on-one development and Some of the concepts and prototypes elaborated in design are derived. It is created to address the complexities of enterprise application development. One of the main advantages of the framework is its layered architecture, which allows the user to choose which component to use, while providing an integrated framework for Java EE application development. Spring uses basic JavaBean to accomplish things that were previously only possible by EJBS. However, the use of spring is not limited to server-side development. From the standpoint of simplicity, testability, and loose coupling, any Java application can benefit from spring. The core of spring is control inversion (IoC) and facet-oriented (AOP). In short, spring is a layered javase/eefull-stack (one-stop) lightweight open-source framework.


    10.Hibernate is an open-source object-relational mapping framework that provides JDBC with a very lightweight object encapsulation that allows Java programmers to manipulate databases at will using object programming thinking. Hibernate can be applied to any JDBC application, both in Java client applications and in servlet/jsp Web applications, and most revolutionary of all, hibernate can replace CMP in the EE architecture of the EJB application. The task of achieving data persistence.



    The term 11.iBATIS is derived from the combination of "Internet" and "Abatis", an open source project launched by Clinton begin in 2002. Was hosted by Google on June 16, 2010 and renamed MyBatis. is a SQL-based mapping support for Java and • NET persistence layer framework.



    12.Oracle Database, also known as Oracle RDBMS, or Oracle. is a relational database management system of Oracle Corporation. It is a leading product in the field of database. It can be said that Oracle database system is currently the world's popular relational database management system, System portability, easy to use, strong function, applicable to all kinds of large, medium, small, microcomputer environment. It is a highly efficient and reliable database solution that adapts to high throughput.

    Oracle database 12c is the latest version. Oracle database introduces a new multi-tenant architecture that makes it easy to deploy and manage the database cloud. In addition, some of the innovative features maximize resource utilization and flexibility, such as Oracle Multitenant can quickly consolidate multiple databases, while automatic data optimization and heat map can compress and tier data at higher densities. These unique technological advancements, combined with major enhancements in availability, security, and big Data support, make Oracle database the ideal platform for private cloud and public cloud deployments.


    13.MySQL is a relational database management system developed by the Swedish MySQL AB company, currently owned by Oracle. MySQL's most popular relational database management system, MySQL is one of the best RDBMS (relational database Management system, relational databases management systems) application software in WEB applications.

    MySQL is an associated database management system that keeps data in separate tables rather than putting all of the data in a large warehouse, which increases speed and increases flexibility. The SQL language used by MySQL is the most commonly used standardized language for accessing databases. MySQL software uses a dual licensing policy, which is divided into community and commercial version, due to its small size, fast, low total cost of ownership, especially the open source, the development of the general small and medium-sized web site to choose MySQL as the site database. Due to its social

    14.Tomcat is a core project of the Apache Software Foundation (Apache Software Foundation) Jakarta Project, developed by Apache, Sun, and other companies and individuals. With Sun's involvement and support, the latest servlet and JSP specifications are always reflected in Tomcat, and Tomcat 5 supports the latest servlet 2.4 and JSP 2.0 specifications. Because of the advanced Tomcat technology, stable performance, and free, so deeply loved by Java enthusiasts and have been recognized by some software developers, become the most popular Web application server. Tomcat server is a free open source Web application server, belongs to the lightweight application server, in small and medium-sized systems and concurrent access users are not widely used, is the first choice to develop and debug JSP programs. For a beginner, it can be thought that when the Apache server is configured on a single machine, it can respond to requests for access to the HTML (one application under the standard Universal Markup Language) page. The tomcat part is actually an extension of the Apache server, but it runs independently, so when you run Tomcat, it actually runs separately as a separate process from Apache. The trick is that when configured correctly, Apache serves HTML pages, while Tomcat actually runs JSP pages and Servlets. In addition, like a Web server such as IIS, Tomcat has the ability to handle HTML pages, and it is also a servlet and JSP container, and the standalone servlet container is the default mode for Tomcat. However, Tomcat is less capable of handling static HTML than the Apache server. Currently, the latest version of Tomcat is9.0.

    A .Apache is the world's most used Web server software. It can run on almost all widely used computer platforms and is one of the most popular Web server-side software due to its widespread use across platforms and security. It is fast, reliable, and can be augmented with simple APIs to compile perl/python and other interpreters into the server. Apache, meanwhile, is a tribe of North American Indians called Apache, in the southwestern part of the United States. is also the name of a foundation, an armed helicopter and so on.Apache HTTP Server(abbreviationApache) is an open source Web server of the Apache Software Foundation, which can be run in most computer operating systems, and is one of the most popular Web server-side software due to its extensive use of multiple platforms and security. It is fast, reliable, and can be compiled into the server by a simple API extension, such as the Perl/python interpreter.[2]Apache HTTP Server is a modular server, originated from the NCSAHTTPD server, after several modifications, to become the world's first use of the Web server software. It can run on almost all of the widely used computer platforms.

    16.JBoss is an open source application server based on the Java EE. The JBoss code follows the LGPL license and can be used free of charge in any commercial application without payment. JBoss is a container and server that manages EJBS and supports the specifications of EJB 1.1, EJB 2.0, and EJB3. However, the JBoss Core service does not include web containers that support servlet/jsp, and is typically used with Tomcat or jetty bindings.


    17.Eclipse is an open-source, Java-based, extensible development platform. For its part, it is just a framework and a set of services for building a development environment through plug-in components. Fortunately, Eclipse comes with a standard set of plugins, including Java development tools (Java Development kit,jdk).

    The June 2015 project was released in version 4.5 of the Mars code.


    18.NetBeans includes open source development environments and application platforms, NetBeans IDE enables developers to quickly create Web, enterprise, desktop, and mobile applications using the Java platform, and NetBeans IDE has support for PHP, Ruby, Development languages such as JavaScript, Groovy, Grails, and C + +. The NetBeans project is supported by an active development community, which provides rich product documentation and training resources as well as a large number of third-party plug-ins for the Netbean development environment.

    NetBeans is an open-source software development integration environment, an opening framework, an extensible development platform that can be used in the development of Java, c/c++,php and other languages, and is itself a development platform that can extend functionality through extensions.[1]In the NetBeans Platform platform, application software is constructed using a series of software modules (Modular software components). And these modules are a jar file (Java Archive file) which contains a set of Java program categories and they are all based on NetBeans-defined public interfaces and a series of definition profiles (Manifest file) used to differentiate between different modules. Depending on the benefits of modularity, applications built with modules can be further expanded with the addition of new modules.

    19.Maven Project Object Model (POM), a software project management tool that can manage project building, reporting, and documentation through a short description of the information. In addition to its program building capabilities, Maven offers advanced project management tools. Because MAVEN's default build rules are highly reusable, it is common to build scripts with two or three lines of Maven to build simple projects. Thanks to MAVEN's project-oriented approach, many Apache Jakarta projects use Maven, and the percentage of company projects that are MAVEN-based continues to grow. The word maven is derived from Yiddish (Hebrew), meaning the accumulation of knowledge, originally used in the Jakata turbine project to simplify the building process. There were some projects (with their ant build files), with only minor differences, and the jar files were maintained by CVS. So hopefully there's a standardized way to build a project, a clear way to define the composition of the project, an easy way to publish information about the project, and a simple way to share jars across multiple projects.



    20.Ant is a subproject in the Apache Software Foundation Jakarta Directory, which has the following advantages. Cross-platform. Ant is written in the pure Java language, so it has a good cross-platform nature. Simple to operate. Ant is made up of a built-in task and optional tasks. The ant runtime requires an XML file (build file). Ant can execute various tasks by invoking the target tree. Each task implements a specific interface object. Because the ant build file is a file in XML format, it is easy to maintain and write, and the structure is clear. Ant can be integrated into the development environment. Because of its cross-platform and easy-to-operate nature, ant is easily integrated into a number of development environments.

    Maven and ANT address two different aspects of building problems. ANT provides cross-platform build tasks for Java technology development projects. Maven itself describes the advanced aspects of the project, which borrows most of the build tasks from Ant. Therefore, since Maven and ant represent two very different tools, the next step is to explain the differences between the equivalent components of the two tools, as shown in table 1. [1]

    Maven Ant
    Standard build File Project.xml and Maven.xml Build.xml
    Attribute processing order ${maven.home}/bin/driver.properties${project.home}/project.properties${project.home}/build.properties${ User.home}/build.properties the last definition of a system attribute defined by the-d command-line option determines the function. The system attributes defined by the-d command-line option are handled first by a task-loaded attribute.
    Building rules Build rules are more dynamic (similar to programming languages); they are executable XML based on Jelly. Build rules are more or less static, unless you use <script> tasks
    Extended language Plugins are written in Jelly (XML). Plugins are written in the Java language.
    Build Rule Extensibility The build goal is extensible by defining <preGoal> and <postGoal>. Building rules are difficult to scale, and can be simulated by using <script> tasks <preGoal> and <postGoal> roles.



    21.SVN is the abbreviation of subversion, is an open source version control system, compared to RCS, CVS, it uses the branch management system, its design goal is to replace CVS. Many version control services on the Internet have migrated from CVs to subversion. It's easy to say. SVN is used for multiple people to jointly develop the same project, sharing resources for the purpose.


    22.JUnit is a unit test framework for the Java language. Founded by Kent Beck and Erich Gamma, it became the most successful of the Xunit family of Sunit from Kent Beck. JUnit has its own JUnit expansion biosphere. Most Java development environments have integrated JUnit as a unit test tool. [1-2]

    JUnit is a regression testing framework (regression testing framework) written by Erich Gamma and Kent Beck. JUnit testing is a programmer's test, the so-called white-box test, because the programmer knows how the software being tested (how) accomplishes the function and what it does. JUnit is a set of frameworks that inherit the TestCase class and can be automatically tested with JUnit. In addition, JUnit is a highly recommended tool in extreme programming and refactoring (refactor) because it can greatly improve the efficiency of development in the case of automated unit testing, but it also takes a lot of time and effort to write test code.

    

    

    

    

    
  • Java Programming Common Sense Summary

    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.