Home Backend Development PHP Tutorial 悟,看似突然理解了MVC模型

悟,看似突然理解了MVC模型

Jun 13, 2016 pm 12:49 PM
cakephp mvc nbsp php thinkphp

悟,貌似突然理解了MVC模型!

本帖最后由 default7 于 2012-12-29 16:52:11 编辑 一直以来对MVC都是一种认为十分神秘厉害的东西。刚毕业的时候去面试被问MVC,一点儿都不懂。然后也看了CakePHP、ThinkPHP,越看越觉得不懂,越看越觉得迷茫…… 以为不会MVC就无法从事PHP方面的工作,越来越感觉到气馁,几乎就快要放弃PHP了…… 后来丢掉了这些直接不理会了。

后来自己写代码东西,做自己的程序,但没有去用那些cakephp、thinkphp,其实从上学的时候就开始了。毕业后也坚持了。今天突然拿到了N年前(毕业的时候自己一个个代码敲的)的做的一个网站平台(其实是个CMS)来改,网站的内容比较多,很多种类:软件soft、图片pics、新闻news、博客网址site
然后看到文件夹结构:
前台首页就一个入口 get.php
然后各个访问就通过这样来:

引用
(访问新闻列表)
前台网址 /get.php?db=news&mod=list&page=$page,
处理程序 /source/list_news.php
模板地址 /template/default/list_news.htm

(访问新闻详细页)
前台网址 /get.php?db=news&mod=detail&id=$id
处理程序 /source/detail_news.php
模板地址 /template/default/detail_news.htm

(访问软件列表)
前台网址 /get.php?db=news&mod=list&page=$page (其实就是C)
处理程序 /source/list_soft.php (这个是M)
模板地址 /template/default/list_soft.htm (这个是V)




以往的帖子:
引用
非技术问题:很想知道下,有多少人和我是一样不喜欢用那些框架的
http://bbs.csdn.net/topics/320206261 (发表于: 2009-11-28 23:33:49 )


 一直搞不懂MVC到底是什么,JAVA板块中懂MVC的朋友请进!!
http://bbs.csdn.net/topics/350216811(发表于: 2010-12-10 22:01:11 )


跟别人争论PHP中MVC的问题,真的有些累了
http://bbs.csdn.net/topics/350216861(发表于: 2010-12-10 22:38:53 )


读《PHP5 使用Zend Framework & Smarty 构筑真正的MVC应用模式》 
http://bbs.csdn.net/topics/350139910 (发表于:  2010-11-03 15:00:35 )





回想第一次去面试PHP的工作被人狠狠的拒绝了,记忆太深刻,(毕业的那个月份,怀着信息去面试,坐了三个小时的公交,从武昌跑到汉口,面试的时候听到里面的程序员居然连PHP怎么跳转都不会,自己认为一定可以面试上,结果恰恰相反。被狠狠的拒绝了,800一个月什么都不包,一周只休息一天且还要随时待命,试用期不到800,三个月才转正。…… 拒绝的理由就是自己不熟悉mvc)然后我看到他们公司的业务就是搞一个论坛,很多PHP程序员。

我问了一句不是有discuz吗?结果让boss很不高兴。他说discuz(当时已经有discuz 7.x)根本就不符MVC,更不符合标准的MVC,所以他们公司要自己来做一个discuz…… 半年之后,我再去搜索他们的公司,结果连官方网站都打不开了,域名都是出售状态。。。。。

有点感慨,但虽然过去了这么多年,但是我还是很排斥用cakephp、thinkphp!为什么要用这些?与其用这些,我为什么不拿discuz或者dedecms直接来做?里面后台、会员系统、数据操作全都有!为什么一切都要按照cakephp、thinkphp这些的条条框框去弄。当年的感受MVC就是cakephp、thinkphp,不会cakephp、thinkphp就不会php,写PHP网站东西必须用cakephp或者thinkphp(差点强迫症)……

弄PHP一路走来,不容易 ~ ~ 

















cakephp mvc php 面试 感慨?
------解决方案--------------------
沾沾沙发哦。。。
thinkphp还是不错的哦
想学thinkphp来我群7948162


------解决方案--------------------

------解决方案--------------------
已被CMS二次开发废了的飘过~~ 
------解决方案--------------------
呵呵,比较感兴趣的是那家公司,如果DZ 都是7了 当时和PHPwind应该平分天下(局域网)了吧,然后怀着那么大的理想,却请着廉价的开发者,结局这样也就不奇怪了。
也许那并不是他们主要的产品线吧,或许是个兴趣项目...
那些年那些事...
------解决方案--------------------
MVC 是什么?MVC 究竟是什么?
MVC 不过是每个应用程序抽象化的产物。或者说 MVC 是实践到理论的升华
任何给“人”使用的程序,都自觉或不自觉的使用后来被人称作 MVC 的设计模式


------解决方案--------------------
Statement of this Website
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

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

CakePHP Working with Database CakePHP Working with Database Sep 10, 2024 pm 05:25 PM

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

CakePHP Logging CakePHP Logging Sep 10, 2024 pm 05:26 PM

Logging in CakePHP is a very easy task. You just have to use one function. You can log errors, exceptions, user activities, action taken by users, for any background process like cronjob. Logging data in CakePHP is easy. The log() function is provide

See all articles