才接触php,请问php做前端是怎么回事?
当时在看一个php和java比较贴的时候看到有几个人说php适合做前端,百度就是php做的前端。 据我了解php不是都是做后台的吗? 前端不是html+css+js完成的吗? 他们说的php做前端是怎么回事?
回复讨论(解决方案)
前后是个相对的概念,你最好给出原文的链接,他们的立场可能和你的不一样
就这个帖子
http://www.zhihu.com/question/20314377
后面的回复也几次提到php适合做前端,我就搞不懂是PHP做前端是怎么回事
这是原文:
总的来说,靠近用户的前端,使用PHP能够更快的完成前端频繁而琐碎的更新,自如的应对各种需求的变化。页面的结构调整、用户输入内容的基本验证、仅只和用户交互有关的简单逻辑等都很适合使用PHP来开发,甚至可以通过类似Smarty等模板技术将其页面的变动迁移到前端团队。而基本的业务逻辑和数据的更新采用Java开发,可以有效的提高复用度、提升性能和吞吐能力、规避安全问题等。而开发效率稍有降低换来的是可维护性的提升,发布速度慢就更不是问题了,因为通常对于基础业务逻辑的调整往往都是整体修改,并层层测试确认才能发布的。
所以,大型网站前端采用PHP后端采用Java,既好招人又好维护、系统稳定还性能高、连安全性都大大增加。代码复用、文档完备度居然也都改善了。让你在以上这些好处触手可及时,对架构师知识谱系在广度上要求更高一些这事根本就不是个问题。
显然他的立场是不一样的,他的前后端是项目的分层。所以他说 php 适合做 用户层,而 java 适合做 业务层和数据层
而你说的是整个 B/S,自然 html+css+js 是前端了

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

AI Hentai Generator
Generate AI Hentai for free.

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,

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 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...

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...

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

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