Symfony 2还是Symfony 1.4?

时间:2022-06-01 21:21:19

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.

我正在开始一个对我的公司非常重要的新Symfony项目。我的经验仅适用于Symfony 1.4。我有3个月的时间来完成这个项目。

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?

该项目应该存在多年,并将成长为具有许多功能。我知道很多人已经在生产中使用Symfony 2,但是你觉得与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.

每种情况都不同。我没有看到1.4的任何问题,但有些人建议我使用Symfony 2,因为最终我们需要升级并进行大量的代码重写。

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.

另外,还有Doctrine 2.我将使用1.2.4。再一次,我知道Doctrine 2真的很棒,但是我是否会坚持使用1.2.4?它似乎做了我们需要的一切。

Thanks for any insight.

感谢您的任何见解。

8 个解决方案

#1


39  

Why you should use Symfony 2.0:

为什么要使用Symfony 2.0:

  • Faster. Many Symfony components have seen performance improvements and it also now supports edge side includes.
  • 更快。许多Symfony组件已经看到了性能改进,现在它也支持边缘端包括。
  • Fixes weaker design. Symfony 1.x is great, but some components had flaws, like logging (now outsourced) and tasks (more flexible). Forms in 1.x were powerful, but had some flaws; forms in 2.0 are better.
  • 修复设计较弱的问题。 Symfony 1.x很棒,但有些组件有缺陷,比如日志记录(现在外包)和任务(更灵活)。 1.x中的表单很强大,但有一些缺陷; 2.0中的表格更好。
  • It's the future. Symfony 1.x will expire before the lifetime of your project. You already said you will be rewriting it. It makes no sense to wait.
  • 这是未来。 Symfony 1.x将在项目生命周期之前到期。你已经说过要重写它了。等待是没有意义的。
  • Cleaner, easier code. Namespaces, more decoupling, generally even more beautiful than Symfony 1.x was.
  • 更清洁,更简单的代码。命名空间,更多的解耦,通常比Symfony 1.x更美丽。
  • Doctrine 2.0. Way faster, way easier to use.
  • 学说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.

与1.x一起使用的唯一可能原因是时间问题。但是,如果这个项目非常重要,那么增加时间限制(如果它不可行)更有意义,那么在1.x中执行此操作并浪费所有时间以后重写它。

#2


19  

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.

好吧,如果你有更多时间完成项目,Symfony 2.0应该真的是你的赌注。 Symfony 2.0开发人员仍在努力学习使用所有这些优秀标准和最佳实践的正确方法。

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.

使用SF 1.4的社区已经成熟并且已经解决了所有常见(以及其他不常见)场景可能出现的每个问题。

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.

所有关于速度的争论都不适用于基于SF构建的90%(或更多?)项目。除非你需要一个高性能的webapp(服务超过500-1000个请求/分钟),否则你可以使用SF 1.4。如果您需要提供更多服务,您可以随时使用一台服务器到场景中。优化的SF 1.4应用程序可以表现得相当不错。

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.

SF 1.4是一个结构良好的框架。它确实在开发过程中加快了速度。 SF 2.0是一个正在开发的社区。人们仍在为最常见的问题开发解决方案和插件。

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.

我仍在为所有新项目使用SF 1.4。主要是因为我做了很多工作,让我的项目完成得非常快。我的所有客户都不需要高性能的Web应用程序,但是我有自己的项目需要快速,并且在优化后他们确实是。

#3


5  

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

自1.0以来我一直在努力。好的,我完成了我的1dot 0项目邪恶的火灾...没有等待现在1.1 ...确定升级通过所有的升级麻烦...好吧现在它已经准备好了但是没有等待1.2现在已经出来了。 ..FFS ...确定通过学习这个新的表单类和插件问题将所有内容升级到1.2挣扎因为sfGuard需要一个新版本等等等等等等等等等等等现在我们已经准备好了解它但没有等待......他们在同一天WTH发布了1.3和1.4。好的,升级有多糟糕? phpmailer好swiftmailer坏。或者这是另一种方式。哦FFS现在这个symfony2是什么.....

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.

重要的是你所知道的和你擅长的。 Symfony 2我肯定是非常棒的最棒的等等等等等等。但是,如果你需要三个月的时间才能加快速度,并解决所有出现问题的问题。然后你最好选择1.4并以你所知道的为基础。

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.

我坚持使用1.4,因为我有一个很大的代码库,我已经建立了很好的工作。正如你可以从不同的意见中看到的那样,虽然辩论可能会持续一段时间。

