This article mainly and everyone to share the PHP standard specification detailed, hope to help everyone.
PSR0: Automatic loading standard
has been replaced by PSR4, can understand the next
1. Mandatory: Fully qualified namespace and class format: \2. Mandatory: Each namespace must have a top-level namespace (Vendor name).3. Each namespace can contain any number of sub-namespaces.4. When the file system loads the source file, the delimiter
The last introduction of PHP three development specifications, but sometimes can not be fully adhered to, so need a check mechanism, can write the code while writing the side hint, the following is introduced in our commonly used editor to install the Code check tool. The specification here refers to the PSR2 coding style specification.
Steps:
Environment and software Related:
Windows10
phpstorm2017
1) Ins
PHP coding specifications. PHP coding specification 1. File Format 1. for files that only contain php code, we will ignore it at the end of the file ?. This is to prevent extra spaces or other characters from affecting the code specification of the PHP code generation.
I. file format
1. for files that only contain php code, we will ignore them at the end of the file. "?> ". This is to prevent extra spaces
Python
Code style: PEP8 Specification, reference
Annotation specification:2.1. File Header:#!/usr/bin/env python# -*- coding: utf-8 -*-# @Author : Jason# @Mail : [emailprotected]# @File : 文件名.py2.2. Class Notes:class SampleClass(object):"""Summary of class here.Longer class information....Longer class information....Attributes: likes_spam: A boolean indicating if we like SPAM or not
Four common naming methodsComparing the different points of the naming conventions of Java and C #Uppercase for constantsJava method The first letter is not written, it should be lowercasefunction line number limitDo not use PinyinReferential, Android source codeSee source Tools, Sourceinsight and Beyond CompareThe same kind of import in the same placeAndroid documents implemented via Java.docThe private program variable is named before the top plus mCatalog
General Specification:
The TAB key is replaced with two spaces (the TAB key for Windows is four spaces, and the TAB key for Linux is eight spaces).
CSS style attributes or JavaScript code after adding ";" Convenient compression Tool "segmentation".
File content encoding is unified to UTF-8.
Text characters in non-annotated classes in CSS and JavaScript must be converted to Unicode encoding for use in order to avoid garble
Python source code and some other books, naming a variety of personalities, not a more uniform naming conventions. Then summed up some, for reference.Module Name:Modules should be named as short as possible, all lowercase, and can be underlined to enhance readability when the module is named. The same package name should also be the case, although it does not encourage underlining.The main consideration is that the module name is corresponding to the folder, so it is necessary to consider some n
Atitit Webdriver principles and concepts of technical specifications1. book haosyo ma12. webdriver is A standard for the consortium, chaired by Selenium . 1 3. How Webdriver works (zhuan)11.Book Haosyo ma2.webdriver is a standard for the Selenium , presided over by the w3c browser test and tool (Browser testing and tools) Workgroup released webdriver The working draft. The specification defines the application programming interface
1. Whether code specification is required (5 points)for the need for code specification, consider the following arguments and refute / Support:
These norms are the result of bureaucratic waste of programming time, affecting people's development efficiency , something that wastes time.
I am an artist, a craftsman, I have my own norms and principles.
Norms can not be forced to all, should a
Code specification:1. These norms are a waste of time in a bureaucratic system that wastes everyone's programming time and affects people's development efficiency. Encoding specification it contains the code format, also includes the coding style and other specifications, usually involves: indentation, space use, tab useAnnotations, propositional habits, code line lengths, and language feature styles make i
Now JavaScript is more than just Web page effect script, more used to build large-scale Web applications, so the language specification of the developers are gradually aware of the syntax of JS to standardize, and deliberately guide the developer programming habits, eliminate some non-standard and unsafe syntax, In order to better meet the requirements of large-scale development later, the strict mode of ES5 speci
Title: C + +, objective-c, Java, Python, R, Shell, Html/css, JavaScript, AngularJS, Common Lisp, Vimscript language, Google's internal generation Code specification documents can now be viewed on GitHub.The following is a partial C + + code specification, English good can see. : Http://files.cnblogs.com/files/hutiann/cppguide.rarGoogle C + + Style Guide BackgroundC + + is one of the main development languag
1. Before contacting the specification, we use modularity to encapsulate the code mostly as Follows: ;(function (形参模块名, 依赖项, 依赖项) { // 通过 形参模块名 修改模块 window.模块名 = 形参模块名 })(window.模块名 || {}, 依赖项, 依赖项)
What is the function of a semicolon?答:为了防止前面的代码没有添加分号造成语法解析错误,也可能会是 "!", "+" 等
Why put your code in a self-executing function答:为了避免全局命名空间污染,核心就是利用函数的私有作用域
Why are dependencies passed in as parameters答:为了减少作用域查找机制
2. Common JavaScrip
This assignment is mainly about code specification, which is discussed around the following issues1. These norms are a waste of time in a bureaucratic system that wastes everyone's programming time and affects people's development efficiency.A: First the coding specification includes the coding style and other specifications a team adheres to some specifications with many benefits!(1). Follow the coding sty
PHP PSR-1 Basic Code Specification (Chinese version),
Basic code Specification
This specification formulates the relevant standards for the basic elements of Code,To ensure a high degree of technical interoperability between shared PHP code.
Keywords "must" ("must"), "must not/must not be" ("must not"), "Need" ("REQUIRED"),"Will" ("Shall"), "no" ("Shall not"), "
This is for the front-end development team to follow and contractOpen Source Project Catalog specification, which is intended to achieve consistency of the open source project directory structure. DescriptionThe keywords used in the document "must","must Not","required","shall","shall not","should","should not","recommended","may" and " optional"is described in RFC2119.has not been finalized, the points mentioned in the
XML sounds strange, but to learn, it feels like HTML, this is my initial feeling, but in the course of learning I found that XML is much more powerful than HTML, and even XML can be used as a small database to use, XML is not a new technology, has been a long time, just because of the high share of HTML, and the specification of the non-uniform and many other reasons, I do not know the other programming language on the need for XML, but only for PHP,
Team Project Development" coding standards "series articles
Release Date: 2011 year 3 month 18 day author on Wednesday : erichu
Diligence can make up for self-help, stupid birds fly first.
The standard coding style not only reflects a person's technical level, but also reflects a company's image in a sense. A good and standard coding style is especially important for the entire project team. This series of articles only provide reference for the descri
No matter what material you study. Or a preliminary understanding of a system, want to learn new things, hear the most is to understand the needs, assuming that the needs of understanding deviation, then your system will become unrecognizable.Software Requirement Specification1 Introduction 1.1 Purpose of writingDemand analysis personnel and users after a number of needs analysis survey, proposed a more specific software Requirements Specification, th
Meeting time: April 21, 2015 activity record: Li NingToday, according to the contents of the 12th chapter of the textbook, we make a specification document for this group's term Project Chocolate project. Our discussion process is discussed in full accordance with the analysis process described in the book. First, we draw the following flowchart for the requirements of the semester project:We then discuss the details of the information in the data flo
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.