我需要学习一种用于编写网络应用程序(而不是网站!)的语言。
经过谷歌和 stackoverflow 的一些研究后,我最终认为选择应该属于:
1) Ruby + Rails
2) Python + Django
3) c# + ASP.NET
当然,即使随机选择一个也不是一个糟糕的选择,但我的问题这里专门针对 UI 控件。我来自 win32 开发世界,所以根据我过去的经验,我曾访问过 DevExpress 和 Telerik 等销售 ASP.NET(或 silverlight)控件(如高级网格、调度组件、树列表)的网站...
所以 ASP.NET 已被涵盖,因为目前对我来说 Ruby/Python 是完全未知的,你能解释一下 UI 方面的情况吗?我的意思是在那些世界中 UI 控件是如何管理的?哪里可以找到他们?
一切都是使用 ExtJS 或 JQuery 等库完成的吗?它是如何运作的? (这是一个新手问题,所以请原谅过于简单的方法)。
I need to learn a language for writing web applications (not websites!).
After some research in google and stackoverflow I ended up that the choice should fall in:
1) Ruby + Rails
2) Python + Django
3) c# + ASP.NET
For sure even pickng one randomly would not be a bad choice, but my question here is specific to UI controls. I come from the win32 developmenet world, so in my past experience I was in sites like DevExpress and Telerik that sell ASP.NET (or silverlight) controls like advanced grids, scheduling components, treelists...
So ASP.NET is covered, since Ruby/Python for me currently are totally unknown can you please shed some light on the UI side? I mean how in those worlds UI controls are managed? Where to find them?
All is done using libraries like ExtJS or JQuery? How does it work? (it is a newbie question, so forgive the over-simplicistic approach).
发布评论
评论(3)
HTML仅提供一些“默认控件”。例如下拉菜单、按钮、超级链接和复选框。
更复杂的控件(例如网格或树列表)必须使用 JavaScript 和图像的组合构建在页面顶部。有几个库可以这样做,我最喜欢的一个是 jquery UI。
Ruby + Rails 不包含任何“开箱即用”的复杂 UI 元素(只是简单的控件),但包含 jquery UI(或任何其他 javascript 库)并不是非常困难。
我对 Python 和 Django 没有太多经验,但它们或多或少有相同的历史:它们默认情况下不带有“高级控件”;他们只提供常规的 html 控件。
我对 ASP.NET 的经验更少。它很可能附带一个 UI 库 - 你必须看看它。
我还有其他一些评论:您可能过于重视 UI 元素。 Web 应用程序与网站的区别不在于它使用这个或那个控件,而在于它使用这个或那个控件。这是发生在服务器端的事情。这可能是您将大部分时间花在开发内容上的地方。
考虑到这一点,我建议您重新考虑您的问题。不要问自己“什么让我更容易地获得更多 UI 元素”,而是问自己“什么让我更轻松地开发服务器端”。
我对第二个问题的回答是“可能是 Ruby on Rails”。它附带的东西一开始可能并不明显,但它强制执行了许多良好的实践 - 从命名约定,到测试,再到不显眼的 JavaScript(主要是在 Rails 3.0 上的)。这个清单还在继续。最重要的是,它的社区非常棒。
无论如何,请注意,这只是我的意见,我对其他两个系统的经验不是很丰富 - 我只是给了他们一些探索性的看法。您应该检查其他来源。
HTML only provides some "default controls". Such as dropdowns, buttons, hiperlinks and checkboxes.
More elaborated controls such as grids or treelists have to be built on top of the page using a combination of javascript and images. There are several libraries out there for doing so, my favourite one being jquery UI.
Ruby + Rails doesn't include any complex UI elements "out of the box" (just plain controls), but including jquery UI (or any other javascript library) isn't really very difficult.
I don't have much experience with Python and Django, but it is more or less the same history: they don't come with "advanced controls" by default; they just provide the regular html controls.
I have even less experience with ASP.NET. It could very well come with a UI library - you would have to look at it.
I've got a couple other remarks: you might be giving too much importance to UI elements. What differences a web application from a web site is not the fact that it uses this or that control; It's the stuff that happens on the server side. Which is, probably, where you will spend most of your time developing stuff.
With this in mind, I recommend you to re-think your question. Instead of asking yourself "what gives me more UI elements more easily" ask yourself "what gives me an easier time developing the server side".
My answer to that second question is, "probably Ruby on Rails". The amount of things it comes with may not be evident at first, but it enforces lots of good practices - from naming conventions, to testing, to unobstrusive javascript (that one on rails 3.0 mostly). The list just keeps going on. And on top of that, its community is fantastic.
In any case, please note that this is just my opinion and that I'm not very experienced on the other 2 systems - I just gave them some exploratory looks. You should check it with other sources.
如果您已经熟悉 C# 和 ASP.NET,为什么不使用它们呢?
当然,如果您了解 Python,Django 文档 是一个
好很好的起点。即使您不懂 Python,他们至少也会让您了解如何学习/使用 Python+Django。哈!
If you're already familiar with C# and ASP.NET, why not use that?
Of course if you know Python, the Django docs are a
goodgreat place to start. Even if you don't know Python they'll at least give you an idea about what it will take to learn/use Python+Django.HTH!
Ruby on Rails 是一个服务器端框架,用于处理 HTTP 请求并使用 HTML† 进行响应。它没有任何您所指的 UI 控件类型的概念。
但是,它可以与 ExtJS 或 jQuery 等 JavaScript 框架集成,并且有一些 Rails 插件或 RubyGems 可以使这种集成工作变得更容易。例如,此 Railscast 显示了在 Rails 应用程序中使用日历的示例。
†通常为 HTML。它还可以使用 XML、JSON、文本或您真正喜欢的任何内容进行响应。
Ruby on Rails is a server-side framework that processes HTTP requests and responds with HTML†. It doesn't have any concept of the kind of UI controls that you're referring to.
However, it can integrate with JavaScript frameworks such as ExtJS or jQuery and there are some Rails plugins or RubyGems that make this integration work easier. For example, this Railscast shows an example of using a calendar within a Rails application.
†Usually HTML. It can also respond with XML, JSON, text or whatever you like really.