在深入研究框架(如 Zend、CakePHP)之前,您是否需要对 PHP 有很好的了解?

发布于 2024-12-09 14:58:24 字数 200 浏览 0 评论 0原文

我问的是与 Javascript 和 jQuery 的比较。我只需要对 Javascript 有基本的了解就可以学习 jQuery(但我在使用 jQuery 的同时不断学习 Javascript)。

PHP 及其框架也是如此吗?我可以只用 PHP 的基本知识就开始深入研究一个框架(然后一路学习 PHP(按原样))吗?或者在开始使用框架之前我是否需要深入了解 PHP?

I'm asking this in comparison with Javascript and jQuery. I was able to learn jQuery with only a basic understanding of Javascript (but I am continually learning Javascript while using jQuery).

Is it the same for PHP and its frameworks? Can I start to dive into a framework with only a basic knowledge of PHP (and then learn PHP (as it is) along the way)? Or do I need to have an in-depth knowledge of PHP before starting with frameworks?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

梦里梦着梦中梦 2024-12-16 14:58:24

不。

您的学习曲线可能会有点陡峭,但您无需具备丰富的 PHP 知识就可以开始学习 PHP 框架。对于每种编程语言,仅了解语法是不够的,您需要使用该语言才能精通它。

每个框架都有自己的工作方式,这与没有框架的工作方式不同。选择更适合您的框架。确保该框架具有良好的文档和社区支持,以便您在遇到不理解/不知道的问题时可以寻求帮助。

NO.

Your learning curve may be a little steeper, but you can start learning PHP frameworks without extensive knowledge of PHP. With every programming language, knowing the syntax is not enough, you need to work with the language to be proficient with it.

Every framework has it's own way of working in it and it is different then working without framework. Choose the framework which suits you better. Be sure that the framework has good documentation and community support so you can ask for help if you get stuck with something that you don't understand / know.

半夏半凉 2024-12-16 14:58:24

实际上,我建议您停止在纯 PHP 中苦苦挣扎,而直接获取一个框架。人们问我一大堆问题“如何连接到 mysql”、“如何将文件上传到 PHP”......

我一直在想,如果你使用框架,你就不需要问,由于大多数支持主动查询,甚至不需要 SQL 知识就可以开始,您可以执行伪 SQL 之类的操作,它为您的请求创建连接(故障排除/调试)。

我个人使用 codeigniter (优秀的文档,占用空间小且易于使用)。所以你可以看一下,它支持 sparks 这使得获取插件变得更加容易。

I would actually recommend you stop toiling around in plain PHP and just get a framework. I a TON of questions from people asking "how do I connect to mysql", "How do I upload a file to PHP"...

The whole time I keep thinking, if you used a framework, you wouldn't need to ask, as most support active queries which don't even require knowledge of SQL to get going, you do things like pseudo SQL, it creates the connection (troubleshooting/debug) for your requests.

Personally I use codeigniter (superb documentation, small footprint, and easy to use). So you can take a look at that, it supports sparks which makes it even easier to get plugins.

若有似无的小暗淡 2024-12-16 14:58:24

我认为某些 PHP 框架的最大优点是,您在使用它们时可以学到很多“最佳实践”,包括:

  • OO 设计模式(最著名的是 MVC)、
  • DRY 原则
  • 、单元测试、
  • 良好的代码风格
  • ……

这一直是以我使用过的两个框架为例:Zend Framework 和 Symfony。但我之前已经有过一些“纯 PHP”的经验,所以也许我已经有点偏见了。

I think the best about some PHP frameworks is that you can learn a lot about "best practices" as you use them, including:

  • OO design patterns (most notably MVC)
  • the DRY principle
  • unit testing
  • Good code style
  • ...

This has been the case for the two frameworks I've worked with, Zend Framework and Symfony. But I already had some previous experience with "plain PHP", so maybe I was already a bit biased.

我们的影子 2024-12-16 14:58:24

查看agiletoolkit,带有 jquery 的 php 框架(又名 atk4)。它是一个与 jquery 和 ajax 很好地集成的 MVC 框架,让您一开始就专注于 Web 应用程序而不是 php - 然后,当您更好地了解 php 时,它不会阻碍您或阻止您使用 php做更多。

Have a look at agiletoolkit, the php framework with jquery (aka atk4). It an MVC framework that is nicely integrated with jquery and ajax and lets you focus on the web application rather than php to begin with - then later, as you get to know php better, it wont hold you back or stop you from using php to do more.

怂人 2024-12-16 14:58:24

我使用 symfony - 我同时学习了 PHP 和 symfony - symfony 有优秀的文档- 所以我想说,如果你选择正确的框架,你可以一起学习......开发/编程的基本知识是一个优势......

I use symfony - i learnt PHP and symfony at the same time - symfony has excellent documentation - so i would say that if you pick the right framework you can learn both together .... a basic knowledge of development / programming is an advantage ....

再可℃爱ぅ一点好了 2024-12-16 14:58:24

是的,这确实应该是可能的。

框架的不同取决于你做事的方式,就像 jQuery 与 JS 中的 MooTools 不同。

我从 PHP 框架开始,开始使用 ASP.NET MVC 框架,而不是普通的普通 Web 表单,这对我来说仍然比 Web 表单更有意义。

在我看来,Zend 有点难以理解,但你可以使用一些很棒的工具。
CakePHP 非常简单,就像 CodeIgniter 和 Kohana 一样。

Yes that should indeed be possible.

The frameworks vary in how you do things, just like jQuery contra MooTools in JS.

Coming from PHP frameworks, I started with ASP.NET MVC framework, instead of the normal plain webforms, and that stills makes more sense to me than webforms.

Zend is in my opinion a little harder to understand, but you get some GREAT tools to work with.
CakePHP is pretty straightforward, like CodeIgniter and Kohana.

时光清浅 2024-12-16 14:58:24

在我看来,框架适用于 MVC 模式。因此,您需要具备良好的 OOP 技能,而不是任何语法技能。如果您对 OOP 有很好的了解,那么您可以轻松地转换任何框架。我在开始使用 PHP 1 个月后才开始使用 Zend Framework。所以在我看来,你不需要对 PHP 有很好的了解,你需要对 OOP 有很好的了解。您只需要具备 PHP 的基本知识就可以启动 Framework

In my opinion frameworks work on MVC pattern. So you need to have good OOP skills rather than any syntax skill. If you are having very good knowledge of OOP, then you can easily convert of any framework. I started to use Zend Framework only after 1 month of starting my PHP. So in my opinion you don't need to have very good knowledge of PHP, you need to have very good knowledge of OOP. You just need to have basic knowledge of PHP even to start Framework

彡翼 2024-12-16 14:58:24

不,你可以直接深入其中。

我使用 cakePHP,它可能是您可以最快看到结果的框架。
很多事情已经为你完成了。
其他框架的“自动”程度较低,但仍然有用。

no, you can dive right into it.

I use cakePHP and it is probably the framework where you can see results the fastest.
lots of things are already done for you.
other frameworks have less "automatic" but can still be useful.

萌梦深 2024-12-16 14:58:24

我正在使用 CakePHP 进行编程。我从来没有用PHP开发过,所以我刚刚开始学习基础知识。经过一周的 PHP 学习,我只了解了一些基础知识,现在我可以毫无问题地开发老板要求我做的任何事情。

I am programming in CakePHP. I have never been developing in PHP, so I just started to learn the basics. After a week of learning PHP to know just the basics I got into cake, and now I have no problems with developing anything my boss asks me to.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文