Developers and management tell me that they want to move away from using asp.net ajax because it is big and cumbersome.
开发人员和管理人员告诉我他们想要放弃使用asp.net ajax,因为它很庞大而且很麻烦。
I kind of agree, but I don't want to do all the javascript heavy lifting myself. Eventually I also want to introduce jQuery. I'm guessing right now it will also be a problem.
我有点同意,但我不想自己做所有javascript繁重的工作。最后我还想介绍jQuery。我猜现在它也将是一个问题。
Is there a good post somewhere outlining pros/cons of using ajax.net vs your own custom libraries?
有没有一个好的帖子概述使用ajax.net与你自己的自定义库的利弊?
7 个解决方案
#1
16
If
they want to move away from using asp.net ajax because it is big and cumbersome
他们想要放弃使用asp.net ajax,因为它很大而且很麻烦
Then JQuery is the exact answer for this.
然后JQuery就是这个的确切答案。
#2
6
You need to convince your manager of something. That's an art form you learn to perfect :-)
你需要说服你的经理一些事情。这是你学会完美的艺术形式:-)
Show them equivalent bits of code for doing a simple function in ASP, straight JS and jQuery, and choose a sample that ensures the straight JS version is large and hideous.
向他们展示用于在ASP,直接JS和jQuery中执行简单功能的等效代码,并选择一个样本来确保直接JS版本大而且可怕。
Tell them you fully agree with their concerns on ASP (butter them up, that always works well) but that you have concerns on quality and timeliness of delivery (this will scare the living daylights out of any manager).
告诉他们你完全同意他们对ASP的关注(把它们搞砸,总是运作良好),但你对质量和交付的及时性有顾虑(这会吓到任何经理的生活日光)。
Your carefully selected samples should convince them that they should move from ASP to jQuery rather than ASP to straight JS. Or, worst case, they'll stay with ASP for a bit longer.
您精心挑选的样本应该让他们相信他们应该从ASP转向jQuery,而不是从ASP转向直接JS。或者,最糟糕的情况是,他们将使用ASP保持更长时间。
Both these sound acceptable to you since they don't involve heavy lifting.
这些听起来都是可以接受的,因为它们不涉及繁重的提升。
I like to take my cues from the "Yes, Prime Minister" show where Sir Humphrey once commented (paraphrased):
我想从汉弗莱爵士曾经评论过的“是,总理”节目中得到启示(转述):
Give them three options, two of which can be shown to eventually culminate in World War III, then let them think about it for a bit.
给他们三个选项,其中两个可以显示最终在第三次世界大战中达到高潮,然后让他们考虑一下。
#3
2
- JQuery Is lightweight (19KB)
- Cross browser compatible
- have a great UI library
- Plenty of plug-ins
- and a good documentation
- good support for ajax
JQuery很轻量级(19KB)
跨浏览器兼容
有一个很棒的UI库
大量的插件
和一个很好的文档
对ajax的良好支持
#4
1
I don't know about a post, but you can easily implement AJAX without using any kind of library (if what you mean is really AJAX, and not all the helper stuff that gets lumped into AJAX like field validation, DOM abstraction, etc).
我不知道有关帖子,但你可以轻松地实现AJAX而不使用任何类型的库(如果你的意思是真的是AJAX,而不是所有帮助的东西都被归结为AJAX,如字段验证,DOM抽象等) 。
This page taught me all I needed to know about real and true AJAX. http://www.hunlock.com/blogs/AJAX_for_n00bs
这个页面教会了我所有关于真实和真实AJAX的知识。 http://www.hunlock.com/blogs/AJAX_for_n00bs
#5
1
Microsoft just added jquery intellisense to VS2008. That should answer your question. However, Google hosts several right here. http://code.google.com/apis/ajaxlibs/ All it takes it one line of code in your webpages.
微软刚刚向VS2008添加了jquery intellisense。这应该回答你的问题。但是,谷歌在这里主持了几个。 http://code.google.com/apis/ajaxlibs/只需在您的网页中输入一行代码即可。
#6
1
Even if you use jQuery (which I highly reccomend), unless you go to the extent of creating pages that just return data for your each your ajax requests, you are still going to need(want) a framework on the server side also.
即使你使用jQuery(我非常推荐),除非你去创建只为你的每个ajax请求返回数据的页面,你仍然需要(想要)服务器端的框架。
I think the main complaint with asp.net ajax is all the scripts it includes on the client side(script helpers). The update panel also get's abused since they are so easy to make use of.
我认为asp.net ajax的主要抱怨是它在客户端包含的所有脚本(脚本助手)。更新面板也被滥用,因为它们很容易使用。
I found that with using jQuery, you can still use asp.net ajax WebMethod()'s but use only jQuery to make the calls to them.
我发现使用jQuery,你仍然可以使用asp.net ajax WebMethod(),但只使用jQuery来调用它们。
This feels like a best of both worlds to me. You get to use the WebMethods and not mess up your project with a-page-per-function, but you can skip including any of the Microsoft javascript libraries on the client side.
对我来说,这对两个世界来说都是最好的。您可以使用WebMethods而不是使用每页功能页面来破坏您的项目,但您可以跳过包括客户端上的任何Microsoft JavaScript库。
More info on calling WebMethod's directly from jQuery here
有关直接从jQuery调用WebMethod的更多信息,请点击此处
#7
1
Have a look at ASP.NET MVC. It addresses the concerns of your management in three areas:
看看ASP.NET MVC。它解决了管理层在以下三个方面的顾虑:
- It drops the used of webforms, arguably the biggest reason for ASP.NET's bulk. Without webforms you are coding "closer to the metal" and so you have tight control over your code and user interaction while still having a framework in place for state management.
- It uses a well defined, easy to follow, folder structure to enforce the Model-View-Controller (MVC) model. Unlike webforms, which was supposed to separate business logic from user interaction, the MVC model strongly encourages the developer to make that necessary separation. It is the separation, more than just about anything else, that keeps your code from becoming cumbersome.
- It is well integrated with jQuery. On the view side, with the exception of some helper classes to get your data into your view efficiently, you're working with pure HTML/CSS/JavaScript. ASP.NET MVC officially supports jQuery and is the preferred way of integrating JavaScript.
它丢弃了webforms的使用,可以说是ASP.NET体积的最大原因。如果没有webforms,您就可以“更接近金属”进行编码,因此您可以严格控制代码和用户交互,同时仍然拥有适用于状态管理的框架。
它使用定义良好,易于遵循的文件夹结构来强制执行模型 - 视图 - 控制器(MVC)模型。与应该将业务逻辑与用户交互分开的webforms不同,MVC模型强烈鼓励开发人员进行必要的分离。分离,而不仅仅是其他任何东西,使您的代码变得麻烦。
它与jQuery很好地集成在一起。在视图方面,除了一些帮助类有效地将数据放入视图之外,您还可以使用纯HTML / CSS / JavaScript。 ASP.NET MVC正式支持jQuery,是集成JavaScript的首选方式。
#1
16
If
they want to move away from using asp.net ajax because it is big and cumbersome
他们想要放弃使用asp.net ajax,因为它很大而且很麻烦
Then JQuery is the exact answer for this.
然后JQuery就是这个的确切答案。
#2
6
You need to convince your manager of something. That's an art form you learn to perfect :-)
你需要说服你的经理一些事情。这是你学会完美的艺术形式:-)
Show them equivalent bits of code for doing a simple function in ASP, straight JS and jQuery, and choose a sample that ensures the straight JS version is large and hideous.
向他们展示用于在ASP,直接JS和jQuery中执行简单功能的等效代码,并选择一个样本来确保直接JS版本大而且可怕。
Tell them you fully agree with their concerns on ASP (butter them up, that always works well) but that you have concerns on quality and timeliness of delivery (this will scare the living daylights out of any manager).
告诉他们你完全同意他们对ASP的关注(把它们搞砸,总是运作良好),但你对质量和交付的及时性有顾虑(这会吓到任何经理的生活日光)。
Your carefully selected samples should convince them that they should move from ASP to jQuery rather than ASP to straight JS. Or, worst case, they'll stay with ASP for a bit longer.
您精心挑选的样本应该让他们相信他们应该从ASP转向jQuery,而不是从ASP转向直接JS。或者,最糟糕的情况是,他们将使用ASP保持更长时间。
Both these sound acceptable to you since they don't involve heavy lifting.
这些听起来都是可以接受的,因为它们不涉及繁重的提升。
I like to take my cues from the "Yes, Prime Minister" show where Sir Humphrey once commented (paraphrased):
我想从汉弗莱爵士曾经评论过的“是,总理”节目中得到启示(转述):
Give them three options, two of which can be shown to eventually culminate in World War III, then let them think about it for a bit.
给他们三个选项,其中两个可以显示最终在第三次世界大战中达到高潮,然后让他们考虑一下。
#3
2
- JQuery Is lightweight (19KB)
- Cross browser compatible
- have a great UI library
- Plenty of plug-ins
- and a good documentation
- good support for ajax
JQuery很轻量级(19KB)
跨浏览器兼容
有一个很棒的UI库
大量的插件
和一个很好的文档
对ajax的良好支持
#4
1
I don't know about a post, but you can easily implement AJAX without using any kind of library (if what you mean is really AJAX, and not all the helper stuff that gets lumped into AJAX like field validation, DOM abstraction, etc).
我不知道有关帖子,但你可以轻松地实现AJAX而不使用任何类型的库(如果你的意思是真的是AJAX,而不是所有帮助的东西都被归结为AJAX,如字段验证,DOM抽象等) 。
This page taught me all I needed to know about real and true AJAX. http://www.hunlock.com/blogs/AJAX_for_n00bs
这个页面教会了我所有关于真实和真实AJAX的知识。 http://www.hunlock.com/blogs/AJAX_for_n00bs
#5
1
Microsoft just added jquery intellisense to VS2008. That should answer your question. However, Google hosts several right here. http://code.google.com/apis/ajaxlibs/ All it takes it one line of code in your webpages.
微软刚刚向VS2008添加了jquery intellisense。这应该回答你的问题。但是,谷歌在这里主持了几个。 http://code.google.com/apis/ajaxlibs/只需在您的网页中输入一行代码即可。
#6
1
Even if you use jQuery (which I highly reccomend), unless you go to the extent of creating pages that just return data for your each your ajax requests, you are still going to need(want) a framework on the server side also.
即使你使用jQuery(我非常推荐),除非你去创建只为你的每个ajax请求返回数据的页面,你仍然需要(想要)服务器端的框架。
I think the main complaint with asp.net ajax is all the scripts it includes on the client side(script helpers). The update panel also get's abused since they are so easy to make use of.
我认为asp.net ajax的主要抱怨是它在客户端包含的所有脚本(脚本助手)。更新面板也被滥用,因为它们很容易使用。
I found that with using jQuery, you can still use asp.net ajax WebMethod()'s but use only jQuery to make the calls to them.
我发现使用jQuery,你仍然可以使用asp.net ajax WebMethod(),但只使用jQuery来调用它们。
This feels like a best of both worlds to me. You get to use the WebMethods and not mess up your project with a-page-per-function, but you can skip including any of the Microsoft javascript libraries on the client side.
对我来说,这对两个世界来说都是最好的。您可以使用WebMethods而不是使用每页功能页面来破坏您的项目,但您可以跳过包括客户端上的任何Microsoft JavaScript库。
More info on calling WebMethod's directly from jQuery here
有关直接从jQuery调用WebMethod的更多信息,请点击此处
#7
1
Have a look at ASP.NET MVC. It addresses the concerns of your management in three areas:
看看ASP.NET MVC。它解决了管理层在以下三个方面的顾虑:
- It drops the used of webforms, arguably the biggest reason for ASP.NET's bulk. Without webforms you are coding "closer to the metal" and so you have tight control over your code and user interaction while still having a framework in place for state management.
- It uses a well defined, easy to follow, folder structure to enforce the Model-View-Controller (MVC) model. Unlike webforms, which was supposed to separate business logic from user interaction, the MVC model strongly encourages the developer to make that necessary separation. It is the separation, more than just about anything else, that keeps your code from becoming cumbersome.
- It is well integrated with jQuery. On the view side, with the exception of some helper classes to get your data into your view efficiently, you're working with pure HTML/CSS/JavaScript. ASP.NET MVC officially supports jQuery and is the preferred way of integrating JavaScript.
它丢弃了webforms的使用,可以说是ASP.NET体积的最大原因。如果没有webforms,您就可以“更接近金属”进行编码,因此您可以严格控制代码和用户交互,同时仍然拥有适用于状态管理的框架。
它使用定义良好,易于遵循的文件夹结构来强制执行模型 - 视图 - 控制器(MVC)模型。与应该将业务逻辑与用户交互分开的webforms不同,MVC模型强烈鼓励开发人员进行必要的分离。分离,而不仅仅是其他任何东西,使您的代码变得麻烦。
它与jQuery很好地集成在一起。在视图方面,除了一些帮助类有效地将数据放入视图之外,您还可以使用纯HTML / CSS / JavaScript。 ASP.NET MVC正式支持jQuery,是集成JavaScript的首选方式。