我应该使用Perl或PHP或其他什么东西来做这个项目吗?

时间:2022-10-19 22:05:04

I'm about to embark on a project that will need to:

我即将开始一个项目,需要:

  • Process XML
  • 处理XML
  • Heavy text parsing of non-xml documents
  • 非xml文档的大量文本解析
  • Insertion of data from xml and non-xml documents into a relational DB.
  • 将数据从xml和非xml文档插入到关系数据库中。
  • Present processed data to user from db using webpages.
  • 使用web页面向用户显示经过处理的数据。
  • Must handle load very well.
  • 必须处理好负载。

The website will be subject to short periods of very heavy loads to pages (300+ visitors a minute for several minutes), but most of the time will be idle (a dozen or so visitors a minute).

该网站将会在很短的时间内承载大量的页面(每分钟300+访客数分钟),但是大部分时间将会是空闲的(每分钟大约有12个访客)。

I have a very strong background in Java and web services, but I do not want to use Java for this project as I'd like to diversify my skill set.

我有很强的Java和web服务背景,但我不想在这个项目中使用Java,因为我想使我的技能集多样化。

I'm not looking for your opinion on which language you think is best. What are some pros and cons from using these languages that you might recognize from your own experiences?

我不是在寻找你认为最好的语言。使用这些你可能从自己的经验中认识到的语言有哪些优点和缺点?

13 个解决方案

#1


8  

Since I'm a PHP guy, here is what I can offer about PHP

因为我是一个PHP的人,这就是我能提供的关于PHP的东西。

So the requirements to a language from your question are met by PHP.

所以你的问题对语言的要求是由PHP满足的。

However, Perl, Python or Ruby or even ServerSide JavaScript (...) should all be capable of doing what you are asking for either. PHP has it's quirks, so do the other languages. If you are a Java Guy, you might like Ruby for it's syntax, but then again, only you can decide.

然而,Perl、Python或Ruby,甚至服务器端JavaScript(…)都应该能够完成您所要求的任何一种功能。PHP有它的怪癖,其他语言也是如此。如果您是Java人,您可能喜欢Ruby的语法,但同样,只有您可以决定。

#2


9  

I'd go with Perl. The LibXML series of modules gives a variety of interfaces (DOM, XPath, XSLT, etc.) backed by a fast C parser.

我去用Perl。LibXML系列模块提供了由快速C解析器支持的各种接口(DOM、XPath、XSLT等)。

Perl's regex support for slicing and dicing text is pretty much unmatched by any other language. If you expect to do lots of arbitrary text processing, and are at least a little familiar with regex, you will thank yourself.

Perl的正则表达式支持切片和切割文本,这是任何其他语言都无法比拟的。如果您希望进行大量任意的文本处理,并且至少对regex有点熟悉,您将感谢自己。

There are also a series of great web frameworks for Perl, including the simple but powerful Mojolicious framework, and the comprehensive Catalyst framework. There's always the ancient and stable CGI library, but Mojolicious or Catalyst would probably be better choices.

Perl还有一系列很棒的web框架,包括简单但功能强大的Mojolicious框架和全面的Catalyst框架。总是有古老而稳定的CGI库,但是Mojolicious或Catalyst可能是更好的选择。

#3


7  

Therefore, every single item on your list can be done using both languages. You should choose the one you believe will make you most productive taking into account your own strengths and weaknesses.

因此,列表中的每一项都可以使用两种语言完成。你应该选择你认为能让你最富有成效的方法,考虑到你自己的优点和缺点。

#4


5  

It is, indeed, very much a subjective question. I can totally conceive that in 2010, Perl or PHP (and even Python or Ruby) could equally serve you for such a project. The difference is not going to come from the language itself as much as the tools, best practices and community.

这的确是一个非常主观的问题。我完全可以想象,在2010年,Perl或PHP(甚至Python或Ruby)也可以为您提供这样的项目。区别不在于语言本身,而在于工具、最佳实践和社区。

Among these languages, I am most familiar with Perl, so let me try to offer an answer from that perspective, regarding your needs.

在这些语言中,我最熟悉Perl,因此让我尝试从这个角度给出一个关于您的需求的答案。

