MagicAjax Features (MagicAjax特点 0.30版) (翻译)
本人的英文水平不高,翻译中有错的地方请指出。翻译的不对的地方请见笑。
主要是让自己看的,所以知道是那个意思就是了。词不达意的地方肯定会有不少。
Easy integration
简单介绍
Just a few lines in web.config are enough to have MagicAjax working with default configuration options
只要在web.config中写几行代码,就可以让MagicAjax工作在默认设置选项模式下。
Only one easy to use control (AjaxPanel) is required to be included in your page to enable the AJAX functionality
只要将控件(AjaxPanel)添加到你的页面之中,并将控件添加到AjaxPanel里面,你的页面就具有了ajax的功能。
Usability
可用性
You put the part of your page that you want to have AJAX functionality inside an AjaxPanel and that's it;the MagicAjax framework takes care all of the intrinsic details for you
如果你想你的页面的一部分想具有ajax功能,那么你把那一部分放入到AjaxPanel里面就可以了;MagicAjax框架将帮你完成所有的内部详细细节.
The AjaxPanel works like the ASP.NET Panel and can display its contents on the Visual Studio Designer, allowing you to add controls to it visually
AjaxPanel 像 ASP.NET 工具箱上的Panel一样在vs设计器中显示,它是所见即所得.
No javascript code is needed to be written
javascript脚本不是必须要写的。
Programming
规划
For most cases you can add AJAX functionality to your existing pages by only adding AjaxPanels and without even a single change in the source code
对于大多数的情况你只要把 AJAX 功能加入现有的页面中只需要添加AjaxPanels,不需要添加一行代码.
MagicAjax replaces PostBacks with AJAX callbacks (AjaxCalls) that do not cause a refresh on the client's browser
MagicAjax可以不用客户端浏览器进行刷新而回调服务器端的功能,用ajaxCalls来代替PostBacks.
The PostBack and AJAX functionality can co-exist in the same page;
PostBack 和 AJAX 功能在同一页面中能同时存在.
only the controls that are inside an AjaxPanel will perform an AjaxCall instead of a PostBack
只有在 AjaxPanel 里的控件才会用 AjaxCall 代替 PostBack
The page's ViewState is shared amongst PostBacks and AjaxCalls;any changes to it by an AjaxCall will be available to a PostBack and vice versa
页面的ViewState是由PostBacks与AjaxCalls共享;被ajaxCall进行改变的ViewSrate都能在PostBack之后访问,反之亦然.
You handle an AjaxCall just like a PostBack, using the ASP.NET server-side programming model
你操作AjaxCall就像操作 PostBack 一样的, 使用 ASP.NET 服务器端模式.
MagicAjax intuitively spots the changes that occured during an AjaxCall and sends the minimum possible required javascript that will reflect the changes on the client's browser
MagicAjax 在ajaxcall期间的变化是直观的,而且将发送最少的且必须的javascipt到客户的浏览器.
There are plenty of helper methods to help you with handling an AjaxCall by code (i.e. if you want to send additional custom javascript to the client)
有许多方法帮你解决操作AjaxCall的代码.( 也就是,如果你想发送自定义的javascript到客户端)
User experience
用户体验
The user of your page enjoys a faster and richer browser UI, without the annoying PostBacks
用户在使用你的网页时将得到较快的速度和富客户端的用户界面的享受, 而没有令人感到懊恼的PostBacks
A 'Loading' label notifies the user that an AjaxCall has been invoked
'载入' 标签通知用户 AjaxCall 是否已经被调用.
Instead of downloading the whole page for a Postback, the client only downloads chunks of javascript code that apply the changes made to the page's html
对于PostBack模式的页面更新是要下载整个页面,而对于MagicAjax的页面更新,则只需要在客户端下载 javascript和需要改变的html页面代码.
MagicAjax's changes to the page are kept in the browser's cache, so if the user navigates to another page and then presses the browser's 'Back' button, he will see the same page that he was viewing before
具有MagicAjax's 的页面变化将被保存在浏览器的缓存中,因此,如果使用浏览器工具栏上的 '回退'按钮将转移其他页面, 他将会看见与之前看到的相同的页面.
Customization
自定义
Many configuration options give you total control of the inner workings of MagicAjax
MagicAjax内部工作有许多配置选项提供给你.
A small set of attributes applied to your ASP.NET controls can customize the way that they will be handled by MagicAjax
你可以使用MagicAjax提供的一些属性来扩展你的ASP.NET控件,它们将会被 MagicAjax处理.
You can define that an AjaxCall will be invoked asynchronously or synchronously for all controls of an AjaxPanel or for a single control
你能为所有 AjaxPanel 的控件或为单个控件定义 AjaxCall 是异步调用还是同步调用.
You can define that certain controls of an AjaxPanel will invoke a plain PostBack
你能定义 AjaxPanel中的某几个控件可以使用简单的auto PostBack功能
If the 'tracing' configuration option is enabled, a popup window is created that displays information about the data that were sent to and from the server, allowing you to monitor the traffic of AjaxCalls that the page invokes
如果 '追踪' 结构选项被选中, 将弹出一个窗口显示创关于与服务器交互的信息数据, 允许你检测 AjaxCalls 的调用页是否调用.
Clean object-oriented design makes it easy to extend the framework and add your own AjaxControls
清楚的面向对名的设计,你将非常容易在这个架构上扩充,得到你自己的AjaxControls.
Compatibility
兼容性
Internet Explorer, Firefox, Netscape and Opera browsers are supported
支持IE, Firefox ,网景和Opera浏览器
If a browser is not supported or the user has disabled javascript, the page will revert to plain PostBacks automatically
如果浏览器不支援或者使用者无效的 javascript, 页面将会自动使用Auto PostBack方式。