PHP/MVC入门 [英] Getting started with PHP / MVC

查看:45
本文介绍了PHP/MVC入门的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用PHP已有一段时间了,了解了OOPS,PDO等的概念.我一直在慢慢地转向更高级的PHP.我的策略始终是在每个项目中学习越来越多的高级编程.对于我当前的项目,我想实现MVC,因为之前我一直在实现自己的目录或应用程序结构,这次我想对我的应用程序使用MVC.我确实在 Nettuts .但是,这只是基础,我正在寻找越来越多的资源以帮助我开始为我的项目使用MVC.我确信你们可能已经走了同样的路,我想知道有关Internet上一些适用于PHP的出色MVC教程的链接和建议.

i have been using PHP for quite a sometime now, having understood the concept of OOPS, PDO, etc. i have been slowly moving forward to more advanced PHP. my strategy is always to learn more and more advance programming in every project. for my current project i would like to implement MVC, as i have been implementing my own directory or application structure before, this time i want to use MVC for my application. i did went through a MVC boilerplate tutorial on Nettuts. however that was just the basic i am searching for more and more resources for me to help get started with MVC for my projects. i am sure you guys might have passed from the same path i would like to know the links and suggestion about some of the great MVC tutorial for PHP available in the internet.

在我要求不建议使用任何框架之前,我已经使用过cakephp之类的框架.

I have used frameworks like cakephp before i would request not to suggest using of any framework.

谢谢

推荐答案

我建议您查看 MVC设计模式,以便在开始使用它之前先了解它.

I would suggest you look at the MVC Design Pattern so that you understand it before you start using it.

理想情况下,您应该已经在一些项目中遇到了一些麻烦,因为您希望在项目至少完成一半时就进行更改.(这是创建项目的主要动机之一)许多所谓的高级编程技术.易于修改,灵活等).

Ideally, you should already have made some projects where you suffered a little bit because you wanted to change stuff when your project was at least halfway done.(This is one of the main motivators behind a lot of so-called advanced programming techniques. Ease of modification, flexibility and so on).

这是您提到的东西(OO,MVC,我将添加TDD,设计模式)全部出现的地方.

This is where stuff like what you mentioned (OO,MVC, and I would add TDD, Design Patterns) all come in).

以下是我为自己做的并建议其他人做的事情.查看您想要的任何内容,无论是TDD,MVC还是任何其他高级技术.但是请等到您需要它们.

What I do for myself and suggest others do is the following. Look into whatever you want, be it TDD, MVC or any other advanced technique. But wait until you need them.

以我个人的观点,当人们经历过一个天真的项目并且由于缺乏这些技术提供的功能而遭受痛苦时,可以更好地体会到OO和MVC的价值.

In my personal opinion, one can much better appreciate the value of OO and MVC when one has gone through a naïve project and suffered from lack of functionality these techniques provide...

黄金法则是.只有在了解了新技术并看到它可以带来什么好处后,才开始使用新技术.

之所以这么说,是因为我在现实生活中看到的是,许多人在使用OO,MVC甚至是Design Patterns之类的东西时都没有理解后面的为什么.我认为这完全没有帮助.

I say that because what I see in real life is that many people use stuff like OO, MVC and even Design Patterns without understanding the why's behind. I don't think that helps at all.

祝你好运.

这篇关于PHP/MVC入门的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