473,395 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ASP.NET Common Usage (Debate Please)

Many thank to anyone who has the time to read an reply to this.

Am a lone gun developer, I do not develop in team so this question
comes from a place where I just don't really KNOW what others are
doing, I just read, and what I read is ALL about Web Forms ONLY.

I have been developing web sites since 1995, then it was all PERL/CGI,
HTML on UNIX Now I am making the transition from ASP to ASP.NET. I am
developing in C# now.

My question is based around the concept of True "Web Forms"
Development, using Post Backs etc. As a developer I want to develop in
this manner because it is the Correct way to develop today. But in
some cases for example, in an online catalog, you want to use Query
string, Not only are catalog pages bookmarkable that way but the
navigation (back ,forward function)

The problem is this, as a responsible developer making a transition to
the new ways ... every time I develop something with a QueryString
(?printable=1 ... ?productid=54654) I feel as though I am breaking the
rules, reverting to old ways, not accepting the transition as it should
be. - I think. "what have I missed"

While I do use and enjoy true Web Forms development, custom controls,
and user controls...

....Is it also common to use GET requests in lots of your design? Should
I just think of ASP.NET web forms as a new and powerful "option"
available to me or should I think of it as the new must method of
design if you are going to use ASP.NET

Is it a case of:
Web forms are just a tool, use 'em when you can don't feel guilty
when you don't -- mix it up as you see fit you got the experience,
stop overthinking it! Nothing wrong with a querystring as long as your
code is good.

I think I need mentoring here, assurance, something like that. -
Strange that is.
Thank you very much for any replies

Nov 8 '06 #1
3 1404
Hi,

DaBrain wrote:
Many thank to anyone who has the time to read an reply to this.

Am a lone gun developer, I do not develop in team so this question
comes from a place where I just don't really KNOW what others are
doing, I just read, and what I read is ALL about Web Forms ONLY.
ASP.NET gives you a high level of comfort, by wiring the events,
automating a lot of tasks, making the web react more like windows.
However, I don't really agree with you when you say that postbacks are
the Correct way. I think that POST has a lot of issues, for example when
your end user refreshes the page and gets asked if he wants to resubmit.
Also, don't forget that POST requests cannot be saved, when GET requests
can get stored in a bookmark.

As you say, my strong opinion is that there is nothing wrong in doing
GETs, and you really shouldn't get inhibited. The art of engineering is
knowing when to choose which technology. On the web, we have POST and
GET, and both have advantages and inconveniences. You have a huge
advantage on new developers who only worked with .NET, and this is that
you understand the depths of the HTTP protocol, because you come a long
way. Make sure to use this advantage when you work on a project.

Nothing wrong with a querystring :-)

Feeling better?

HTH
Laurent

PS: some will argue that the Correct way to go nowadays is to use AJAX ;-)
PS2: And guess what, it comes with GET and POST too
I have been developing web sites since 1995, then it was all PERL/CGI,
HTML on UNIX Now I am making the transition from ASP to ASP.NET. I am
developing in C# now.

My question is based around the concept of True "Web Forms"
Development, using Post Backs etc. As a developer I want to develop in
this manner because it is the Correct way to develop today. But in
some cases for example, in an online catalog, you want to use Query
string, Not only are catalog pages bookmarkable that way but the
navigation (back ,forward function)

The problem is this, as a responsible developer making a transition to
the new ways ... every time I develop something with a QueryString
(?printable=1 ... ?productid=54654) I feel as though I am breaking the
rules, reverting to old ways, not accepting the transition as it should
be. - I think. "what have I missed"

While I do use and enjoy true Web Forms development, custom controls,
and user controls...

...Is it also common to use GET requests in lots of your design? Should
I just think of ASP.NET web forms as a new and powerful "option"
available to me or should I think of it as the new must method of
design if you are going to use ASP.NET

Is it a case of:
Web forms are just a tool, use 'em when you can don't feel guilty
when you don't -- mix it up as you see fit you got the experience,
stop overthinking it! Nothing wrong with a querystring as long as your
code is good.

I think I need mentoring here, assurance, something like that. -
Strange that is.
Thank you very much for any replies

--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Nov 8 '06 #2
Well said, and I agree.

I'll take it a step further, and say that I'll sometimes use postback, but
peek inside Form["__EVENTTARGET"] and such to shortcircuit a bunch of code.
This is a hack, and I only do it when I feel the ends justify the means
(namely when I have heavy code that can't be moved to prerender and I might
want to skip it depending on which button was clicked).

The querystring example is a good one. I might recommend that you consider
using url rewriting and cleaner URLs instead, but the difference is small. I
use it plenty of times. There are A LOT of times where I'll use plain old <a
href="xxx"></atags instead of LinkButtons. It just makes more sense and
it's better for the user (bookmarks). Sometimes a linkbutton makes more
sense.

To me, the real purity of ASP.NET comes in the form of custom web controls
(even very simple ones), httphandlers, httpmodules and good OO design.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Laurent Bugnion" <ga*********@bluewin.chwrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
Hi,

DaBrain wrote:
>Many thank to anyone who has the time to read an reply to this.

Am a lone gun developer, I do not develop in team so this question
comes from a place where I just don't really KNOW what others are
doing, I just read, and what I read is ALL about Web Forms ONLY.

ASP.NET gives you a high level of comfort, by wiring the events,
automating a lot of tasks, making the web react more like windows.
However, I don't really agree with you when you say that postbacks are the
Correct way. I think that POST has a lot of issues, for example when your
end user refreshes the page and gets asked if he wants to resubmit. Also,
don't forget that POST requests cannot be saved, when GET requests can get
stored in a bookmark.

