ScriptSharp可以为我的工具包带来什么优势? [英] What advantages can ScriptSharp bring to my tool kit?

查看:128
本文介绍了ScriptSharp可以为我的工具包带来什么优势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,我们使用jQuery将RIA优势添加到我们的应用程序中,但是最近我们已将Coveo Search引擎实现到我们的Sharepoint门户中,并发现在其产品中使用了ScriptSharp. ScriptSharp可以带给桌面什么?

Currently we use jQuery to add RIA goodness to our apps, but recently we have been implementing the Coveo Search engine into our Sharepoint portal and found that ScriptSharp was used in their product. What can ScriptSharp bring to the table?

推荐答案

我正在使用ScriptSharp,正如我们所说的,大约2-3周前就发现了它.老实说,我喜欢它.本机Javascript是一个挑战,而DOM模型使客户端编程更加糟糕.然后大约六个月前我发现了jQuery,我认为这是天赐之物. jQuery提高了我的生产力,但是我仍然经常陷入jQuery的困境,因为您仍然必须编写,调试和调整Javascript.

I am using ScriptSharp as we speak, having discovered it about 2-3 weeks ago. Honestly, I love it. Native Javascript is a challenge, and the DOM model makes client-side programming even worse. Then I discovered jQuery about six months ago, and I thought it was a godsend. jQuery increased my productivity, but I still get bogged down often with jQuery because you still have to write and debug and tweak Javascript.

输入ScriptSharp.与jQuery相比,它提高了我的生产率,并极大地减轻了我的头痛.我能看到的最大优点是,在编写代码时,C#和Visual Studio的功能就是您的了.不能低估它的功能.现在,在编译时可以消除 的麻烦,而这些琐碎的Javascript错误通常要花费数小时才能调试. 代码行的数量大约是jQuery的两倍,但生产率却很高这么高,那么谁在乎呢?基本上,您只需编写代码,编译/测试/调试周期就更少了.几小时变成几分钟.

Enter ScriptSharp. It has boosted my productivity over jQuery and reduced my headaches immensely. The biggest advantages I can see are the fact that the power of C# and Visual Studio are yours while you're writing code. The power of this cannot be understated. Now the niggling little Javascript errors that used to take hours to debug are eliminated at compile time. The lines of code are probably about twice as many than with jQuery, but the productivity is so much higher, so who cares? You basically just write code, with many fewer compile/test/debug cycles. Hours become minutes.

我要说一开始要让ScriptSharp与Microsoft AJAX一起工作是很艰苦的,直到我了解到要使用它之前必须执行的非常重要的步骤.我不知不觉就拉了好几天. (我相信这在ScriptSharp的61页PDF自述文件中已有记录,但非常易于理解.)关键是选择项目类型网站内的Script#类库"(或创建Web站点中的MS Ajax类库").这会将ScriptSharp项目放置在网站的Bin/Scripts目录中,并且-非常重要- -将编译后的输出定向到该目录,而不是默认的"bin" ScriptSharp项目的目录.也许一个例子是有启发性的:

I will say it was quite a struggle initially to get ScriptSharp to work with Microsoft AJAX until I learned of a very important step you must take in order to work with it. I pulled my hair out for days before I knew about this. (I believe this is documented in ScriptSharp's 61-page PDF Readme, but it's very easy to gloss it over.) The key is to choose the project type "Script# Class Library inside a Web Site" (or "MS Ajax Class Library Inside a Web Site") when creating a ScriptSharp library. This places the ScriptSharp project in the Bin/Scripts directory of the website, and -- very importantly -- directs the compiled output to that directory instead of to the default "bin" directory of the ScriptSharp project. Perhaps an example will be instructive:

Web Site or Application directory\
   Bin\ 
      Scripts\           <-- "..\\" config setting sends .js files here.
         ScriptSharp Project directory\
            Bin\         <-- will not be used at run time
               Debug\    <-- will not be used at run time

简而言之,我发现这个项目值得.我将编写关于如何将所有内容绑定在一起的HOW-TO(在我的情况下,涉及使用Web用户控件),然后将URL发布回此处.现在,我已经弄清了ScriptSharp,这使我在RIA开发中非常高效.如果只有它更可见,并且只有CodePlex网站仍然存在的话.

In short, I found this project worthwhile. I'm going to write up my own HOW-TO (which in my case involves using Web User Controls) on how to bind everything together, and post an URL back here. Now that I've figured ScriptSharp out, it's made me very productive in my RIA development. If only it were more visible, and if only the CodePlex site were still there.

这篇关于ScriptSharp可以为我的工具包带来什么优势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