Text and XML parsing: Perl has very robust support for text parsing of even very long files (as long as you don't slurp), and allows powerful, clear and easy regex programming. It has clear built-in Unicode support and standard trans-encoding tools (the Encode module), which is very handy when it comes to user interfaces. It also has a direct binding for libxml2 in the form of a standard, fast and well-maintained module: XML::LibXML.

文本和XML解析:Perl对很长文件的文本解析提供了非常健壮的支持(只要您不发出声音),并且允许强大、清晰和容易的regex编程。它有明确的内置Unicode支持和标准的转换编码工具(Encode模块),这对于用户界面来说非常方便。它还以标准的、快速的、维护良好的模块的形式对libxml2进行了直接绑定:XML::LibXML。

Relational DB Support: In addition to the standard database interface (DBI) which allows direct SQL queries to a number of DBMSes, there are a number of frameworks to make DB-to-Webdoc management easier while still powerful. The most famous probably being Catalyst.

关系DB支持:除了标准数据库接口(DBI)允许对多个dbms进行直接的SQL查询之外,还有许多框架可以使DB-to- webdoc管理更容易,但仍然功能强大。最有名的可能是催化剂。

HTML Document presentation: Mason is my favorite web application delivery engine. The integration with Perl is so elegant, yet it does not sacrifice templating patterns or language features.

HTML文档表示:Mason是我最喜欢的web应用程序交付引擎。与Perl的集成非常优雅,但是它不牺牲模板模式或语言特性。

Heavy load handling: There are as many solutions as there are load problems to solve. Perl offers bindings for memcached: Cache::Memcached (written in Perl) and Cache::Memcached::Fast (written in C).

重载处理:有多少解决方案就有多少解决方案。Perl为memcached: Cache:: memcached(用Perl编写)和Cache:::: memcached: Fast(用C编写)提供了绑定。

Balance that out with your personal preferences regarding syntax and general language philosophy, and you could very much join the Enlightened Perl community quite soon :)

在语法和通用语言哲学方面的个人偏好之间取得平衡,您很快就可以加入开明的Perl社区:)

#5


4  

As it appears the bulk of your work will be processing data more than presentation, in my opinion this is what Perl does best. Perl does perform very well with regular expressions and the vast array of modules on CPAN can help you parse commonplace formats. There are also a good few frameworks in Perl that will make life easier in the presentation of the data. The major disadvantage for a newcomer, is with the tens of distributions on CPAN for each of the various problems you may encounter (XML parsing, web framework, ORM etc), it can be hard to make decisions as to which one to use. Thanks to Plack/PSGI, talking to webservers with Perl in recent times has gotten much, much better.

看起来您的大部分工作将处理数据而不是表示,在我看来,这是Perl最擅长的。Perl对正则表达式的性能非常好,CPAN上的大量模块可以帮助您解析常见的格式。在Perl中,也有一些框架可以简化数据的表示。对于新手来说,最大的缺点是CPAN上有几十个发行版,可以解决您可能遇到的各种问题(XML解析、web框架、ORM等),因此很难决定使用哪个发行版。多亏了Plack/PSGI,在最近的时间里,用Perl与webserver进行对话已经变得非常好了。

It's important that "load" is a problem that is completely language agnostic, so it is not what language you choose, it is how you engineer your system that will determine how well it handles increased load. Perl, Java, PHP have all been used in small setups all the way through to some of the most heavily trafficked websites on the net. If growth is on your future needs, decouple where appropriate and design for future expansion first. Multiple database servers, caching, message/work queues can be used in the small scale, and putting them in when things are small is easier than having to rewrite or quickly hack them in when demand for more resources is needed.

“load”是一个完全与语言无关的问题,这一点很重要,因此,重要的不是您选择什么语言,而是您如何设计您的系统,从而决定它如何处理增加的负载。Perl, Java, PHP都在小的设置中一直使用到网络上最繁忙的网站。如果增长是基于你的未来需求,那么在适当的时候将其与未来的扩展相分离。多个数据库服务器、缓存、消息/工作队列可以在小范围内使用,在事情比较小的时候将它们放入,比在需要更多资源的时候重写或快速地修改它们要容易得多。

#6


1  

Your architecture and algorithms will have more impact on speed and scalability than choice of language.

与语言的选择相比,您的体系结构和算法对速度和可伸缩性的影响更大。

Perl, PHP or Java will all do the job.

Perl、PHP或Java都将完成这项工作。

I'd do this in Perl since I know it well and prefer it to PHP (which I also know well). YOur mileage will vary.

我想用Perl来实现这一点,因为我很了解它,而且我更喜欢它而不是PHP(我也很了解PHP)。你的情况会不同。

