简体   繁体   English

有CodeIgniter的PHP可以做什么,Ruby on Rails 3不能做什么?

[英]Is there anything that PHP with CodeIgniter can do, which Ruby on Rails 3 can't do?

I and my partner are trying to develop a website, and we are arguing which language to use to build a website. 我和我的合作伙伴正在尝试开发一个网站,我们正在争论使用哪种语言来构建网站。 We both have some experienced with PHP with Codeigniter 1.6++ as well as RoR, although my partner used rails when it was in RoR1, which now is RoR3. 我们都有一些经验丰富的PHP与Codeigniter 1.6 ++以及RoR,虽然我的合作伙伴在RoR1中使用rails,现在是RoR3。

He wants to use PHP with CodeIgniter because he knows whats going around more explicitly, while RoR does not seem to satisfy him. 他希望将PHP与CodeIgniter一起使用,因为他知道什么是更明确的,而RoR似乎并不满足他。

I want to use RoR 3, because it takes less time, and there are many gems which I can use (devise for example). 我想使用RoR 3,因为它花费的时间更少,并且我可以使用许多宝石(例如设计)。

He is kind of worrying that Ruby on Rails won't be easy to change some configuration in db or codes once the websites gets bigger and bigger. 他有点担心,一旦网站变得越来越大,Ruby on Rails就不容易改变数据库或代码中的某些配置。

I just hate to think about writing lines and lines of codes from the scratch with Codeigniter within 2 months.. although I think it was not easy to manage db tables, once things got settled in rails.. 我只是讨厌在2个月内用Codeigniter从头开始编写代码行和代码行。虽然我认为管理数据库表并不容易,但一旦事情在rails中得到解决。

So, I have been wondering.. is there any big advantage one from the other? 所以,我一直在想..另一个有什么大的优势吗?

As an avid user of both I would not say that this is a question of which framework is better or worse as they are apples and oranges. 作为两者的狂热用户,我不会说这是一个问题,哪个框架更好或更差,因为它们是苹果和橘子。

CodeIgniter has not changed all that much since 1.6.x both of your experience is still valid and you will be able to code right from the get-go. CodeIgniter自1.6.x以来没有发生太大变化,你的经验仍然有效,你可以从一开始就编码。

Rails 3 is wonderful but quite a lot has changed since Rails 1 (not that I was using it back then). Rails 3很精彩,但自Rails 1以来发生了很多变化(不是我当时使用它)。 I think your partner would have too much time scratching his head unless you are going to be there for him to constantly answer the WTF's that will inevitably come up. 我认为你的伴侣会有太多时间挠头,除非你打算在那里让他不断回答不可避免地会出现的WTF。

To explain, I am a CodeIgniter man and have been for years. 为了解释,我是CodeIgniter的男人并且已经多年了。 There is not much to it, no conventions and what code is there is simple, easy to extend and easy to ignore if you don't like it. 没有多少,没有约定,什么代码是简单的,易于扩展,如果你不喜欢它容易被忽略。

Recently starting working with Rails has been a great series of highs and lows but it's not always quicker. 最近开始使用Rails已经是一系列的高点和低点但它并不总是更快。 I spent 2 hours implementing a fully functional user system with fb, twitter, etc and had most of my controllers built, but since then I have spent hours trying to get various date formats to play nicely with the ActiveRecord, or trying to override create_at, manually set id's and all the other stuff that nobody ever mentions you are not allowed to do. 我花了2个小时实现了一个功能齐全的用户系统,包括fb,twitter等,并且我的大多数控制器已经构建完成,但从那以后我花了好几个小时试图让各种日期格式与ActiveRecord很好地配合,或者试图覆盖create_at,手动设置id和所有其他没人提到你的东西是不允许的。

If you need to pump out some code fast then Rails might be an option. 如果你需要快速抽出一些代码,那么Rails可能是一个选择。 If you want fine grained control over everything and have a really lightweight base to build your application on then CodeIgniter really would be a better choice. 如果你想要对所有内容进行细粒度的控制并拥有一个非常轻量级的基础来构建你的应用程序,那么CodeIgniter确实是一个更好的选择。

Or, look at FuelPHP which is a framework me and a few others are working on to combine the two into one Configuration over Convention framework with a command line utility to bring in some of Rails best features. 或者,看看FuelPHP这是一个框架我和其他一些人正在努力将两者合并为一个Configuration over Convention框架,并使用命令行实用程序来引入一些Rails最佳功能。 Saves a fair bit of code and you'll feel right at home. 保存了相当多的代码,让您感觉宾至如归。

You can make most languages do most things at the end of the day, just a matter of how long it'll take you. 你可以让大多数语言在一天结束时完成大部分工作,只需花费多长时间即可完成。

Hopefully you know your project well enough to know what the major stumbling blocks are liable to be and then match them against your combined knowledge to solve them within both languages. 希望你能够很好地了解你的项目,知道主要障碍是什么,然后将它们与你的综合知识相匹配,以便在两种语言中解决它们。 Which ever you both feel more comfortable with overall should win. 你们两个都觉得整体应该更加舒服。 You will be able to do it in either, just a matter of familiarity and confidence with the language (as well as availability of libraries for complex tasks). 您可以在任何一种情况下完成,只需熟悉语言和对语言的信心(以及复杂任务的库的可用性)。

Incidentally, this question would be better on https://softwareengineering.stackexchange.com/ 顺便提一下,这个问题在https://softwareengineering.stackexchange.com/上会更好

From a management perspective, I can tell you that if you plan on growing in the future, you will pay twice as much and have to look twice as long for RoR programmers. 从管理的角度来看,我可以告诉你,如果你计划在未来发展,你将支付两倍的费用,而且对于RoR程序员来说,你需要花费两倍的时间。 PHP programmers on the other hand are easy to find and hire since the language is ubiquitous. 另一方面,PHP程序员很容易找到和雇用,因为语言无处不在。 I have known of companies that were bought and their product completely folded just to recruit the Ruby talent because it is so hard to find. 我知道有些公司被购买并且他们的产品完全折叠起来只是为了招募Ruby人才,因为它很难找到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM