I dislike webforms , I dislike the Page class, it is too complex..
In fact before 2005, I do some asp programming work, I like the simple of asp.
Right now I work in a internet company, in our department we use asp.net too, but we do not use web forms at all, we use asp.net just as we use asp. We only use one asp.net server control : Repeater, We do not use module\server control\MVC\State management,
Yes all the prefessional features we do not use.
Microsoft expert think we are all foolish, they fear we write good programms witch is better than their programms , so they pack the logical in classes and assembly, release new versions and new features, and let us learn new features/new features again
and agian. so we have no time to right better programme, no time to pick up girls ,make love, traval, etc...
I am tired,,, around me ,java programmer and c++ programmers are all more well paid than .net programmer, Even in Microsoft China compay, their project leaders, workers are all abused like they are grandson。Yes ,do developing work at microsoft feild in China,
is treated as a low level work, and must do a lot of overtime work.... but java/c++ programmer do not need work overtime, and get more salary. I talked with some hunter, they only seek java/c++ experts, no hunter need c# programmer.....
Right now, I want to do a website of mine, I do not want to use asp.net forms, MVC ... I want to code a new web handler that works like asp. a simple class that can be used in large internet compay.
I founf there is a generic handler file type in visual studio, but I cannot write HTML tags in .ashx files, I can only write c# code in .ashx.cs files....
I define my AspPage class like this :
1, can use master pages.
2, no i18n, all programmes should not have i18n concept , bcz it is only the logical of UI . Microsft import a i18n in .net, is a foolish design.
3, Requst collection, use this collection to get data send by useragen.
4, Reponse class
5, Session class , keep track user agent.
6 Application class , share data from web garden, web farm, process , host servers... replece the memcached, redius ....
7 Server class, do some thmlencode, htmldecode ,urlencode, urldecode..
That all ,very simple ,but can be used in big website like facebook, google....
The asp.net pages cannot be used in facebook, google, bcz it is too complex . the close of Myspace.com , on big reason is they choose windows and asp.net as their technology.
Any suggestion? I post this thread in a ubuntu linux, and I just install mono in it. programms of course should run in unix/linux, windows server is nothing.
Thanks for posting here. Not sure if the thread title will somewhat prevent other communiity members from jumping in.
I agree that ASP.NET webform programming model has as a complicated server-side processing pipe-line and page rendering mechanism (comparing to other dynamic server page frameworks). Actually, what's why it is called "webform", ASP.NET wants to make developers
write web pages just like windows forms (using controls on forms to compose UI). And the new ASP.NET MVC framework is more like other traditional HTTP request/response based page processing model which is light-weight(though still involves many existing ASP.NET
server-side pipeline components).
Actually, ASP.NET provides many encapsulated server controls and modules in order to help developers who want to quickly and simply build some ad-hoc or not performance critical web application. If the case is that we need to build performance critical (such
as need good response time, large concurrent users, good scalability ,etc...), the default ad-hoc approach definitely not work. And ASP.NET also opens the door for fully customize the default server-side processing model such as disable certain HttpModules,
disable viewstate, etc... Here are some performance related MSDN articles which also mentioned many suggestions.
Well, back to your question. Your idea on creating a raw custom HTTPHandler is good and reasonable if you want to build your custom fast and high performance web application with ASP.NET framework. And based on all the features you have listed, I think the
most important thing is still how the HTML mark will be generated and rendered in your custom handler (other features like html encode/decode, i18n, access headers like useragent is naturally supported since HTTPHandler can still access the HttpContext object
and other ASP.NET specific helper classes).
For the HTML markup, you can build a simple template based engine which just store the HTML template (for a certain page/handler) in a txt file like:
Then, in your handler's execution code, you just load the template and programmtically replace the placeholders in it with the certain handler variables(or session/Cache/... objects) based on the placeholder syntaxt you define. In real case, you can make your
template engine much more powerful (the above one is just like a simple implementation of string.Format function).
BTW, for web application development, AJAX based rich client web app (such as the latest HTML5 +javascript + webservice/WCF pattern) is quite popular. And when developing web applications in such approach, server-side page processing model is much less important
comparing to traditional dynamic web applications. In such cases, we just use ASP.NET page (JSP, or PHP...) or even just plain .htm page for the web UI and use javascript for the dynamic user interaction and UI population/updating. All the server-side related
communication are relying on the webservice/WCF services. And based on my experience, when developing such kind of web applications, the server-side processing pipeline and lifecycle is much less important. But we need to care more about the performance of
the webservice/WCF services and how we handle the AJAX based scripting in page client(asynchronous manner) so as to make the web page fully live and dynamic.
I want to build my custom HttpHandler not bcz perfermence , but also for a simple programming module.
Life is short, why should we always spend our free time to learn Micorosoft's "new features"? We should spend these times enjoy life.
And MVC, asp.net MVC is urlay. URL routing should be the web server's task ,like apache's rewrite module, or the iis' rewrite ISAPI, asp.net should only do what it should do. Microsoft want asp.net to do all the tings.
I wonder if programmers in Microsoft have basic programming idea and concept..........
Right now I find a C++ server pages, I write to them, want them to open source and port CSP to unix system by Fastcgi, but the answer is they did try port it to unix system, but got some bug.
Intersting, Unix programming is more simple than windows programming ,why they got bug cannot fix ?? I think the reason is , they only can do windows programming , but not good at unix programming. They are kidnapped by microsoft.
Around me, a lot of young man are kidnapped by microsoft, They often talk about new features in .net, and think they are smart, and learn new technology fast. I have a strong aversion to such people. Microsoft never did any new technology in compter
industry, and will never.
unistd
Member
8 Points
19 Posts
How can I write a asp4 handler, only expert come in.
Apr 22, 2012 10:55 AM|LINK
I dislike webforms , I dislike the Page class, it is too complex..
In fact before 2005, I do some asp programming work, I like the simple of asp.
Right now I work in a internet company, in our department we use asp.net too, but we do not use web forms at all, we use asp.net just as we use asp. We only use one asp.net server control : Repeater, We do not use module\server control\MVC\State management, Yes all the prefessional features we do not use.
Microsoft expert think we are all foolish, they fear we write good programms witch is better than their programms , so they pack the logical in classes and assembly, release new versions and new features, and let us learn new features/new features again and agian. so we have no time to right better programme, no time to pick up girls ,make love, traval, etc...
I am tired,,, around me ,java programmer and c++ programmers are all more well paid than .net programmer, Even in Microsoft China compay, their project leaders, workers are all abused like they are grandson。Yes ,do developing work at microsoft feild in China, is treated as a low level work, and must do a lot of overtime work.... but java/c++ programmer do not need work overtime, and get more salary. I talked with some hunter, they only seek java/c++ experts, no hunter need c# programmer.....
Right now, I want to do a website of mine, I do not want to use asp.net forms, MVC ... I want to code a new web handler that works like asp. a simple class that can be used in large internet compay.
I founf there is a generic handler file type in visual studio, but I cannot write HTML tags in .ashx files, I can only write c# code in .ashx.cs files....
I define my AspPage class like this :
1, can use master pages.
2, no i18n, all programmes should not have i18n concept , bcz it is only the logical of UI . Microsft import a i18n in .net, is a foolish design.
3, Requst collection, use this collection to get data send by useragen.
4, Reponse class
5, Session class , keep track user agent.
6 Application class , share data from web garden, web farm, process , host servers... replece the memcached, redius ....
7 Server class, do some thmlencode, htmldecode ,urlencode, urldecode..
That all ,very simple ,but can be used in big website like facebook, google....
The asp.net pages cannot be used in facebook, google, bcz it is too complex . the close of Myspace.com , on big reason is they choose windows and asp.net as their technology.
Any suggestion? I post this thread in a ubuntu linux, and I just install mono in it. programms of course should run in unix/linux, windows server is nothing.
unistd
Member
8 Points
19 Posts
Re: How can I write a asp4 handler, only expert come in.
Apr 22, 2012 01:49 PM|LINK
no answer ??
Steven Cheng...
Contributor
4219 Points
548 Posts
Microsoft
Moderator
Re: How can I write a asp4 handler, only expert come in.
Apr 24, 2012 09:28 AM|LINK
Hi unistd,
Thanks for posting here. Not sure if the thread title will somewhat prevent other communiity members from jumping in.
I agree that ASP.NET webform programming model has as a complicated server-side processing pipe-line and page rendering mechanism (comparing to other dynamic server page frameworks). Actually, what's why it is called "webform", ASP.NET wants to make developers write web pages just like windows forms (using controls on forms to compose UI). And the new ASP.NET MVC framework is more like other traditional HTTP request/response based page processing model which is light-weight(though still involves many existing ASP.NET server-side pipeline components).
Actually, ASP.NET provides many encapsulated server controls and modules in order to help developers who want to quickly and simply build some ad-hoc or not performance critical web application. If the case is that we need to build performance critical (such as need good response time, large concurrent users, good scalability ,etc...), the default ad-hoc approach definitely not work. And ASP.NET also opens the door for fully customize the default server-side processing model such as disable certain HttpModules, disable viewstate, etc... Here are some performance related MSDN articles which also mentioned many suggestions.
http://msdn.microsoft.com/en-us/library/ff647787.aspx
http://msdn.microsoft.com/en-us/library/ff649152.aspx
Well, back to your question. Your idea on creating a raw custom HTTPHandler is good and reasonable if you want to build your custom fast and high performance web application with ASP.NET framework. And based on all the features you have listed, I think the most important thing is still how the HTML mark will be generated and rendered in your custom handler (other features like html encode/decode, i18n, access headers like useragent is naturally supported since HTTPHandler can still access the HttpContext object and other ASP.NET specific helper classes).
For the HTML markup, you can build a simple template based engine which just store the HTML template (for a certain page/handler) in a txt file like:
<html> <body> <head> {0} </head> <body> <div>{1}</div> <div>{2}</div> .... </body> </html>Then, in your handler's execution code, you just load the template and programmtically replace the placeholders in it with the certain handler variables(or session/Cache/... objects) based on the placeholder syntaxt you define. In real case, you can make your template engine much more powerful (the above one is just like a simple implementation of string.Format function).
BTW, for web application development, AJAX based rich client web app (such as the latest HTML5 +javascript + webservice/WCF pattern) is quite popular. And when developing web applications in such approach, server-side page processing model is much less important comparing to traditional dynamic web applications. In such cases, we just use ASP.NET page (JSP, or PHP...) or even just plain .htm page for the web UI and use javascript for the dynamic user interaction and UI population/updating. All the server-side related communication are relying on the webservice/WCF services. And based on my experience, when developing such kind of web applications, the server-side processing pipeline and lifecycle is much less important. But we need to care more about the performance of the webservice/WCF services and how we handle the AJAX based scripting in page client(asynchronous manner) so as to make the web page fully live and dynamic.
Just some of my thoughts, hope this helps some.
Feedback to us
Microsoft One Code Framework
unistd
Member
8 Points
19 Posts
Re: How can I write a asp4 handler, only expert come in.
May 02, 2012 10:28 PM|LINK
Thanks for your answer...
I want to build my custom HttpHandler not bcz perfermence , but also for a simple programming module.
Life is short, why should we always spend our free time to learn Micorosoft's "new features"? We should spend these times enjoy life.
And MVC, asp.net MVC is urlay. URL routing should be the web server's task ,like apache's rewrite module, or the iis' rewrite ISAPI, asp.net should only do what it should do. Microsoft want asp.net to do all the tings.
I wonder if programmers in Microsoft have basic programming idea and concept..........
Right now I find a C++ server pages, I write to them, want them to open source and port CSP to unix system by Fastcgi, but the answer is they did try port it to unix system, but got some bug.
Intersting, Unix programming is more simple than windows programming ,why they got bug cannot fix ?? I think the reason is , they only can do windows programming , but not good at unix programming. They are kidnapped by microsoft.
Around me, a lot of young man are kidnapped by microsoft, They often talk about new features in .net, and think they are smart, and learn new technology fast. I have a strong aversion to such people. Microsoft never did any new technology in compter industry, and will never.