#7


0  

As far as I'm aware, PHP's regex (which I would assume is what you'll use) PCRE library came from Perl. So if you have a lot of non-XML parsing then you need to test both and see which one runs faster. I'm not sure which one is faster for you neededs.

就我所知,PHP的regex(我假设您将使用它)PCRE库来自Perl。所以如果你有很多非xml解析,那么你需要同时测试这两个,看看哪一个运行得更快。我不知道你需要哪个更快。

They both handle XML well (finally).

它们都能很好地处理XML(最后)。

However, PHP is just a massive community. There is no other scripting language on the planet as large. So if that matters to you then use PHP since you can find everything under-the-sun about it.

然而,PHP只是一个庞大的社区。在这个星球上,没有任何一种脚本语言能有如此之大。如果这对你很重要,那就使用PHP,因为你可以找到它的所有秘密。

However, Perl also has a large following and I'm sure there are plenty of tutorials for everything you would want to do.

然而,Perl也有大量的追随者,我相信对于您想要做的每件事都有很多教程。

Python is also a language you might want to look into. Heck, since everyone realized Ruby was God's gift to the world it has exploded too! You can honstly do what you want in any language so you need to look at the syntax of each of them and figure out which one you like best. From there you can run a simple example benchmark in each one to see which language is the fastest for you neededs.

Python也是一种您可能想要研究的语言。见鬼,既然每个人都意识到Ruby是上帝给世界的礼物,它也爆炸了!你可以用任何语言来做你想做的事情,所以你需要看每一种语言的语法,并找出你最喜欢哪一种。在这里,您可以运行一个简单的示例基准,以查看哪些语言是您需要的最快的语言。

Whatever you do - don't use a "framework" like wordpress or drupal. They are CMS's not frameworks and are so slow and bloated. Wordpress takes 8MB just to load the index page!

无论你做什么——不要使用像wordpress或drupal这样的“框架”。它们是CMS的框架,并且非常缓慢和臃肿。Wordpress需要8MB才能加载索引页面!

We had a PHP project and a Guy from Java joined us and was up and running in a week or two once he got the hang of everthing.

我们有一个PHP项目,一个来自Java的家伙加入了我们,他在一两周内就开始运行了。

#8


0  

Why don't you try Ruby on Rails?

为什么不试试Ruby on Rails呢?

Coming back to your question i would say PHP. Since you need to learn something new and at the same time you should have a great community where you can find support.

回到你的问题,我要说PHP。因为你需要学习新的东西,同时你应该有一个很棒的社区,你可以在那里找到支持。

PHP does all what you have requested.

PHP完成您所要求的一切。

#9


0  

All mentioned languages should be usable for your purpose. But as far as I know PHP could be a little bit tricky regarding UTF8 strings (e.g. getting the right string length for UTF8 character which consists of multiple bytes). But I'm sure some guys will provide good solutions for PHP via comments soon :-)

所有提到的语言都应该适用于您的目的。但就我所知,对于UTF8字符串,PHP可能有点棘手(例如,为UTF8字符获取正确的字符串长度,它包含多个字节)。但是我相信一些人很快会通过评论为PHP提供好的解决方案:-)

My personal favorite is Ruby. As it provides for all your needs really easy and powerful APIs (so called gems).

我个人最喜欢的是Ruby。因为它提供了所有您需要的真正简单和强大的api(所谓的gems)。

#10


0  

I would use Common Lisp.

我将使用通用Lisp。

  • Closure XML for parsing XML
  • 用于解析XML的闭包XML
  • cl-ppcre is a perl-compatible regular expression library, but depending on what kind of text you want to parse, you can perhaps find specialized parsers at the Common Lisp Directory.
  • cl-ppcre是一个与perl兼容的正则表达式库,但是根据您想要解析的文本类型,您可能可以在公共Lisp目录中找到专门的解析器。
  • I don't know what database you want to use, but Postmodern is very nice for Postgres. There is also the more generic CLSQL.
  • 我不知道您想要使用什么数据库,但是Postmodern对Postgres非常好。还有更通用的CLSQL。
  • You can use Hunchentoot as a webserver and, e.g., CL-WHO to produce HTML pages. 5 pages per second should be no problem.
  • 您可以使用Hunchentoot作为web服务器,例如,clwho来生成HTML页面。每秒5页应该没问题。

#11


0  