As you say, my strong opinion is that there is nothing wrong in doing
GETs, and you really shouldn't get inhibited. The art of engineering is
knowing when to choose which technology. On the web, we have POST and GET,
and both have advantages and inconveniences. You have a huge advantage on
new developers who only worked with .NET, and this is that you understand
the depths of the HTTP protocol, because you come a long
way. Make sure to use this advantage when you work on a project.

Nothing wrong with a querystring :-)

Feeling better?

HTH
Laurent

PS: some will argue that the Correct way to go nowadays is to use AJAX ;-)
PS2: And guess what, it comes with GET and POST too
>I have been developing web sites since 1995, then it was all PERL/CGI,
HTML on UNIX Now I am making the transition from ASP to ASP.NET. I am
developing in C# now.

My question is based around the concept of True "Web Forms"
Development, using Post Backs etc. As a developer I want to develop in
this manner because it is the Correct way to develop today. But in
some cases for example, in an online catalog, you want to use Query
string, Not only are catalog pages bookmarkable that way but the
navigation (back ,forward function)

The problem is this, as a responsible developer making a transition to
the new ways ... every time I develop something with a QueryString
(?printable=1 ... ?productid=54654) I feel as though I am breaking the
rules, reverting to old ways, not accepting the transition as it should
be. - I think. "what have I missed"

While I do use and enjoy true Web Forms development, custom controls,
and user controls...

...Is it also common to use GET requests in lots of your design? Should
I just think of ASP.NET web forms as a new and powerful "option"
available to me or should I think of it as the new must method of
design if you are going to use ASP.NET

Is it a case of:
Web forms are just a tool, use 'em when you can don't feel guilty
when you don't -- mix it up as you see fit you got the experience,
stop overthinking it! Nothing wrong with a querystring as long as your
code is good.

I think I need mentoring here, assurance, something like that. -
Strange that is.
Thank you very much for any replies


--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch

Nov 8 '06 #3
I think GETs are common enough in ASP.NET that you don't have to worry about
using them. It it is a fairly standard practice. There is nothing wrong
with GETS or POSTS and just to confuse things further there are plenty of
other good options for passing data around too, such as Application State,
Session State, ViewState, Cache, Cookies, Databases, etc.
Which one is best depends on your situation and is largely a matter of
opinion after weighing various factors such as the amount of data,
usability, efficiency, available resources, etc.

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"DaBrain" <Ta**********@gmail.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
Many thank to anyone who has the time to read an reply to this.

Am a lone gun developer, I do not develop in team so this question
comes from a place where I just don't really KNOW what others are
doing, I just read, and what I read is ALL about Web Forms ONLY.

I have been developing web sites since 1995, then it was all PERL/CGI,
HTML on UNIX Now I am making the transition from ASP to ASP.NET. I am
developing in C# now.

My question is based around the concept of True "Web Forms"
Development, using Post Backs etc. As a developer I want to develop in
this manner because it is the Correct way to develop today. But in
some cases for example, in an online catalog, you want to use Query
string, Not only are catalog pages bookmarkable that way but the
navigation (back ,forward function)

The problem is this, as a responsible developer making a transition to
the new ways ... every time I develop something with a QueryString
(?printable=1 ... ?productid=54654) I feel as though I am breaking the
rules, reverting to old ways, not accepting the transition as it should
be. - I think. "what have I missed"

While I do use and enjoy true Web Forms development, custom controls,
and user controls...

...Is it also common to use GET requests in lots of your design? Should
I just think of ASP.NET web forms as a new and powerful "option"
available to me or should I think of it as the new must method of
design if you are going to use ASP.NET

Is it a case of:
Web forms are just a tool, use 'em when you can don't feel guilty
when you don't -- mix it up as you see fit you got the experience,
stop overthinking it! Nothing wrong with a querystring as long as your
code is good.

I think I need mentoring here, assurance, something like that. -
Strange that is.
Thank you very much for any replies

Nov 8 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
by: JohnnyCJohnny | last post by:
Is it pretty safe to say that almost all web surfers now use browsers that are Frames compatible? What are most people using these days? IE? Thanks
54
by: Stefan Arentz | last post by:
I was just reading through some old articles in the 'Why not develop new language' thread and came across the finally debate. Everytime I mention 'finally' to C++ programmers I get almost...
6
by: Don Wash | last post by:
Hi All! I'm developing ASP.NET pages using VB.NET language. My background is VB6 and ASP3. Right now, I'm evaluating strategies on creating reusable and common functions and methods for ASP.NET....
26
by: Christophe Lohr | last post by:
Hi, Inside a program, I need to get some statistics about memory usage. I actually need figures given by the "ps -o vsr,rss" command. For the moment, I make a popen("ps...") followed of a...
77
by: berns | last post by:
Hi All, A coworker and I have been debating the 'correct' expectation of evaluation for the phrase a = b = c. Two different versions of GCC ended up compiling this as b = c; a = b and the other...
2
by: Wells | last post by:
Debate Simmering in US Over Regulation of Internet A heated debate is shaping up in Washington about a concept some activists are calling Internet network neutrality, known more popularly as net...
15
by: Juha Nieminen | last post by:
I'm sure this is not a new idea, but I have never heard about it before. I'm wondering if this could work: Assume that you have a common base class and a bunch of classes derived from it, and...
9
by: deerchao | last post by:
I'm developing a WinForms application. It slowly eats up memory, one client reported that it took 200MB or more, and finnaly crashed. I myself noticed it's common to use up 30MB memory, but if I...
26
by: rao | last post by:
On some of the compilers integer size is 2 and on some other it is 4 bytes. My doubt is who decides the size of the integer? is it plainly the compiler? Does OS or Processor also has any control...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.