That's my two cents anyway.

不管怎样,那是我的两分钱。

#4


2  

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.

我仍然在Symfony 1.4中进行我的项目,但是为自己概述了如何将这些更改转向2.0的策略将是一个好主意。而且,听起来似乎对Doctrine有些沮丧,Propel的开发似乎已被唤醒。未来可能会对Propel的许多偏好进行转换。

#5


2  

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.

短期:如果您知道sf1.4允许您在您完成客户要求的所有内容时完成项目。

  • Pro: you know it, no costs for you on technology
  • 亲:你知道,没有技术费用
  • Cons: end of support November 2012, Lime for testing (or plugin for PHPUnit), using an "old" solution
  • 缺点:2012年11月支持结束,Lime用于测试(或PHPUnit插件),使用“旧”解决方案

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

长期:正如你所说,项目应该存在多年,所以我认为很多开发人员都会努力。 Sf2更加分离并使用PHPUnit进行测试。允许您使用ESI并且在HTTP标准(没有应用程序缓存)方面表现非常好。

  • Pro: brand new tool, very active project, a couple of steps above sf1.4, as web will evolve also Sf2 will embrace that changes and support development
  • 专业:全新的工具,非常活跃的项目,sf1.4以上的几个步骤,随着网络的发展,Sf2也会接受这种变化并支持开发
  • Cons: you don't know it but you can hire someone to help you (GTD and learning a new framework)
  • 缺点:你不知道但是你可以雇人来帮助你(GTD和学习新的框架)

#6


1  

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.

完成任务比使用最新和最好的更重要,虽然symfony 2似乎是一个更好的版本,symfony 1.4仍然是一个伟大的产品,拥有更多的知识渊博的开发人员,因此如果你做任何绊脚石的博客,你更有可能在更短的时间内找到解决方案。

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.

为了您的目的,symfony 1.4足够好,如果您决定转移到symfony 2,它会让您更好地了解symfony。

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 1.4获得有用的知识,这意味着,就目前而言,您将获得两全其美的优势 - 以后的有用体验和完成任务。

#7


0  

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.

使用Symfony 2.由于Symfony 2的高级ACL功能,我现在正在从1.4切换到2。

It will save you a lot of time in the end.

它最终会为你节省很多时间。

#8


0  

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.你有所有的功能改进(更快,学说2等等),但这不是我为什么会这样做的原因。

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.

Symfony 2已经进行了彻底的安全测试,这对任何真正的项目都至关重要。再加上长期支持不会涵盖您的项目生命周期这一事实,并且在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.

在sf 1.x工作了几年之后,我刚刚在SF2开始了我的第一个项目。有很多变化,但适应时间不会太长。

#1


39  

Why you should use Symfony 2.0:

为什么要使用Symfony 2.0:

  • Faster. Many Symfony components have seen performance improvements and it also now supports edge side includes.
  • 更快。许多Symfony组件已经看到了性能改进,现在它也支持边缘端包括。
  • Fixes weaker design. Symfony 1.x is great, but some components had flaws, like logging (now outsourced) and tasks (more flexible). Forms in 1.x were powerful, but had some flaws; forms in 2.0 are better.
  • 修复设计较弱的问题。 Symfony 1.x很棒,但有些组件有缺陷,比如日志记录(现在外包)和任务(更灵活)。 1.x中的表单很强大,但有一些缺陷; 2.0中的表格更好。
  • It's the future. Symfony 1.x will expire before the lifetime of your project. You already said you will be rewriting it. It makes no sense to wait.
  • 这是未来。 Symfony 1.x将在项目生命周期之前到期。你已经说过要重写它了。等待是没有意义的。
  • Cleaner, easier code. Namespaces, more decoupling, generally even more beautiful than Symfony 1.x was.
  • 更清洁,更简单的代码。命名空间,更多的解耦,通常比Symfony 1.x更美丽。
  • Doctrine 2.0. Way faster, way easier to use.
  • 学说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.

与1.x一起使用的唯一可能原因是时间问题。但是,如果这个项目非常重要,那么增加时间限制(如果它不可行)更有意义,那么在1.x中执行此操作并浪费所有时间以后重写它。

#2


19  

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.

好吧,如果你有更多时间完成项目,Symfony 2.0应该真的是你的赌注。 Symfony 2.0开发人员仍在努力学习使用所有这些优秀标准和最佳实践的正确方法。

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.

使用SF 1.4的社区已经成熟并且已经解决了所有常见(以及其他不常见)场景可能出现的每个问题。

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.

