PHPer 的思维定势
php高效,快速,成为了很多互联网公司startup的首选,经历了二十多的发展,已无可争议的成为了web开发领域的王者,这是一个巨大的优势,也是php成功的基石。
但这种优势慢慢的变成了一个思维定势,php很难单独提出来,往往是跟着LAMP, LNMP一起被人提及,这成为了phper发展的一个瓶颈,非phper看phper,往往会说php,不就是一个套模板的么,但我们phper一直坚定的认为自己不只是套模板,而是服务器端编程,但仔细想一想,真的是这样么? 如果把LNMP比喻成一个温室,那phper就是这温室里的花朵,基本只关注到业务,而关注不到底层的细节,关注不到协议的细节,web开发只是服务器端网络编程的一非常小的领域,有多少phper想过,我能写真正的服务器端的服务么?或者说自己动手来写一个web服务器?
所以,phper是时候跳出web开发的思维定势了,转向更为广泛的服务器端的网络编程了,其实也有很多phper意识到了这一点,所以往往被其他的语言所宣传的特性所吸引,而往往忽略了问题的本身。
问题的本身是什么?php是不是真不能做这些事情?服务端网络编程是不是和语言有关系,如果你没有想透这个问题,那么只能是在语言层面上流转,而并不能真正的去理解问题的本质。
其实市面上所谓的高并发,非阻塞都不是什么高大上,大多数常用语言都能达到,主要是带来了新的思路,而对于开发者是跟风式的学还是知根知底的学,这是关键。但目前往往很多人没有修练好内功,一但碰到问题,可能就会转向那些可以直接补坑的新事物上, 却不去理解这门语言,可以预料到的是,一但在新的语言上碰到坑,又会转向另一个,周而复始,对于自己,基本没有提高。
而swoole的出现给了这个问题一个最好的答案,我也建议phper前期在技术深度上深入,通过php,自己很熟悉的语言去深入,深入到了一定层次,自然就广了,就像一个小夹角,越深,他覆盖的面也越广泛了。
这篇文章没有具体的技术,只是我和一些朋友交流的感悟。
最后做一个硬广:
2016年6月18日 13:30
北京中关村海龙大厦办公楼17层
有一个Swoole在实际项目中的应用的分享
本次分享不讲入门,只有实战, 会有微博、百度、马展金融的朋友给大家来做分享 另外,本人会担当本次分享的主持人 在帝都的phper,如果感兴趣的 可以点击 查看原文 进行报名。 活动完全免费。
--------------伟大的分割线----------------
PHP饭米粒(phpfamily) 由一群靠谱的人建立,愿为PHPer带来一些值得细细品味的精神食粮!
饭米粒只发原创或授权发表的文章,不转载网上的文章
所发的文章,均可找到原作者进行沟通。
也希望各位多多打赏(算作稿费给文章作者),更希望大家多多投搞。
投稿请联系:
shenzhe163@gmail.com
本文由 桶哥 有感而发,转载请注明本来源信息和以下的二维码(长按可识别二维码关注)

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

Article discusses essential security features in frameworks to protect against vulnerabilities, including input validation, authentication, and regular updates.

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

The enumeration function in PHP8.1 enhances the clarity and type safety of the code by defining named constants. 1) Enumerations can be integers, strings or objects, improving code readability and type safety. 2) Enumeration is based on class and supports object-oriented features such as traversal and reflection. 3) Enumeration can be used for comparison and assignment to ensure type safety. 4) Enumeration supports adding methods to implement complex logic. 5) Strict type checking and error handling can avoid common errors. 6) Enumeration reduces magic value and improves maintainability, but pay attention to performance optimization.
