简体   繁体   English

从asp.net到python / ruby​​ / php

[英]From asp.net to python/ruby/php

I've done a lot of web development in JSP/JSF, and lately quite a lot in ASP.NET. 我已经在JSP / JSF中完成了很多Web开发,最近在ASP.NET中也做了很多。
I would like to learn one of the following: ruby/python/php, for quick and simple projects. 我想学习以下内容之一:ruby / python / php,用于快速简单的项目。
I don't really care which one it is as long as it meets following demands: 只要满足以下要求,我就不在乎它是哪一个:
- decent IDE (forget the notepad/pspad etc.), something with code completition (like eclipse/visual studio/netbeans) -体面的IDE(忘记记事本/ pspad等),具有代码完成功能(例如eclipse / visual studio / netbeans)
- it has to be able to run on windows (IDE and environment) -它必须能够在Windows(IDE和环境)上运行

Thanks for suggestions 感谢您的建议

Cheers 干杯

If you are willing to learn a MVC framework, I would recommend Python/ Django and PyCharm . 如果您愿意学习MVC框架,我建议您使用Python / DjangoPyCharm Rationale: 理由:

  • Python is easy to pick up; Python很容易上手; it is closer to pseudocode than anything (don't be annoyed by the 'indentation as block delimiter' thing, after some time you will find it a great idea). 它比伪代码更接近于伪代码(不要被“缩进作为块分隔符”之类的东西所困扰,一段时间后您会发现它是个好主意)。
  • Django has very nice ideas - the instant CRUD of Django admin is killer. Django有很好的主意-Django管理员的即时CRUD是杀手.。
  • PyCharm is not very expensive, has a 30 day full working trial and is cross-platform PyCharm并不是很昂贵,具有30天的完整工作试用版,并且是跨平台的

The Django setup for Windows is a bit annoying because every tutorial seems to pretend you are running some Unix flavor; Windows的Django设置有点烦人,因为每个教程似乎都在假装您运行的是Unix风格。 sometimes you have to use the command line, and Windows CLI support is half-baked (if you are on Windows, get a decent terminal and install some Windows native GNU tools ). 有时,您必须使用命令行,并且对Windows CLI的支持是半熟的(如果您使用的是Windows, 请安装 一个不错的终端安装一些Windows本机GNU工具 )。 Don't be scared of command line, look for windows specific instructions and don't lose heart - setup is only once. 不要害怕命令行,寻找Windows特定的说明,也不要灰心-安装仅一次。

After setup, the learning curve is smooth, just follow along the Django tutorial. 设置完成后,学习曲线将变得平滑,只需遵循Django教程即可。 I assure you an enlightening experience that will change the way you program in other languages. 我向您保证会带来启发性的体验,它将改变您使用其他语言进行编程的方式。

About the other dynamic languages: 关于其他动态语言:

  • PHP : it is ubiquitous (even the cheapest hosting offers includes PHP support) and easy to get you started. PHP :它无处不在(即使最便宜的托管服务也包括PHP支持),并且易于入门。 If you want to learn something in order to improve your chance of getting a job, go for PHP. 如果您想学习一些东西以增加获得工作的机会,请使用PHP。 But will it make you a better programmer? 但这会使您成为更好的程序员吗? I don't think so. 我不这么认为。 As a language it is slowly evolving from a nice hack to a serious language, but still has a lot of dark corners (my pet peeve is how automatic typecasting is implemented). 作为一种语言,它正从一种不错的技巧逐渐发展成为一种严肃的语言,但是仍然存在很多黑暗的角落(我的宠儿是实现自动类型转换的方式)。
  • Ruby : it is very similar to Python, perhaps even more expressive (too much for my taste: like Perl, it encourages a very personal style and while I love Perl, I have a hard time understanding even my own scripts after a few weeks). Ruby :它与Python非常相似,也许更具表现力(就我的口味而言,太多了:像Perl一样,它鼓励了非常个性化的风格,尽管我喜欢Perl,但几周后我什至很难理解自己的脚本) 。 IMHO, Python code is easier to maintain in the long term, specially when larger teams are involved. 恕我直言,从长远来看,Python代码更易于维护,特别是在涉及较大的团队时。 Rails is worth a try. Rails值得一试。 I've flirted with Rails but ended up picking Django, perhaps you experience will be distinct. 我喜欢Rails,但最终选择了Django,也许您的体验会与众不同。

Comparing Ruby on Rails to PHP is unfair. 将Ruby on Rails与PHP进行比较是不公平的。 PHP is simply a programming language. PHP只是一种编程语言。 However, it is an extremely flexible and useful language. 但是,它是一种非常灵活和有用的语言。 PHP uses very little memory and performs quite well. PHP使用很少的内存,并且运行良好。 It is also a mature language with a wide variety of extensions and library modules. 它也是一种成熟的语言,具有多种扩展和库模块。 Originally developed as a scripting language to be used in HTML pages, PHP has gradually matured and now includes full object oriented features. PHP最初是作为一种可在HTML页面中使用的脚本语言而开发的,但它已经逐渐成熟,现在包括了完整的面向对象功能。 The later add-on of object oriented features is one of the biggest criticisms of PHP. 后来的面向对象功能附加组件是PHP的最大批评之一。 Some programmers feel that PHP encourages sloppy coding because of its script-like roots and lack of a clear object oriented strategy from the beginning. 一些程序员认为PHP鼓励草率的编码,因为它像脚本一样的根源,并且从一开始就缺乏明确的面向对象的策略。

See http://www.learncomputer.com/php-vs-ruby-on-rails/ 参见http://www.learncomputer.com/php-vs-ruby-on-rails/

I have had the most luck with PHP so far because it is so widely used and there is tons of information about it. 到目前为止,我最幸运的是使用PHP,因为它是如此广泛地使用,并且有大量有关它的信息。 There are people that will rant and rave about Ruby-on-Rails. 有些人会对Ruby-on-Rails感到愤怒和赞叹。 It is supposedly great for deploying applications quickly.(it has plenty of good resources too). 据说它非常适合快速部署应用程序。(它也有很多很好的资源)。 PHP isn't the cleanest language and has a lot of issues, but it is pretty easy to work with in my opinion. PHP不是最干净的语言,并且有很多问题,但是在我看来,使用它非常容易。 The latest versions of PHP support both procedural and object-oriented approaches. 最新版本的PHP支持过程和面向对象的方法。

PHP and use codecanyon.net to get things up and running quick. PHP,并使用codecanyon.net快速启动并运行。 I got INRtracker.com running in under 2 months with what I just mentioned. 我刚刚提到的内容在不到两个月的时间内运行了INRtracker.com。

If you're going to use php, then get wamp and then after you install it, restart your computer. 如果要使用php,请安装wamp,然后在安装后重新启动计算机。 Then click on the Wampserver short cut on your desktop to start it up and then click on the icon in the bottom right of your desktop (you might have to click a little arrow) and then click start all services, then you can put php files in your wamp/www folder (you should be able to get to that from your C drive). 然后单击桌面上的Wampserver快捷方式启动它,然后单击桌面右下角的图标(您可能需要单击一个小箭头),然后单击启动所​​有服务,然后可以放置php文件在您的wamp / www文件夹中(您应该可以从C驱动器中获取该文件)。 Then you test them by going to http://localhost/filename.php in your browser. 然后,通过在浏览器中转到http://localhost/filename.php进行测试。 Have fun dude! 玩得开心!

Ruby on Rails works on Windows (although I would recommend at least having Linux as a virtual machine for any of the three languages), and it has several decent IDE's (I personally used NetBeans, available for Windows too). Ruby on Rails可以在Windows上运行(尽管我建议至少使用Linux作为三种语言中的任何一种的虚拟机),并且它具有几个不错的IDE (我个人使用过NetBeans,也可用于Windows)。 But as I already mentioned in the comment, approach with dynamically typed languages is quite different than one with Java/C#, but I guess you will have to see that for yourself. 但是,正如我在评论中已经提到的那样,使用动态类型语言的方法与使用Java / C#的方法完全不同,但是我想您必须亲自了解一下。 Right now, most of development I am doing using Vim (again, available for Windows as well). 现在,我正在使用Vim进行大部分开发(同样适用于Windows)。

The most important IDE feature that I am missing in "ordinary" editors is tight SVN integration, namely highlighting the changed lines (although there's Vim plugin for that). 我在“普通”编辑器中缺少的最重要的IDE功能是紧密的SVN集成,即突出显示了已更改的行(尽管有用于Vim的插件)。

I suggest Django with PyDev as an IDE. 我建议使用PyDev作为IDE的Django PyDev is aptana's product. PyDev是aptana的产品。 You can install PyDev as Eclipse plug-in or as an Aptana plug-in. 您可以将PyDev作为Eclipse插件或作为Aptana插件安装。

Being an Eclipse plug-in means that PyDev is able to use all the Eclipse goodies. 成为Eclipse插件意味着PyDev能够使用所有Eclipse好东西。 Also, if you have used Eclipse in the past, that means you are already familiar UI and the shortcuts. 另外,如果您过去使用过Eclipse,则意味着您已经熟悉了UI和快捷方式。

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

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