Effective Java - Item 1 static factory

Item 1 : Consider static factory methods instead of constructors A class can provide a public static factory method (it is not the same as the Factory Method pattern from Design Patterns) Providing a static factory method instead of a...

PHP object, pattern, practice

Chapter 4: Object Advanced Features Static Methods and Properties Constant Properties Abstract Classes(extends) [Error]PHP Fatal error: Cannot instantiate abstract class ShopProductWriter in… [Error]PHP Fatal error: Class ErroredWriter contains 1 abstract method and Interfaces (implements) Traits (use) Using More than One...

ReactJS JSX

JSX Specification facebook reference ECMAScript 6th Edition: ECMA-262 What is JSX JSX is a XML-like syntax extension to ECMAScript without any defined semantics. It’s NOT a proposal to incorporate JSX into the ECMAScript spec itself. var dropdown = A dropdown...

PHP Good Practice

Good Practice 1.Sanitize, Validate, and Escape Trust no one: Never trust any data that originates from a source not under your direct control. [$_GET, $_POST, $_REQUEST, $_COOKIE, $argv, php://stdin, php://input, file_get_contents(), Remote databases, Remote APIs, Data from your clients] Number...