所有关于速度的争论都不适用于基于SF构建的90%(或更多?)项目。除非你需要一个高性能的webapp(服务超过500-1000个请求/分钟),否则你可以使用SF 1.4。如果您需要提供更多服务,您可以随时使用一台服务器到场景中。优化的SF 1.4应用程序可以表现得相当不错。

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.

SF 1.4是一个结构良好的框架。它确实在开发过程中加快了速度。 SF 2.0是一个正在开发的社区。人们仍在为最常见的问题开发解决方案和插件。

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.

我仍在为所有新项目使用SF 1.4。主要是因为我做了很多工作,让我的项目完成得非常快。我的所有客户都不需要高性能的Web应用程序,但是我有自己的项目需要快速,并且在优化后他们确实是。

#3


5  

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

自1.0以来我一直在努力。好的,我完成了我的1dot 0项目邪恶的火灾...没有等待现在1.1 ...确定升级通过所有的升级麻烦...好吧现在它已经准备好了但是没有等待1.2现在已经出来了。 ..FFS ...确定通过学习这个新的表单类和插件问题将所有内容升级到1.2挣扎因为sfGuard需要一个新版本等等等等等等等等等等等现在我们已经准备好了解它但没有等待......他们在同一天WTH发布了1.3和1.4。好的,升级有多糟糕? phpmailer好swiftmailer坏。或者这是另一种方式。哦FFS现在这个symfony2是什么.....

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.

重要的是你所知道的和你擅长的。 Symfony 2我肯定是非常棒的最棒的等等等等等等。但是,如果你需要三个月的时间才能加快速度,并解决所有出现问题的问题。然后你最好选择1.4并以你所知道的为基础。

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.

我坚持使用1.4,因为我有一个很大的代码库,我已经建立了很好的工作。正如你可以从不同的意见中看到的那样,虽然辩论可能会持续一段时间。

That's my two cents anyway.

不管怎样,那是我的两分钱。

#4


2  

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.

我仍然在Symfony 1.4中进行我的项目,但是为自己概述了如何将这些更改转向2.0的策略将是一个好主意。而且,听起来似乎对Doctrine有些沮丧,Propel的开发似乎已被唤醒。未来可能会对Propel的许多偏好进行转换。

#5


2  

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.

短期:如果您知道sf1.4允许您在您完成客户要求的所有内容时完成项目。

  • Pro: you know it, no costs for you on technology
  • 亲:你知道,没有技术费用
  • Cons: end of support November 2012, Lime for testing (or plugin for PHPUnit), using an "old" solution
  • 缺点:2012年11月支持结束,Lime用于测试(或PHPUnit插件),使用“旧”解决方案

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

长期:正如你所说,项目应该存在多年,所以我认为很多开发人员都会努力。 Sf2更加分离并使用PHPUnit进行测试。允许您使用ESI并且在HTTP标准(没有应用程序缓存)方面表现非常好。

  • Pro: brand new tool, very active project, a couple of steps above sf1.4, as web will evolve also Sf2 will embrace that changes and support development
  • 专业:全新的工具,非常活跃的项目,sf1.4以上的几个步骤,随着网络的发展,Sf2也会接受这种变化并支持开发
  • Cons: you don't know it but you can hire someone to help you (GTD and learning a new framework)
  • 缺点:你不知道但是你可以雇人来帮助你(GTD和学习新的框架)

#6


1  

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.

完成任务比使用最新和最好的更重要,虽然symfony 2似乎是一个更好的版本,symfony 1.4仍然是一个伟大的产品,拥有更多的知识渊博的开发人员,因此如果你做任何绊脚石的博客,你更有可能在更短的时间内找到解决方案。

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.

为了您的目的,symfony 1.4足够好,如果您决定转移到symfony 2,它会让您更好地了解symfony。

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 1.4获得有用的知识,这意味着,就目前而言,您将获得两全其美的优势 - 以后的有用体验和完成任务。

#7


0  

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.

使用Symfony 2.由于Symfony 2的高级ACL功能,我现在正在从1.4切换到2。

It will save you a lot of time in the end.

它最终会为你节省很多时间。

#8


0  

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.你有所有的功能改进(更快,学说2等等),但这不是我为什么会这样做的原因。

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.

Symfony 2已经进行了彻底的安全测试,这对任何真正的项目都至关重要。再加上长期支持不会涵盖您的项目生命周期这一事实,并且在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.

在sf 1.x工作了几年之后,我刚刚在SF2开始了我的第一个项目。有很多变化,但适应时间不会太长。