search
HomeBackend DevelopmentPHP Tutorialphp的抽象概念有哪些

如题,php有哪些抽象的概念,这些抽象概念又是为了解决php开发时的哪些问题的??
补充,抱歉我说的过于模糊了,我要问的是在项目开发中为了方便开发使用的一些东西
我说一些我所知道的

比如说

  1. 使用对象来操作数据库的orm

  2. 远程对象调用 Hprose

  3. 数据结构和设计模式

  4. mysql的线程池

还有soap,aop(切片编程),拦截器 这三个我就不清楚了
因为受限于自己的开发经历和眼界,许多的东西没有听说过,没有接触过,
我是希望能说一些类似上面的这种东西,让我听到,看见,从而去了解,去学习

回复内容:

如题,php有哪些抽象的概念,这些抽象概念又是为了解决php开发时的哪些问题的??
补充,抱歉我说的过于模糊了,我要问的是在项目开发中为了方便开发使用的一些东西
我说一些我所知道的

比如说

  1. 使用对象来操作数据库的orm

  2. 远程对象调用 Hprose

  3. 数据结构和设计模式

  4. mysql的线程池

还有soap,aop(切片编程),拦截器 这三个我就不清楚了
因为受限于自己的开发经历和眼界,许多的东西没有听说过,没有接触过,
我是希望能说一些类似上面的这种东西,让我听到,看见,从而去了解,去学习

"抽象的概念"是你自己起的名字吧?其实你提到的那些东西也是别人起的名字而已,知道不知道其实作用不大,没什么必要特意去学习。
举例来说,你知道SOAP又怎么样,不知道又怎么样?如果项目不需要,你知道也不能用,如果项目不需要,不知道你就去学,你举的这几个例子都是。
在长期的开发中,某些功能或者对象被总结和抽象,然后命名,然后别人就可以拿来,如此而已。比如很早的时候邮件发送是通过socket,模拟pop3协议与邮件服务器通讯完成邮件发送,现在只要找个SendMail类,配置一下就能发邮件了。数据库也是,当你基于框架或者开源产品开发的时候数据库对象已经被封装了,但是在这里你也同样可以看到很多新手还是拿mysqli_connect之类的代码在问问题。
所以,当你需要做的时候搜索一下有没有已有的解决方案就行了,预习几乎没有意义。soap, aop这种东西你做10个项目也不一定会用到一次。
看到不认识的特殊名词自己搜索一下也是不错的补充,知道是什么就够了,用到了再研究不算晚。现在发展的很快,很可能你研究了一个月才学会,然后发现已经有新的东西代替它了。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
PHP Performance Tuning for High Traffic WebsitesPHP Performance Tuning for High Traffic WebsitesMay 14, 2025 am 12:13 AM

ThesecrettokeepingaPHP-poweredwebsiterunningsmoothlyunderheavyloadinvolvesseveralkeystrategies:1)ImplementopcodecachingwithOPcachetoreducescriptexecutiontime,2)UsedatabasequerycachingwithRedistolessendatabaseload,3)LeverageCDNslikeCloudflareforservin

Dependency Injection in PHP: Code Examples for BeginnersDependency Injection in PHP: Code Examples for BeginnersMay 14, 2025 am 12:08 AM

You should care about DependencyInjection(DI) because it makes your code clearer and easier to maintain. 1) DI makes it more modular by decoupling classes, 2) improves the convenience of testing and code flexibility, 3) Use DI containers to manage complex dependencies, but pay attention to performance impact and circular dependencies, 4) The best practice is to rely on abstract interfaces to achieve loose coupling.

PHP Performance: is it possible to optimize the application?PHP Performance: is it possible to optimize the application?May 14, 2025 am 12:04 AM

Yes,optimizingaPHPapplicationispossibleandessential.1)ImplementcachingusingAPCutoreducedatabaseload.2)Optimizedatabaseswithindexing,efficientqueries,andconnectionpooling.3)Enhancecodewithbuilt-infunctions,avoidingglobalvariables,andusingopcodecaching

PHP Performance Optimization: The Ultimate GuidePHP Performance Optimization: The Ultimate GuideMay 14, 2025 am 12:02 AM

ThekeystrategiestosignificantlyboostPHPapplicationperformanceare:1)UseopcodecachinglikeOPcachetoreduceexecutiontime,2)Optimizedatabaseinteractionswithpreparedstatementsandproperindexing,3)ConfigurewebserverslikeNginxwithPHP-FPMforbetterperformance,4)

PHP Dependency Injection Container: A Quick StartPHP Dependency Injection Container: A Quick StartMay 13, 2025 am 12:11 AM

APHPDependencyInjectionContainerisatoolthatmanagesclassdependencies,enhancingcodemodularity,testability,andmaintainability.Itactsasacentralhubforcreatingandinjectingdependencies,thusreducingtightcouplingandeasingunittesting.

Dependency Injection vs. Service Locator in PHPDependency Injection vs. Service Locator in PHPMay 13, 2025 am 12:10 AM

Select DependencyInjection (DI) for large applications, ServiceLocator is suitable for small projects or prototypes. 1) DI improves the testability and modularity of the code through constructor injection. 2) ServiceLocator obtains services through center registration, which is convenient but may lead to an increase in code coupling.

PHP performance optimization strategies.PHP performance optimization strategies.May 13, 2025 am 12:06 AM

PHPapplicationscanbeoptimizedforspeedandefficiencyby:1)enablingopcacheinphp.ini,2)usingpreparedstatementswithPDOfordatabasequeries,3)replacingloopswitharray_filterandarray_mapfordataprocessing,4)configuringNginxasareverseproxy,5)implementingcachingwi

PHP Email Validation: Ensuring Emails Are Sent CorrectlyPHP Email Validation: Ensuring Emails Are Sent CorrectlyMay 13, 2025 am 12:06 AM

PHPemailvalidationinvolvesthreesteps:1)Formatvalidationusingregularexpressionstochecktheemailformat;2)DNSvalidationtoensurethedomainhasavalidMXrecord;3)SMTPvalidation,themostthoroughmethod,whichchecksifthemailboxexistsbyconnectingtotheSMTPserver.Impl

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Article

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools