用于 Web 应用程序开发的 sproutcore 与 javascriptMVC

发布于 2024-09-03 07:37:53 字数 613 浏览 5 评论 0原文

我想将 javascript 框架与 MVC 结合使用,用于数字档案中的 Intranet 的复杂 Web 应用程序(这将是一组相关应用程序和页面之一)。我一直在研究 SproutCore 和 JavascriptMVC。我想选择一种框架并坚持使用。

有人知道比较这两者有什么区别吗?

我想要一些简单、直接的东西,我可以轻松地自定义/破解,并且不会对我造成太大的妨碍,但同时为我提供了保持代码良好组织和事件驱动的基础。我还计划大量使用jquery。

我知道 sproutcore 得到了 Apple 的支持,看起来它越来越受欢迎,而且它有一个不错的绿色网站:),而 JavascriptMVC 看起来不太专业,追随者较少,背后的动力也较少。

我已经完成了这两个教程,并且 SproutCore 给我留下了更多的印象(在 JMVC 教程中,你并没有真正做任何实质性的事情) - 但在我内心的某个地方,我觉得 JMVC 可能会更好,因为它不'不要尝试做太多事情 - 它只是为您提供基于几个 jquery 插件的 MVC 功能,并且您可以使用 jquery 完成其他所有操作,因此它很灵活。而 SproutCore 似乎有更多自己的 API 等...这在某种程度上也很好...但是你会陷入困境...嗯,我很困惑:)。

任何想法将不胜感激。

I want to use a javascript framework with MVC for a complex web application (which will be one of a set of related apps and pages) for an intranet in a digital archives. I have been looking at SproutCore and JavascriptMVC. I want to choose one framework and stick with it.

Does anybody know what the distinguishing features are when comparing these two?

I want something that is simple, straightforward that I can customize/hack easily, and that doesn't get in my way too much, but that at the same time gives me a basis for keeping my code nicely organized, and event-driven. I also plan on using jquery substantially.

I know sproutcore is backed by Apple, and looks like it is getting more popular by the day, and it has a nice green website :), whereas JavascriptMVC looks less professional, with less of a following and less momentum behind it.

I've done the tutorials for both and I was impressed by SproutCore more (in the JMVC tutorial you don't really do anything substantial) - but somewhere in the back of my mind I feel that JMVC might just be better because it doesn't try and do too much - it just gives you MVC functionality based on a couple of jquery plugins, and you can use jquery for everything else, so its flexible. Whereas SproutCore seems to have more of its own API etc... which is also nice in a way... but then you're kind of stuck within that.... hmmm I'm confused :).

Any thoughts would be much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

冧九 2024-09-10 07:37:53

作为一名 JavaScriptMVC 贡献者,我非常有偏见。但我会尽力给出最好的答案。

JavaScriptMVC 的开发也花费了数年时间。但它并没有关注用户界面功能,而是关注其下面的层。这样做有几个原因:

  1. 您可以找到一个 jQuery 小部件来满足几乎所有需求。没有理由竞争这些插件。相反,JavaScriptMVC 尝试与它们合作。
  2. 大多数人需要一两个自定义小部件/控件。 JavaScriptMVC 希望使构建和维护这些部分尽可能简单。
  3. 灵活性+API。我不确定到底该怎么说……但这是我最好的镜头……使用 JavaScriptMVC,我们希望应用程序的每一层都尽可能易于理解和维护。这就是我们选择 jQuery 作为底层库的原因。它的 API 是 dom 的最佳抽象。人们通常直接从低级 API 来构建 Widget/Control。这就是为什么大多数 jQuery 小部件的代码看起来非常不同。我们想要一个中间层来组织我们的代码并推广最佳实践,同时提供足够的灵活性来满足几乎任何要求。因此,使用 JavaScriptMVC,您可以获得非常可靠的低层和中层。但是,您没有获得小部件。

JavaScriptMVC 在框架中内置了测试、错误报告和文档。测试是最令人印象深刻的部分。它集成了 selenium 和 envjs 测试。

如果您的需求可以通过 SproutCore 非常简单地构建,我的建议是使用 SproutCore。但是,如果您了解 jQuery,必须构建大量自定义控件,或者需要真正出色的测试,请使用 JavaScriptMVC。

Being a JavaScriptMVC contributor, I'm extremely biased. But I'll try to give the best answer I can.

