1. How and Why to write good code?
2. Coding standard based on ZendFramework and real world practise.
3. PHP programming skills from daily coding.
4. Some security tips
5. Some optimization tips
JS 基礎知識,解說使用變數在操作時,不同型別的行為差異(純值與物件 / 傳值與傳參考),以及 ’this‘ 的變化、 Class 宣告方式...等。
A brief description of JavaScript ,introducing basic usage like for loop / class / different this in global function or object function.
JS 基礎知識,解說使用變數在操作時,不同型別的行為差異(純值與物件 / 傳值與傳參考),以及 ’this‘ 的變化、 Class 宣告方式...等。
A brief description of JavaScript ,introducing basic usage like for loop / class / different this in global function or object function.
1. What web caching means and includes
2. Why use caching
3. File caching
4. Share caching
5. Local caching
6. Memcached and its usage
7. TTServer and KTServer
8. Redis VS SSDB
9. CDN cachings
10. Twemproxy
11. Programming skills and tips
The document discusses various techniques for improving web UI performance including minification, obfuscation, compression, combination, setting expiration headers, CSS image sprites, parallelizing downloads, using content delivery networks, browser and web-based performance tools, and specific techniques for Java, .NET, PHP, and Drupal web applications. Some examples include using pack:tag in Java to combine scripts and stylesheets, the ExpiresFilter in Tomcat, the jscssconsolidate tool for .NET, and the phpminify library for PHP. The goal is to reduce page size, number of requests, and load time to improve user experience.
1. What web caching means and includes
2. Why use caching
3. File caching
4. Share caching
5. Local caching
6. Memcached and its usage
7. TTServer and KTServer
8. Redis VS SSDB
9. CDN cachings
10. Twemproxy
11. Programming skills and tips
The document discusses various techniques for improving web UI performance including minification, obfuscation, compression, combination, setting expiration headers, CSS image sprites, parallelizing downloads, using content delivery networks, browser and web-based performance tools, and specific techniques for Java, .NET, PHP, and Drupal web applications. Some examples include using pack:tag in Java to combine scripts and stylesheets, the ExpiresFilter in Tomcat, the jscssconsolidate tool for .NET, and the phpminify library for PHP. The goal is to reduce page size, number of requests, and load time to improve user experience.
Even nowadays, PHP code is mostly manually audited. Expert pore over actual code, in search for bugs or code smells. Actually, it is possible to have PHP do this work itself ! Strengthened with the internal Tokenizer, bolstered by the manual, it is able to scan thousands of lines of code, without getting bored, and bringing pragmatic pieces of wisdom: official manual recommendations, version migration, code pruning and security. In the end, it deliver a global overview of the code, without reading it.
This document outlines PHP coding standards and conventions for naming, formatting, and structuring PHP code. It provides guidelines for naming conventions including class, method, variable, and constant names. It also provides guidelines for code formatting including brace placement, indentation, and formatting for if/else statements and switches. The document discusses comments, constants, and other miscellaneous standards.
This document discusses functions in JavaScript. It defines a function as a block of code that performs a task and can be called multiple times. Functions are first-class objects that can be passed as arguments to other functions, returned from functions, and assigned to variables or object properties. Functions provide their own execution context and scope their variables to the function body. Functions are defined either with a function expression or function declaration and are called directly by name or indirectly via methods like call, apply, setTimeout. The value of the this keyword inside a function depends on how the function is called and refers to the execution context object.
The document discusses conducting a PHP code audit. It outlines steps like interviewing developers, performing black box testing, and conducting an open code audit. When auditing code, the speaker searches for injections like SQL, PHP, and HTML injections. Variables used in includes are reviewed, as are comments, variables, functions, and conditions. Register_globals is identified as a risk that can be emulated. The report would provide an executive summary, problems summary, and details on vulnerabilities found. Community involvement and continuous auditing are recommended for security.
For IT teams and PHP devs, the document provides best practices and tips for building secure and maintainable code. Key points include:
1) Sanitize all input to prevent XSS and SQL injection attacks.
2) Follow security best practices such as using prepared statements and encryption.
3) Leverage existing frameworks and components instead of reinventing functionality.
4) Handle errors and exceptions properly through logging and exceptions.
The document discusses modular and event-driven UI architectures. It describes modules as single, solid units with defined interfaces that can be composed of other modules. An event-driven architecture uses a publish/subscribe pattern where events can be triggered and other parts of the code can listen and respond to those events. Backbone.js is presented as a popular MV* framework for building modular single page apps in an event-driven and RESTful way using models, views, collections, and a router.
The document discusses PHP coding standards and conventions. It introduces PSR (PHP Standards Recommendation), which includes standards for autoloading (PSR-0), basic coding (PSR-1), coding style (PSR-2), logging (PSR-3), and improved autoloading (PSR-4). It also discusses DocBlocks and PHP_CodeSniffer, which is a tool for checking code against coding standards.
The document discusses coding standards, code reviews, and related tools. It emphasizes that coding standards provide structure and consistency that avoids arbitrary variations. Standards help produce unified, understandable code and reduce bugs. The document outlines some specific standards for areas like commenting, naming, collections, and exceptions. It addresses adopting standards through incremental changes and code reviews. Code reviews are presented as an important way to catch bugs early, enhance learning, and promote collective code ownership. Various tools for code analysis, style checking, and code metrics are also mentioned.
PHPcon Poland - Static Analysis of PHP Code – How the Heck did I write so man...Rouven Weßling
Static analysis tools can analyze code without executing it to find bugs and issues. The document discusses several static analysis tools for PHP like PHPMD, Phan, PHPCS, PHPLOC, Deptrac. It explains what they do, like PHPLOC gathering complexity metrics and Deptrac checking for violations of defined layer dependencies. In the end, it recommends using static analysis in CI and not trusting results blindly without understanding the underlying errors.
MyApp provides JavaScript best practices including:
1) Using namespaces to avoid naming collisions and define packages like MyApp.string.utils for reusable functions.
2) Branching code during initialization or lazily on first use to handle browser differences efficiently.
3) Passing configuration as an object instead of many parameters to simplify function calls.
4) Defining private methods and properties using closures to encapsulate code.
5) Employing self-executing functions for one-time initialization tasks.
6) Allowing method chaining for readability when calling several related methods.
We've all been faced with legacy code and often decided to rewrite, feeling it will be easier. There are many reasons this can be wrong. Adam Culp will talks about the entire journey of refactoring a legacy code base. He will begin with assessment and why, move on to planning how and when, cover execution and testing, give step-by-step examples, and even show how to manage the process effectively. Attendees will gain insight and tips on how to handle their own pile of code and refactor happy.
Component Based UI Architecture - Alex MoldovanITCamp
My talk will be mostly oriented towards the JavaScript ecosystem and the modern frameworks that enforce a component based approach towards building your UI. I will try to speak a lot from my recent experience with React.js and if time permits, I will demo some smaller apps just to show everyone how easy it is to play with React.
Modern UI Architecture_ Trends and Technologies in Web DevelopmentSuresh Patidar
The document discusses modern web development trends and technologies. It begins with an introduction of the author and an overview of the topics to be covered, including the shift from classical to modern web development, latest frontend technologies and frameworks, challenges and solutions, and best practices for JavaScript and CSS. Specific technologies covered include responsive design, Ajax, HTML5, CSS3, single page applications, and popular frameworks. Architecture approaches like modular design and common patterns like MVC, MVP and MVVM are explained. The document concludes with reminders about defensive coding practices.
We all know that web performance optimization is becoming critical to the success of web sites and applications. The problem is, we often don’t have the control over the UI Architecture (“middle-end”) that we need to really make things better.
We’ll talk about how to use JavaScript (client- and server-side) to revamp the middle-end so we can throttle web performance (and code maintainability) to the next level.
This document provides an overview of the Selenium architecture for automated web testing. It discusses considerations for what to test, popular Selenium tools, core requirements like browsing URLs and validating results, and pragmatic requirements such as language choices and scheduled execution. Javascript limitations like the same origin policy and DOM access are also covered, along with approaches to address these limitations like using a proxy or privileged mode.
Content Design, UI Architecture and Content-UI-MappingWolfram Nagel
When you want to gather, manage and publish content and display it independently on any user interface and/or target channel you need a system that supports “Content Design and Content UI Mapping”. Content and user interfaces can be planned and assembled modularly and structured in a similar manner — comparable to bricks in a building block system. Content basically runs through three steps until it reaches its recipient: Gathering, management and output. A mapping has to occure at the intersections of these three steps.
This is the extended slides version on the topic.
There's also an article on the topic: https://medium.com/@wolframnagel/content-design-and-ui-mapping-a35af8cac3f6#.3ylkxrakf
This document discusses load balancing with LVS (Linux Virtual Server) and troubleshooting TCP/IP issues. It includes log output showing LVS routing requests to backends, configuration for routing with IPVSADM and Nginx, and recommendations for disabling LRO/GRO features and adjusting TCP settings to address retransmission issues. Commands like tcpdump, netstat, and ethtool are referenced for analyzing network traffic and interface settings.
This document provides 40 shortcuts for Xcode 6.x. Some of the most commonly used shortcuts include Command + N to create new files, Command + O to open files, Command + Click to go to definitions, Command + F to find in files, Command + B to build projects, and Command + R to build and run projects. The document encourages practicing these shortcuts to improve efficiency when coding in Xcode.
1. Introduction to Lua and it's features
2. OpenResty: full-fledged web application server
3. Installation and "Hello World"
4. Nonblocking
5. Reconstruction of infov
6. Configuration skills
7. Table and JSON output problem
8. DNS and Hosts parser
9. More features
1. What does millions visits means?
2. How to know the problem? Tools?
3. Steps for emergency repair
4. The real problem is “Socket”
5. Profiling with XHProf
6. Cachings and twemproxy
7. Summarize of skills
1. Comment: the UGC system
2. Pages/Channels that use the comment system
3. The architecture
4. The APIs and Entries
5. MongoDB and ObjectId
6. Comments "Gailou"
7. Indexes of the big tables
1. A brief introduction of Git (SVN, CVCS, DVCS etc.)
2. Git/TortoiseGit/msysgit installations
3. A complete guide of Git operations
4. The Branches and HEAD
5. Remote and local repository
6. Rebase and submodules etc.
7. Some Skills and Experience