Symfony 2 还是 Symfony 1.4?
我正在启动一个新的 Symfony 项目,这对我的公司来说非常重要。我的经验仅限于 Symfony 1.4。我有3个月的时间来完成这个项目。
该项目应该会存在多年,并且会发展出许多功能。我知道很多人已经在生产中使用 Symfony 2,但是您认为使用 1.4 是一个坏主意吗?
每种情况都不同。我认为 1.4 没有任何问题,但有些人建议我使用 Symfony 2,因为最终我们需要升级并重写大量代码。
另外,还有 Doctrine 2。我会使用 1.2.4。再说一遍,我知道 Doctrine 2 确实很棒,但是坚持使用 1.2.4 会不会让我陷入悬崖?它似乎可以满足我们需要的一切。
感谢您的任何见解。
I am starting a new Symfony project that will be very important to my company. My experience is only with Symfony 1.4. and I have 3 months to complete the project.
The project should be around for years and will grow to have many features. I know that many people are already using Symfony 2 in production, but do you think it's a bad idea to go with 1.4?
Every situation is different. I don't see any problem with 1.4, but some people are suggesting I use Symfony 2 because eventually we will need to upgrade and do a lot of rewriting of code.
Plus, there is Doctrine 2. I would be using 1.2.4. Again, I know that Doctrine 2 is really great, but am I going off a cliff by sticking with 1.2.4? It seems to do everything we need.
Thanks for any insight.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
为什么应该使用 Symfony 2.0:
使用 1.x 的唯一可能原因是时间问题。然而,如果这个项目那么重要,那么增加时间限制(如果不可行的话)更有意义,然后在 1.x 中完成它并浪费所有时间稍后重写它。
Why you should use Symfony 2.0:
The only possible reason to go with 1.x is time concerns. However, if this project is that important, it makes more sense to increase the time limit (if it is unfeasible), then to do it in 1.x and waste all that time rewriting it later.
好吧,如果您有更多时间来完成项目,那么 Symfony 2.0 确实应该是您的选择。 Symfony 2.0 开发人员仍在努力学习使用所有这些良好标准和最佳实践的正确方法。
使用 SF 1.4 的社区已经成熟,并且解决了所有常见(和其他不常见)场景可能出现的每一个问题。
所有这些关于速度的争论并不适用于 90%(或更多?)基于 SF 构建的项目。除非您需要高性能 Web 应用程序(每分钟处理超过 500-1000 个请求),否则使用 SF 1.4 就可以了。如果您需要提供更多服务,您可以随时在现场再使用一台服务器。优化后的 SF 1.4 应用程序可以表现得相当不错。
我想说的是,对于大多数应用程序来说,所有关于性能的讨论都不是问题。人们在举起速度旗帜时不会考虑这一点。
SF 1.4 是一个结构良好的框架。它确实加快了开发过程。 SF 2.0 是一个正在开发的社区。人们仍在为最常见的问题开发解决方案和插件。
我仍然在所有新项目中使用 SF 1.4。主要是因为我在这方面做了很多工作,使我的项目完成得非常快。我的所有客户都不需要高性能的网络应用程序,但是我自己的项目需要快速,并且经过优化后确实如此。
Well, Symfony 2.0 should really be your bet if you had more time to get the project done. Symfony 2.0 developers are still struggling to learn the right way to use all those nice standards and best practices.
The community using SF 1.4 is already mature and has solved every single problem that all the common (and others not common) scenarios could present.
All those arguments about speed do not apply to 90% (or more?) of projects built on SF. Unless you need a high performance webapp (serving more than 500-1000 requests/minute), you gonna be fine using SF 1.4. If you need to serve more than that you can always using one more server to the scene. An optimized SF 1.4 app can perform pretty good.
I'm trying to say that all the talk about performance is not a problem for most apps. People do not think about it when raising the speed flag.
SF 1.4 is a well structured framework. It really speed things up during development. SF 2.0 is a community under development. People are still developing solutions and plugins for the most common problems.
I'm still using SF 1.4 for all my new projects. Mainly because I got a lot done on it that get my projects done really fast. All my customers don't need a high performance webapp, however I have my own projects that need to be fast and after optimization they really are.
从 1.0 开始我就一直在努力解决这个问题。好吧,太棒了,我完成了我的 1dot 0 项目,邪恶地启动了它...不等,现在有 1.1...好吧升级,解决所有升级麻烦...好吧,酷现在它已经准备好了,但不等 1.2 现在已经出来了。 ..FFS...好吧,将所有内容升级到 1.2,在学习这个新的表单类和插件问题方面遇到了困难,因为 sfGuard 需要新版本等等等等...好吧,现在我们准备好启动它,但没有等等...他们在同一天发布了 1.3 和 1.4。好吧,这次升级会有多糟糕??? phpmailer 好,swiftmailer 坏。或者这次正好相反。哦,FFS,这个 symfony2 现在是关于什么的......
我确信我不是唯一一个经历过这种情况(或类似场景)的人,
重要的是你知道什么以及你擅长什么。我确信 Symfony 2 非常棒,非常棒,有史以来最好的等等等等。但如果你需要三个月的时间来加快速度并解决所有会出现的错误。那么您最好选择 1.4 并以您所知道的为基础进行构建。
我坚持使用 1.4,因为我已经构建了一个运行良好的大型代码库。从不同的观点可以看出,尽管争论可能会持续一段时间。
无论如何,这就是我的两分钱。
I've struggled with this since 1.0. Ok great i finished my 1dot 0 project wicked fire it up...no wait there is now 1.1...ok upgrade go through all the upgrade troubles... ok cool NOW it's ready to go but no wait 1.2 is out now...FFS... ok upgraded everything to 1.2 struggled through learning this new forms class and plugin issues cuz sfGuard needs a new version blah blah blah... ok now we are ready to go fire it up but no wait...they've release 1.3 AND 1.4 on the same day WTH. Ok how bad is this upgrade going to be??? phpmailer good swiftmailer bad. or is it the other way around this time. Oh FFS what is this symfony2 all about now.....
I'm sure i'm not the only one that has gone through that (or similar scenario)
what matters is what YOU know and what YOU are good at. Symfony 2 i'm sure is great awesome best ever blah blah blah. But if it takes you three months to get up to speed and work all the bugs out that WILL come up. Then you're better to go with 1.4 and build on what you know.
I'm sticking with 1.4 because i have a large code base that i've built up that works just fine. As you can see by the varied opinions though the debate could rage on for a while.
That's my two cents anyway.
我仍然在 Symfony 1.4 中做我的项目,但是为自己概述一个关于如何对 2.0 进行这些更改的策略将是一个好主意。另外,听起来Doctrine有些受挫,而Propel的开发似乎已经被唤醒了。未来许多人的偏好可能会转向 Propel。
I'm still doing my projects in Symfony 1.4, but outlining a strategy for yourself on how to make those changes towards 2.0 would be a good idea. Also, it sounds like there is some frustration with Doctrine, and Propel development seems to have been awakened. There may be a switch in many preferences towards Propel in the future.
短期:
如果您知道 sf1.4 允许您在完成客户要求的所有工作的时间内完成项目,那就这么做吧。
长期:
正如您所说,该项目应该存在多年,所以我认为许多开发人员都会致力于它。 Sf2 更加解耦,并使用 PHPUnit 进行测试。允许您使用 ESI 并在 HTTP 标准下表现良好(无应用程序缓存)。
Short term:
If you know that sf1.4 allows you to finish the project in the time you have doing all the stuff requested by the customer go with that.
Long term:
As you said the project should be around for years so I think that many developers will work on it. Sf2 is much more decoupled and uses PHPUnit for testing. Allows you to use ESI and performs very good with HTTP standards (no application cache).
完成任务比使用最新和最好的更重要,尽管 symfony 2 似乎是一个更好的版本,但 symfony 1.4 仍然是一个很棒的产品,拥有更多知识渊博的开发人员,因此如果您确实遇到了任何绊脚石的博客,您更有可能在更短的时间内找到解决方案。
就您的目的而言,symfony 1.4 已经足够好了,并且当您决定转向 symfony 2 时,它会让您对 symfony 有更好的认识。
这些版本之间有足够的相似之处,能够通过使用 symfony 1.4 获得有用的知识,这意味着现在,你可以两全其美——为以后和完成工作提供有用的经验。
Getting things done is more important than using the latest and greatest and although symfony 2 appears to be a better version all round, symfony 1.4 is still a great product, has a greater pool of knowledgeable developers and therefore if you do hit any stumbling blogs, you are much more likely to find a solution in a much shorter time.
For your purposes symfony 1.4 is good enough and will give you a greater appreciation of symfony if and when you decide to move over to symfony 2.
There are enough similarities between the versions to be able to gain useful knowledge through using symfony 1.4 and it means that for now, you get the best of both worlds -- useful experience for later on and getting things done.
使用 Symfony 2。
由于 Symfony 2 的高级 ACL 功能,我现在正在从 1.4 切换到 2。
它最终会为您节省大量时间。
Go with Symfony 2.
I'm doing the switch from 1.4 to 2 right now because of the advanced ACL features of Symfony 2.
It will save you a lot of time in the end.
我会选择 symfony 2。你有所有的功能改进(更快,学说 2 等等),但这不是我会选择它的原因。
Symfony 2 已经过彻底的安全测试,这对于任何实际项目都至关重要。另外,长期支持不会涵盖您的项目生命周期,因此确实有必要在 2 中构建它
。在 SF 1.x 中工作了几年之后,我刚刚在 SF2 中开始了我的第一个项目。变化很多,但没花太长时间就适应了。
I would go with symfony 2. You have all the feature improvements (faster, doctrine 2, etc etc etc), but that is not why I would go for it.
Symfony 2 has had thorough security testing, which is vital for any real project. Add tot hat the fact that long term support won't cover your projects lifetime, and it really is neccessary to build it in 2.
I just started my first project in SF2, after working for a few years in sf 1.x. There are a lot of changes, but it didn't take too long to adapt.