JavaScriptMVC has also taken years to develop. But instead of focusing on ui functionality, it focused on the layers just below that. There are a few reasons for this:

  1. You can find a jQuery widget to meet almost every need. There's no reason to compete these plugins. Instead, JavaScriptMVC tries to work with them.
  2. Most people need one or two custom widgets / controls. JavaScriptMVC wants to make building and maintaining these pieces as easy as possible.'
  3. Flexibility+API. I'm not sure exactly how to say this one ... but here's my best shot ... With JavaScriptMVC, we wanted every layer of the application to be as easy to understand and maintain as possible. This is why we picked jQuery as our low-level library. It's API is about the best abstraction for the dom possible. People typically go directly from the low-level API to build the Widget/Control. This is why most jQuery widgets' code look very dissimilar. We wanted a middle layer that organize our code and promote best practices, while providing enough flexibility to meet almost any requirement. So with JavaScriptMVC, you get very solid low and middle-level layers. But, you don't get widgets.

JavaScriptMVC has testing, error reporting, and documentation baked into the framework. The testing is the most impressive part. It has integrated selenium and envjs testing.

My recommendation would be to go with SproutCoreif your requirements can be built pretty straightforward with SproutCore. But if you know jQuery, have to build a lot of custom controls, or need really awesome testing, use JavaScriptMVC.

感受沵的脚步 2024-09-10 07:37:53

有趣的是,因为就在一个月前左右,我们的团队对这两个框架进行了精确的正面评估。我们最终选择了 JavaScriptMVC,我已经实际使用它大约一个月了。

我喜欢它……但是,我是 SproutCore 的大力支持者。在我们评估这两个框架之前,我从未听说过这两个框架,但是当我看到 SproutCore 并深入了解其内部结构后,我印象非常非常深刻。老实说,我认为没有任何东西可以给你它所提供的那种力量。是的,你会有一个学习曲线,但一旦你知道了,它就可以让一个人完成 5 或 10 个人的工作。

所以我会立即使用 SproutCore。

话虽这么说,JavascriptMVC(又名“JMVC”)很好。除了 jQuery 本身之外,它并没有真正为您提供更多功能。您仍然需要自己构建一些基础设施(取决于您的要求的复杂程度)。这既有利又有弊。它的一个好处是,如果您需要深入研究 JMVC 的某些部分的细节,您可以......它并没有那么大得难以理解。

综上所述,JMVC 没有什么问题。但在我看来,SproutCore 根本就没有什么可比的。

Funny, because just a month back or so, our team evaluated exactly these 2 frameworks head to head. We ended up choosing JavaScriptMVC, and I've been working hands-on with it for about a month.

I like it ... but, I was a HUGE proponent of SproutCore. I had never heard of either framework before we eval'd them, but once I saw SproutCore and looked under the hood, I was very, very impressed. Honestly, I don't think there's anything out there that can give you the kind of power it gives. Yes, you'll have a learning curve, but it's the kind of thing that lets one person accomplish the work of 5 or 10 once you know it.

So I'd use SproutCore in a heartbeat.

That being said, JavascriptMVC (aka "JMVC") is nice. It doesn't really give you a ton on top of jQuery itself. You will still have some infrastructure to build yourself (depending on how complicated your requirements are). This is both a pro and a con. One nice thing about it is that, if you need to dig into the details of some piece of JMVC, you can ... it is not so incredibly huge that it is impenetrable.

In summary, there's not a thing wrong with JMVC. But there is, in my opinion, nothing even in the ballpark with SproutCore.

梦萦几度 2024-09-10 07:37:53

我认为它们之间的主要区别在于 SproutCore 包含 GUI,而 JMVC 是低级的,没有任何图形,因此如果您需要 GUI,则无法在不包含其他脚本(如 jQuery UI 或 jQuery 插件)的情况下使用 JMVC。

你说“JMVC 可能会更好,因为它不会尝试做太多事情”,我不同意这一点,SproutCore 1.0 花了几年时间才发布,所以开发人员有时间制作出出色的产品。

我建议你使用SproutCore,也许你需要学习更多的东西,你会花更多的时间来练习和理解一切,但你会学到如何使用一个非常好的框架,对未来的项目也很有用。

I think that the main difference between them is that SproutCore includes a GUI while the JMVC is something low-level without any graphic, so if you need a GUI you can't use JMVC without including other scripts like the jQuery UI or jQuery plugins.

You said that "JMVC might just be better because it doesn't try and do too much" i don't agree with this, it took years before SproutCore 1.0 was released, so developers had the time to make a great product.

I suggest you to use SproutCore, maybe you'll have to learn more things, you'll spend more time to practice and understand everything, but you'll learn how to use a very good framework that can be usefull also for future projects.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文