Use Perl, if you have experience with neither and your goal is to make yourself more marketable.

如果您对两者都没有经验,并且您的目标是使您自己更有市场价值,那么请使用Perl。

It's much easier to fake PHP experience if you need to defend both entries in your 'professional experience' section.

如果您需要在“专业体验”一节中同时保护这两个条目,那么伪造PHP体验要容易得多。

#12


-1  

Depending on your needs you may want to consider a framework that already supports caching, Drupal is one example but there are many others. Most frameworks are extensible so you can add plugins to handle all the parsing and presentation.

根据您的需要,您可能需要考虑一个已经支持缓存的框架,Drupal就是一个例子,但是还有很多其他的例子。大多数框架都是可扩展的,所以您可以添加插件来处理所有的解析和表示。

I think language is less important than the framework you choose. I would personally choose PHP over Perl, because I think it is more applicable in the real world. Python is another beautiful scripting language, but php has the most traction in the web world. If you goal is to make your skill set more marketable, go with PHP.

我认为语言没有你选择的框架重要。我个人会选择PHP而不是Perl,因为我认为PHP在现实世界中更适用。Python是另一种漂亮的脚本语言,但是php在web世界中是最受欢迎的。如果您的目标是使您的技能集更有市场价值,请使用PHP。

#13


-4  

Ok, so everyone is been subjective in their answers I'll add mine too.

好,每个人的回答都是主观的,我也要加上我的。

Use Java, the core supports all you need (no frameworks needed), its free, OS and its 2 to 3 times faster than Perl - PHP.

使用Java,核心支持所有您需要的(不需要框架),它的免费操作系统和它比Perl - PHP快2到3倍。

