使用IHttpHandler而不是ASPX用于专业网络应用 [英] Use IHttpHandler not ASPX for pro web apps

查看:48
本文介绍了使用IHttpHandler而不是ASPX用于专业网络应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ASPX意味着ASPX页面,代码隐藏概念,用户控件,

Web控件等设计非常糟糕,使得开发专业人员非常困难

高质量的网络应用程序。


ASPX是微软试图愚蠢的尝试。网络应用程序开发

帮助不熟练的开发人员(如网页设计机构)获得一些

的结果。


对于高质量的应用程序,IHttpHandlers是要走的路。


为了在设计和功能之间保持一致,你可以在输出路径中包含一些

XSLT。


现在开发人员只需要输出网络的结构元素

应用程序 - 表单,表单字段,提交按钮,超链接和数据

结构与XML兼容的HTML。


每个IHttpHandler都有一个关联的XSLT,例如:

http://server/path/script.aspx (这映射到httphandler)

进程/路径/脚本.xslt作为输出前的最后一步


XslTransform可以使用回调

对象和命名空间回调给开发人员。


现在很容易要执行以下操作:


- 创建大多数自行生成的应用程序,使您免于ASPX要求的

手工劳动

- 重定向之后(尝试)状态变更请求

- 使用location.replace表单提交


您还可以包含一个记录无效警告的输出验证器

html输出。


这种方法也使得将输出定位到XHTML

或HTML4.0等非常简单。


微软负责架构ASPX的团队感到羞耻。

多少垃圾。


我很抱歉人们学习ASPX还没有意识到它是多么糟糕。

他们错误地认为无论来自哪个
微软一定很好。

不是真的。

解决方案

我有一个问题,关于你你的帖子主题:
使用IHttpHandler而不是ASPX用于专业网络应用程序


如果您打算将IHttpHandlers用于网络应用程序,

如果没有ASPX页面,您将如何做到这一点?


毕竟,IHttpHandler是system.web中的一个接口:System.Web.IHTTPHandler,

和system.web可以从ASPX页面访问,所以你打算用什么

在客户端和.Net Framework类之间来回传递?


底线:如果你打算使用System.Web.IHTTPHandler ,你必须使用ASPX。


你*不能*使用IHttpHandler而不使用ASPX。


re:现在很容易做到以下内容:
- 创建大多数自行生成的应用程序,让您免于ASPX要求的手工劳动


您能发布示例代码吗?



Juan T. Llibre

ASP.NET MVP

ASPNETFAQ.COM: http://www.aspnetfaq.com

========== ========================

" John Rivers" <音响***** @ btinternet.com>在消息中写道

新闻:11 ********************** @ f14g2000cwb.googlegr oups.com ... ASPX意味着ASPX页面,代码隐藏概念,用户控件,Web控件等设计非常糟糕,使开发专业质量的Web应用程序变得非常困难。

ASPX是Microsoft '试图愚弄 Web应用程序开发
帮助不熟练的开发人员(如网页设计机构)取得一些成果。

对于高质量的应用程序,IHttpHandlers是可行的方法。
为了在设计和功能之间保持一致,你可以在输出路径中包含一些
XSLT。

现在开发人员只需要输出web的结构元素
app - 与XML兼容的HTML中的表单,表单字段,提交按钮,超链接和数据结构。

每个IHttpHandler都有一个关联的XSLT,例如:

http://server/path/script.aspx (这映射到httphandler)
将/path/script.xslt作为输出前的最后一步处理

XslTransform可以使用回调对象和命名空间回调给开发人员。

- 主要创建自生成应用程序让您免于ASPX要求的手工劳动
- 重新定位(尝试)状态变更请求
- 表单提交与location.replace

您还可以包括一个输出验证器,记录无效
html输出的警告。

这种方法也使得将输出定位到XHTML
或HTML4.0等非常简单。

微软负责架构ASPX的团队感到羞耻。
多少垃圾。

对于那些尚未意识到ASPX的人来说,我感到很遗憾很糟糕。
他们错误地认为来自微软的一切都必须是好的。
不是真的。



你错了。


ASPX *是一个HttpHandler。


你怎么能成为一个ASP。 NET MVP并不知道?


引用:


例如,ASP.NET将.aspx文件的所有请求映射到

全局machine.config文件中的PageHandlerFactory类:


< httphandlers>

...

< add verb = " * QUOT; path =" * .aspx"

type =" System.Web.UI.PageHandlerFactory,System.Web" />

...

< / httphandlers>


哈哈哈哈哈


为什么不花更多的时间学习,浪费更少的时间来谈论垃圾。


呵呵?

哇!

" Juan T. Llibre" <无*********** @ nowhere.com>在留言中写道

news:uo ************* @ TK2MSFTNGP12.phx.gbl ...

我有一个问题要问你关于你的帖子的主题:

"使用IHttpHandler而不是ASPX用于专业网络应用程序"
如果你打算将IHttpHandlers用于网络应用程序,
确切地说如果没有ASPX页面,你打算怎么做?

毕竟,IHttpHandler是system.web中的一个接口:



System.Web.IHTTPHandler,并且可以从ASPX页面访问system.web,那么,你打算在客户端和.Net Framework类之间来回使用什么?

底线:如果你' '我要使用System.Web.IHTTPHandler,你必须使用
使用ASPX。
你*不能*使用IHttpHandler而不使用ASPX。

重新:

现在很容易做到以下几点:
- 创建大多数自行生成的应用程序,让您免受ASPX d的手工劳动命令



你能发布示例代码吗?


Juan T. Llibre
ASP.NET MVP
ASPNETFAQ.COM : http://www.aspnetfaq.com
====== ============================
John Rivers <音响***** @ btinternet.com>在消息中写道
新闻:11 ********************** @ f14g2000cwb.googlegr oups.com ...

ASPX意味着ASPX页面,代码隐藏概念,用户控件,Web控件等设计非常糟糕,因此开发专业品质的Web应用程序非常困难。

> ASPX是微软试图愚弄的举动。 Web应用程序开发
帮助不熟练的开发人员(如网页设计机构)取得一些成果。

对于高质量的应用程序,IHttpHandlers是可行的方法。
为了在设计和功能之间保持一致,你可以在输出路径中包含一些
XSLT。

现在开发人员只需要输出web的结构元素
app - 与XML兼容的HTML中的表单,表单字段,提交按钮,超链接和数据结构。

每个IHttpHandler都有一个关联的XSLT,例如:

http://server/path/script.aspx (这映射到httphandler)
将/path/script.xslt作为输出前的最后一步处理

XslTransform可以使用回调对象和命名空间回调给开发人员。

- 主要创建自生成应用程序让您免于ASPX要求的手工劳动
- 重新定位(尝试)状态变更请求
- 表单提交与location.replace

您还可以包括一个输出验证器,记录无效
html输出的警告。

这种方法也使得将输出定位到XHTML
或HTML4.0等非常简单。

微软负责架构ASPX的团队感到羞耻。
多少垃圾。

对于那些尚未意识到ASPX的人来说,我感到很遗憾很糟糕。
他们错误地认为来自微软的一切都必须是好的。
不是真的。




ASPX which means ASPX pages, the code-behind concept, User Controls,
Web Controls etc. is very poorly designed and makes it extremely hard
to develop professional quality web applications.

ASPX is Microsoft''s attempt to "dumb down" web application development
to help unskilled developers such as web design agencies achieve some
results.

For high quality applications IHttpHandlers are the way to go.

To keep a line between the design and the function you can include some
XSLT in the output path.

Now the developer need only output the structural elements of the web
app - forms, form fields, submit buttons, hyperlinks and data
structures in XML-compatible HTML.

Each IHttpHandler will have an associated XSLT, for example:

http://server/path/script.aspx (this is mapped to httphandler)
which processes /path/script.xslt as the final step before output

The XslTransform can callback into the developer using a callback
object and namespace.

Now it is easy to do the following:

- create mostly self generating applications freeing you from the
manual labour that ASPX demands
- redirect after (attempted) state change requests
- form submit with location.replace

You can also include an output validater that logs warnings of invalid
html output.

This approach also makes it quite simple to target your output to XHTML
or HTML4.0 etc.

Shame on the team at Microsoft reponsible for architecting ASPX.
What a load of rubbish.

And I feel sorry for people learning ASPX who haven''t yet realised how
bad it is.
They have made the mistake of thinking that whatever comes from
Microsoft must be good.
Not alway true.

解决方案

I have a question for you regarding the subject of your post :

"Use IHttpHandler not ASPX for pro web apps"
If you intend to use IHttpHandlers for a web app,
exactly how are you going to do that without an ASPX page ?

After all, IHttpHandler is an interface in system.web: System.Web.IHTTPHandler,
and system.web is accessible from ASPX pages so, what are you going to use
to go back and forth between the client and the .Net Framework classes ?

Bottom line : if you''re going to use System.Web.IHTTPHandler, you have to use ASPX.