Seriously... PHP is designed for Web projects, its easy, and support all you need to do (try Zend framework), it has a decent learning curve (Java is harder to learn), there is a huge community of developers out there to help you if you run into something unexpected (bigger than Pearl's and Java's). On performance, its a little slower than pearl (im talking about plain'old PHP scripts, no wierd-vodoo optimizations) but its enough for what you probably need.

认真……PHP是设计用于Web项目,其容易,并支持所有您需要做的(尝试Zend framework),它有一个不错的学习曲线(Java更难学习),那里是一个巨大的开发者社区,帮助你如果你遇到一些意想不到的(比珍珠和Java)。在性能上,它比pearl慢一点(我说的是普通的“旧的PHP脚本,没有大范围的伏都优化),但是它足够满足您可能需要的。

In the end I'm pretty sure you will get a smaller-consistent app if you use PHP ( and if follow all the coding and design best practices) than you will ever get using Perl.

最后,我很确定如果您使用PHP(如果遵循所有的编码和设计最佳实践),您将得到一个更小的应用程序,而不是使用Perl。

(Java is way better... but I don't want to be verbally lynched by some PHP zealot)

(Java是更好…但是我不想被一些PHP*者口头上私刑)

#1


8  

Since I'm a PHP guy, here is what I can offer about PHP

因为我是一个PHP的人,这就是我能提供的关于PHP的东西。

So the requirements to a language from your question are met by PHP.

所以你的问题对语言的要求是由PHP满足的。

However, Perl, Python or Ruby or even ServerSide JavaScript (...) should all be capable of doing what you are asking for either. PHP has it's quirks, so do the other languages. If you are a Java Guy, you might like Ruby for it's syntax, but then again, only you can decide.

然而,Perl、Python或Ruby,甚至服务器端JavaScript(…)都应该能够完成您所要求的任何一种功能。PHP有它的怪癖,其他语言也是如此。如果您是Java人,您可能喜欢Ruby的语法,但同样,只有您可以决定。

#2


9  

I'd go with Perl. The LibXML series of modules gives a variety of interfaces (DOM, XPath, XSLT, etc.) backed by a fast C parser.

我去用Perl。LibXML系列模块提供了由快速C解析器支持的各种接口(DOM、XPath、XSLT等)。

Perl's regex support for slicing and dicing text is pretty much unmatched by any other language. If you expect to do lots of arbitrary text processing, and are at least a little familiar with regex, you will thank yourself.

Perl的正则表达式支持切片和切割文本,这是任何其他语言都无法比拟的。如果您希望进行大量任意的文本处理,并且至少对regex有点熟悉,您将感谢自己。

There are also a series of great web frameworks for Perl, including the simple but powerful Mojolicious framework, and the comprehensive Catalyst framework. There's always the ancient and stable CGI library, but Mojolicious or Catalyst would probably be better choices.

Perl还有一系列很棒的web框架,包括简单但功能强大的Mojolicious框架和全面的Catalyst框架。总是有古老而稳定的CGI库,但是Mojolicious或Catalyst可能是更好的选择。

#3


7  

Therefore, every single item on your list can be done using both languages. You should choose the one you believe will make you most productive taking into account your own strengths and weaknesses.

因此,列表中的每一项都可以使用两种语言完成。你应该选择你认为能让你最富有成效的方法,考虑到你自己的优点和缺点。

#4


5  

It is, indeed, very much a subjective question. I can totally conceive that in 2010, Perl or PHP (and even Python or Ruby) could equally serve you for such a project. The difference is not going to come from the language itself as much as the tools, best practices and community.

这的确是一个非常主观的问题。我完全可以想象,在2010年,Perl或PHP(甚至Python或Ruby)也可以为您提供这样的项目。区别不在于语言本身,而在于工具、最佳实践和社区。

Among these languages, I am most familiar with Perl, so let me try to offer an answer from that perspective, regarding your needs.

在这些语言中,我最熟悉Perl,因此让我尝试从这个角度给出一个关于您的需求的答案。

Text and XML parsing: Perl has very robust support for text parsing of even very long files (as long as you don't slurp), and allows powerful, clear and easy regex programming. It has clear built-in Unicode support and standard trans-encoding tools (the Encode module), which is very handy when it comes to user interfaces. It also has a direct binding for libxml2 in the form of a standard, fast and well-maintained module: XML::LibXML.

文本和XML解析:Perl对很长文件的文本解析提供了非常健壮的支持(只要您不发出声音),并且允许强大、清晰和容易的regex编程。它有明确的内置Unicode支持和标准的转换编码工具(Encode模块),这对于用户界面来说非常方便。它还以标准的、快速的、维护良好的模块的形式对libxml2进行了直接绑定:XML::LibXML。

Relational DB Support: In addition to the standard database interface (DBI) which allows direct SQL queries to a number of DBMSes, there are a number of frameworks to make DB-to-Webdoc management easier while still powerful. The most famous probably being Catalyst.

关系DB支持:除了标准数据库接口(DBI)允许对多个dbms进行直接的SQL查询之外,还有许多框架可以使DB-to- webdoc管理更容易,但仍然功能强大。最有名的可能是催化剂。

HTML Document presentation: Mason is my favorite web application delivery engine. The integration with Perl is so elegant, yet it does not sacrifice templating patterns or language features.

HTML文档表示:Mason是我最喜欢的web应用程序交付引擎。与Perl的集成非常优雅,但是它不牺牲模板模式或语言特性。

Heavy load handling: There are as many solutions as there are load problems to solve. Perl offers bindings for memcached: Cache::Memcached (written in Perl) and Cache::Memcached::Fast (written in C).

重载处理:有多少解决方案就有多少解决方案。Perl为memcached: Cache:: memcached(用Perl编写)和Cache:::: memcached: Fast(用C编写)提供了绑定。

Balance that out with your personal preferences regarding syntax and general language philosophy, and you could very much join the Enlightened Perl community quite soon :)

在语法和通用语言哲学方面的个人偏好之间取得平衡,您很快就可以加入开明的Perl社区:)

#5


4  

As it appears the bulk of your work will be processing data more than presentation, in my opinion this is what Perl does best. Perl does perform very well with regular expressions and the vast array of modules on CPAN can help you parse commonplace formats. There are also a good few frameworks in Perl that will make life easier in the presentation of the data. The major disadvantage for a newcomer, is with the tens of distributions on CPAN for each of the various problems you may encounter (XML parsing, web framework, ORM etc), it can be hard to make decisions as to which one to use. Thanks to Plack/PSGI, talking to webservers with Perl in recent times has gotten much, much better.

看起来您的大部分工作将处理数据而不是表示,在我看来,这是Perl最擅长的。Perl对正则表达式的性能非常好,CPAN上的大量模块可以帮助您解析常见的格式。在Perl中,也有一些框架可以简化数据的表示。对于新手来说,最大的缺点是CPAN上有几十个发行版,可以解决您可能遇到的各种问题(XML解析、web框架、ORM等),因此很难决定使用哪个发行版。多亏了Plack/PSGI,在最近的时间里,用Perl与webserver进行对话已经变得非常好了。

It's important that "load" is a problem that is completely language agnostic, so it is not what language you choose, it is how you engineer your system that will determine how well it handles increased load. Perl, Java, PHP have all been used in small setups all the way through to some of the most heavily trafficked websites on the net. If growth is on your future needs, decouple where appropriate and design for future expansion first. Multiple database servers, caching, message/work queues can be used in the small scale, and putting them in when things are small is easier than having to rewrite or quickly hack them in when demand for more resources is needed.

“load”是一个完全与语言无关的问题,这一点很重要,因此,重要的不是您选择什么语言,而是您如何设计您的系统,从而决定它如何处理增加的负载。Perl, Java, PHP都在小的设置中一直使用到网络上最繁忙的网站。如果增长是基于你的未来需求,那么在适当的时候将其与未来的扩展相分离。多个数据库服务器、缓存、消息/工作队列可以在小范围内使用,在事情比较小的时候将它们放入,比在需要更多资源的时候重写或快速地修改它们要容易得多。

#6


1  

Your architecture and algorithms will have more impact on speed and scalability than choice of language.

与语言的选择相比,您的体系结构和算法对速度和可伸缩性的影响更大。

Perl, PHP or Java will all do the job.

Perl、PHP或Java都将完成这项工作。

I'd do this in Perl since I know it well and prefer it to PHP (which I also know well). YOur mileage will vary.

我想用Perl来实现这一点,因为我很了解它,而且我更喜欢它而不是PHP(我也很了解PHP)。你的情况会不同。

#7


0  

As far as I'm aware, PHP's regex (which I would assume is what you'll use) PCRE library came from Perl. So if you have a lot of non-XML parsing then you need to test both and see which one runs faster. I'm not sure which one is faster for you neededs.

就我所知,PHP的regex(我假设您将使用它)PCRE库来自Perl。所以如果你有很多非xml解析,那么你需要同时测试这两个,看看哪一个运行得更快。我不知道你需要哪个更快。

They both handle XML well (finally).

它们都能很好地处理XML(最后)。

However, PHP is just a massive community. There is no other scripting language on the planet as large. So if that matters to you then use PHP since you can find everything under-the-sun about it.

然而,PHP只是一个庞大的社区。在这个星球上,没有任何一种脚本语言能有如此之大。如果这对你很重要,那就使用PHP,因为你可以找到它的所有秘密。

However, Perl also has a large following and I'm sure there are plenty of tutorials for everything you would want to do.

然而,Perl也有大量的追随者,我相信对于您想要做的每件事都有很多教程。

Python is also a language you might want to look into. Heck, since everyone realized Ruby was God's gift to the world it has exploded too! You can honstly do what you want in any language so you need to look at the syntax of each of them and figure out which one you like best. From there you can run a simple example benchmark in each one to see which language is the fastest for you neededs.

Python也是一种您可能想要研究的语言。见鬼,既然每个人都意识到Ruby是上帝给世界的礼物,它也爆炸了!你可以用任何语言来做你想做的事情,所以你需要看每一种语言的语法,并找出你最喜欢哪一种。在这里,您可以运行一个简单的示例基准,以查看哪些语言是您需要的最快的语言。

Whatever you do - don't use a "framework" like wordpress or drupal. They are CMS's not frameworks and are so slow and bloated. Wordpress takes 8MB just to load the index page!

无论你做什么——不要使用像wordpress或drupal这样的“框架”。它们是CMS的框架,并且非常缓慢和臃肿。Wordpress需要8MB才能加载索引页面!

We had a PHP project and a Guy from Java joined us and was up and running in a week or two once he got the hang of everthing.

我们有一个PHP项目,一个来自Java的家伙加入了我们,他在一两周内就开始运行了。

#8


0  

Why don't you try Ruby on Rails?

为什么不试试Ruby on Rails呢?

Coming back to your question i would say PHP. Since you need to learn something new and at the same time you should have a great community where you can find support.

回到你的问题,我要说PHP。因为你需要学习新的东西,同时你应该有一个很棒的社区,你可以在那里找到支持。

PHP does all what you have requested.

PHP完成您所要求的一切。

#9


0  

All mentioned languages should be usable for your purpose. But as far as I know PHP could be a little bit tricky regarding UTF8 strings (e.g. getting the right string length for UTF8 character which consists of multiple bytes). But I'm sure some guys will provide good solutions for PHP via comments soon :-)

所有提到的语言都应该适用于您的目的。但就我所知,对于UTF8字符串,PHP可能有点棘手(例如,为UTF8字符获取正确的字符串长度,它包含多个字节)。但是我相信一些人很快会通过评论为PHP提供好的解决方案:-)

My personal favorite is Ruby. As it provides for all your needs really easy and powerful APIs (so called gems).

我个人最喜欢的是Ruby。因为它提供了所有您需要的真正简单和强大的api(所谓的gems)。

#10


0  

I would use Common Lisp.

我将使用通用Lisp。

  • Closure XML for parsing XML
  • 用于解析XML的闭包XML
  • cl-ppcre is a perl-compatible regular expression library, but depending on what kind of text you want to parse, you can perhaps find specialized parsers at the Common Lisp Directory.
  • cl-ppcre是一个与perl兼容的正则表达式库,但是根据您想要解析的文本类型,您可能可以在公共Lisp目录中找到专门的解析器。
  • I don't know what database you want to use, but Postmodern is very nice for Postgres. There is also the more generic CLSQL.
  • 我不知道您想要使用什么数据库,但是Postmodern对Postgres非常好。还有更通用的CLSQL。
  • You can use Hunchentoot as a webserver and, e.g., CL-WHO to produce HTML pages. 5 pages per second should be no problem.
  • 您可以使用Hunchentoot作为web服务器,例如,clwho来生成HTML页面。每秒5页应该没问题。

#11


0  

Use Perl, if you have experience with neither and your goal is to make yourself more marketable.

如果您对两者都没有经验,并且您的目标是使您自己更有市场价值,那么请使用Perl。

It's much easier to fake PHP experience if you need to defend both entries in your 'professional experience' section.

如果您需要在“专业体验”一节中同时保护这两个条目,那么伪造PHP体验要容易得多。

#12


-1  

Depending on your needs you may want to consider a framework that already supports caching, Drupal is one example but there are many others. Most frameworks are extensible so you can add plugins to handle all the parsing and presentation.

根据您的需要,您可能需要考虑一个已经支持缓存的框架,Drupal就是一个例子,但是还有很多其他的例子。大多数框架都是可扩展的,所以您可以添加插件来处理所有的解析和表示。

I think language is less important than the framework you choose. I would personally choose PHP over Perl, because I think it is more applicable in the real world. Python is another beautiful scripting language, but php has the most traction in the web world. If you goal is to make your skill set more marketable, go with PHP.

我认为语言没有你选择的框架重要。我个人会选择PHP而不是Perl,因为我认为PHP在现实世界中更适用。Python是另一种漂亮的脚本语言,但是php在web世界中是最受欢迎的。如果您的目标是使您的技能集更有市场价值,请使用PHP。

#13


-4  

Ok, so everyone is been subjective in their answers I'll add mine too.

好,每个人的回答都是主观的,我也要加上我的。

Use Java, the core supports all you need (no frameworks needed), its free, OS and its 2 to 3 times faster than Perl - PHP.

使用Java,核心支持所有您需要的(不需要框架),它的免费操作系统和它比Perl - PHP快2到3倍。

Seriously... PHP is designed for Web projects, its easy, and support all you need to do (try Zend framework), it has a decent learning curve (Java is harder to learn), there is a huge community of developers out there to help you if you run into something unexpected (bigger than Pearl's and Java's). On performance, its a little slower than pearl (im talking about plain'old PHP scripts, no wierd-vodoo optimizations) but its enough for what you probably need.

认真……PHP是设计用于Web项目,其容易,并支持所有您需要做的(尝试Zend framework),它有一个不错的学习曲线(Java更难学习),那里是一个巨大的开发者社区,帮助你如果你遇到一些意想不到的(比珍珠和Java)。在性能上,它比pearl慢一点(我说的是普通的“旧的PHP脚本,没有大范围的伏都优化),但是它足够满足您可能需要的。

In the end I'm pretty sure you will get a smaller-consistent app if you use PHP ( and if follow all the coding and design best practices) than you will ever get using Perl.

最后,我很确定如果您使用PHP(如果遵循所有的编码和设计最佳实践),您将得到一个更小的应用程序,而不是使用Perl。

(Java is way better... but I don't want to be verbally lynched by some PHP zealot)

(Java是更好…但是我不想被一些PHP*者口头上私刑)