You *cannot* use IHttpHandler and not use ASPX.

re: Now it is easy to do the following:
- create mostly self generating applications freeing you from the
manual labour that ASPX demands
Could you post example code ?


Juan T. Llibre
ASP.NET MVP
ASPNETFAQ.COM : http://www.aspnetfaq.com
==================================
"John Rivers" <fi*****@btinternet.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com... ASPX which means ASPX pages, the code-behind concept, User Controls,
Web Controls etc. is very poorly designed and makes it extremely hard
to develop professional quality web applications.

ASPX is Microsoft''s attempt to "dumb down" web application development
to help unskilled developers such as web design agencies achieve some
results.

For high quality applications IHttpHandlers are the way to go.

To keep a line between the design and the function you can include some
XSLT in the output path.

Now the developer need only output the structural elements of the web
app - forms, form fields, submit buttons, hyperlinks and data
structures in XML-compatible HTML.

Each IHttpHandler will have an associated XSLT, for example:

http://server/path/script.aspx (this is mapped to httphandler)
which processes /path/script.xslt as the final step before output

The XslTransform can callback into the developer using a callback
object and namespace.

Now it is easy to do the following:

- create mostly self generating applications freeing you from the
manual labour that ASPX demands
- redirect after (attempted) state change requests
- form submit with location.replace

You can also include an output validater that logs warnings of invalid
html output.

This approach also makes it quite simple to target your output to XHTML
or HTML4.0 etc.

Shame on the team at Microsoft reponsible for architecting ASPX.
What a load of rubbish.

And I feel sorry for people learning ASPX who haven''t yet realised how
bad it is.
They have made the mistake of thinking that whatever comes from
Microsoft must be good.
Not alway true.



You are mistaken.

ASPX *is* an HttpHandler.

How can you be an ASP.NET MVP and not know that?

Quote:

For example, ASP.NET maps all requests for .aspx files to the
PageHandlerFactory class in the global machine.config file:

<httphandlers>
...
<add verb="*" path="*.aspx"
type="System.Web.UI.PageHandlerFactory,System.Web" />
...
</httphandlers>

Ha ha ha ha ha

Why not spend more time studying and waste less time talking rubbish.


huh ?
wow !
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:uo*************@TK2MSFTNGP12.phx.gbl...

I have a question for you regarding the subject of your post :

"Use IHttpHandler not ASPX for pro web apps"
If you intend to use IHttpHandlers for a web app,
exactly how are you going to do that without an ASPX page ?

After all, IHttpHandler is an interface in system.web:


System.Web.IHTTPHandler, and system.web is accessible from ASPX pages so, what are you going to use
to go back and forth between the client and the .Net Framework classes ?

Bottom line : if you''re going to use System.Web.IHTTPHandler, you have to use ASPX.
You *cannot* use IHttpHandler and not use ASPX.

re:

Now it is easy to do the following:
- create mostly self generating applications freeing you from the
manual labour that ASPX demands



Could you post example code ?


Juan T. Llibre
ASP.NET MVP
ASPNETFAQ.COM : http://www.aspnetfaq.com
==================================
"John Rivers" <fi*****@btinternet.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...

ASPX which means ASPX pages, the code-behind concept, User Controls,
Web Controls etc. is very poorly designed and makes it extremely hard
to develop professional quality web applications.

ASPX is Microsoft''s attempt to "dumb down" web application development
to help unskilled developers such as web design agencies achieve some
results.

For high quality applications IHttpHandlers are the way to go.

To keep a line between the design and the function you can include some
XSLT in the output path.

Now the developer need only output the structural elements of the web
app - forms, form fields, submit buttons, hyperlinks and data
structures in XML-compatible HTML.

Each IHttpHandler will have an associated XSLT, for example:

http://server/path/script.aspx (this is mapped to httphandler)
which processes /path/script.xslt as the final step before output

The XslTransform can callback into the developer using a callback
object and namespace.

Now it is easy to do the following:

- create mostly self generating applications freeing you from the
manual labour that ASPX demands
- redirect after (attempted) state change requests
- form submit with location.replace

You can also include an output validater that logs warnings of invalid
html output.

This approach also makes it quite simple to target your output to XHTML
or HTML4.0 etc.

Shame on the team at Microsoft reponsible for architecting ASPX.
What a load of rubbish.

And I feel sorry for people learning ASPX who haven''t yet realised how
bad it is.
They have made the mistake of thinking that whatever comes from
Microsoft must be good.
Not alway true.




这篇关于使用IHttpHandler而不是ASPX用于专业网络应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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