ASP.NET WebForms Evaluation

J

John Rivers

Hello,

I am in the process of evaluating ASP.NET

So far I am not impressed at all.

It seems to me that a basic evaluation of the PROs and CONs
of using things like HTML Server Controls, Data Controls, User Controls
etc. all breaks down the same way: lots of cons very few pros.

I understand that microsoft wants to make their development environment
easy for beginners, but they seem to expect
professional developers to use this rubbish as well.

-------------------------------------------------------------------
DataGrid & UserControls
-------------------------------------------------------------------

Pros
----

- saves me having to spend 1 minute typing simple code (ie: loop and
method)
- apparently saves me from worrying about about format (yeah, right)

Cons
----

- stops me from using OO programming conventions for html rendering
- risk of change in newer versions of asp.net
- takes time to learn when we have suitable skills already (ie: we know
html and can write code)
- this sort of declarative / over-encapsulated approach always results
in messy workarounds
- very inefficient pagination implementation - couldn't use in
production server
- lots of extra files to worry about (usercontrols, datasets)
- ASPX pages don't compile until called so takes longer to debug

Am I the only one who will be avoiding these "features"?

John Rivers
 
G

Grant Merwitz

My thoughts
- stops me from using OO programming conventions for html rendering

How on earth does it stop that, You can control the HTML
If you don't like the web control html, use html controls
If you don't like the DataGrids html, user a repeater/datalist
Hell, build a for loop, it can be done
- risk of change in newer versions of asp.net

Changes are well documented.
You can run all versions of .net simultaneously for testing
Besides, if it weren't changing, then it wouldn't be getting better
- takes time to learn when we have suitable skills already (ie: we know
html and can write code)

you still need to know Html in ASP.NET
Codes evolving, so must you
- this sort of declarative / over-encapsulated approach always results
in messy workarounds

Messy workarounds = bad coding or design
Sounds like its the developer thats the problem, not the tool
- very inefficient pagination implementation - couldn't use in
production server

Is that cause you don't know how, or it wouldn't work
Custom paging is available if you don't like the built in paging
i.e. its optional, you can still use traditional paging methods
- lots of extra files to worry about (usercontrols, datasets)

A DataSet is not a file, its an object
Usercontrols are reusable, so it makes sense to be a seperate file

- ASPX pages don't compile until called so takes longer to debug

Thats only the first time its called, it has to be compiled some time
 
T

tom pester

Hi John,

Ic you have made an effort so I'll try to respond objectivly.
I programmed in classic ASP for 5 years and have 2 years of ASP.NET experience.
- saves me having to spend 1 minute typing simple code (ie: loop and
method)

Lets do the test. You tell me how long it takes to have a datagrid that can
do the following
- edit
- sort
- paginate
- and lets thorw in a master detail construction

Once I see your page I will remake it in asp.net with the exact same functionality
so throw in some stuff that you think the datagrid can't do cause if its
inflexibilty.

Maybe you have written your own functions in cASP that make this easier but
in effect you have written your own datagrid then.
And that doesn't count cause we are comparing cASP and APS.NET out of the
box.
- stops me from using OO programming conventions for html rendering

What are you refering to?
- risk of change in newer versions of asp.net

Simply not true. IMO microsoft innovates all the time and has always a clean
and easy upgrade path.
If you want to program ASP.NET the cASP style you can do this with no problem.
But then you are misssing _a lot_
- takes time to learn when we have suitable skills already (ie: we
know
html and can write code)

ASP.NET provides abstractions to improve your productivity. I also think
that if you start with ASP.NET your mental model will not be as elaborate
as if you started to program with the primitives we had in cASP.
But I know zero assambler and I can still make pretty websites with cASP
and I can do it faster with ASP.NET (extreme argument).
- this sort of declarative / over-encapsulated approach always results
in messy workarounds

If the asp.net team didn't do such a good job than this could be the case.
However, they did a good job so just throw in some things in the test that
you think will require workarounds.
This is not a fair test (aiming concsiously at the weak spot) but Ill take
you on.
- very inefficient pagination implementation - couldn't use in
production server

I agree. For small sets of data its adequate but for large sets its terribly
inefficient. Did you know you can provide your own custom pagination?
- lots of extra files to worry about (usercontrols, datasets)

Consider those files as building blocks of other pages. Putting them in User/Custom
controls also lets them have events,cache control,...
I also don't use them much, I'd rather write a function that I can call but
its a matter of taste.
(I dont use typed datasets cause I think its too much overhead. Again, don't
use them if you want to. They are there if you like 'm ok?)

Maybe other developers can clearly state what the advantages are of user
controls vs function calls and where they shine.
- ASPX pages don't compile until called so takes longer to debug

Very annoying indeed. Advice : Switch to ASP.NET version 2 now and continue
your evalution http://lab.msdn.microsoft.com/express/vwd/

I hope you aren't a troll and do the test with me cause I'm really intrested
in the outcome.
I haven't seen any metrics that compare cASP and ASP.NET so this is an oppertunity.


Cheers,
Tom Pester
 
E

Eliyahu Goldin

I understand that microsoft wants to make their development environment
easy for beginners, but they seem to expect
professional developers to use this rubbish as well.

You will probably get a number of arguing responses, but there is some truth
in your statement. After a few years of intensive programming in asp.net, I
found it much more efficient if you start a new page from an html prototype
and than add "runat=server" as needed. And a repeater with databound items
gives you much more flexibility than a datagrid.

Eliyahu
 
J

John Rivers

tom said:
Hi John,

Ic you have made an effort so I'll try to respond objectivly.
I programmed in classic ASP for 5 years and have 2 years of ASP.NET experience.


Lets do the test. You tell me how long it takes to have a datagrid that can
do the following
- edit
- sort
- paginate
- and lets thorw in a master detail construction

using my "core" knowledge of html, sql, c#, framework
about 40 minutes

there is no point in learning and using non-core, arbitrary junk code
that microsoft creates for marketing purposes

i cannot write a SqlDataConnection class in 40 minutes, it would take
weeks
that is why i use ADO.NET

i cannot write a blistering fast webserver in less than
12 months, so I use IIS

i cannot write a transactional component architecture
so I use MTS

this does not hold true for these silly controls - they are a waste of
time
and people who use them will pay the price
Once I see your page I will remake it in asp.net with the exact same functionality
so throw in some stuff that you think the datagrid can't do cause if its
inflexibilty.

yes and it will be 90% your code and 10% datagrid
so why not go the whole hog and write your own loop too! :)
Maybe you have written your own functions in cASP that make this easier but
in effect you have written your own datagrid then.
And that doesn't count cause we are comparing cASP and APS.NET out of the
box.


What are you refering to?

C# is the most beautiful OO language i have ever seen
it is delicious - i want to use its powers for my html
rendering classes - i know i can if i want but what
i am complaining about is that microsoft doesn't want me to!
it wants me to wrap what would be methods into user control files
that aren't .net classes, they are "user controls" i can't call
them when I want, they have to be "placed" on a "design surface"
I can't extend them, override them or anything them.
if anthing needs OO programming it is UI rendering.
this is all I ask:

to write this:

void RenderHTML(string Title) {
%><html>
<head>
<title><%=HTML(Title)%></title>
</head><%
}

in my aspx page
with html, xml, wml whatever code coloring and completion inside the
code block
with proper syntax check during build (for both c# and html,
javascript) and now
i can build my rendering library properly.

they could have done this easily - but they chose to force the issue
and make people use user controls which are a flawed concept.
Simply not true. IMO microsoft innovates all the time and has always a clean
and easy upgrade path.
If you want to program ASP.NET the cASP style you can do this with no problem.
But then you are misssing _a lot_


ASP.NET provides abstractions to improve your productivity. I also think
that if you start with ASP.NET your mental model will not be as elaborate
as if you started to program with the primitives we had in cASP.
But I know zero assambler and I can still make pretty websites with cASP
and I can do it faster with ASP.NET (extreme argument).

i don't make pretty websites, i make e-businesses that have to work
every second of every day for years on end with no hiccups
would i choose to use weird abstractions designed to make coding easy
for begineers which add complexity and non-determinism to my apps? nope
If the asp.net team didn't do such a good job than this could be the case.
However, they did a good job so just throw in some things in the test that
you think will require workarounds.
This is not a fair test (aiming concsiously at the weak spot) but Ill take
you on.


I agree. For small sets of data its adequate but for large sets its terribly
inefficient. Did you know you can provide your own custom pagination?

but then what is the datagrid doing?
just a loop ...
Consider those files as building blocks of other pages. Putting them in User/Custom
controls also lets them have events,cache control,...
I also don't use them much, I'd rather write a function that I can call but
its a matter of taste.
(I dont use typed datasets cause I think its too much overhead. Again, don't
use them if you want to. They are there if you like 'm ok?)

if only it were that easy
the fact that they are there means I HAVE TO LEARN them
it is forced on me, that is why i am a "troll" today
i don't like being forced to learn junk
 
T

tom pester

Hello John,
using my "core" knowledge of html, sql, c#, framework about 40 minutes
this does not hold true for these silly controls - they are a waste of
time
and people who use them will pay the price

My first estemate is that I am 4 to 8 times faster. I don't want to make
it a "I am faster than you" contest. But I guess I just did :)
I still want to do the test if you are serious about it. If you give me a
working cASP page Ill make it an ASP.NET one _without_ compromsing.
Why are you saying its a waste of time? The datagrid is suited for the majority
of cases. If it is such a case than use it and be more productive.
If I need something different than a datagrid than I check out the datalist
or repeater. Only then I will write my own rs.MoveNext wheel.
yes and it will be 90% your code and 10% datagrid
so why not go the whole hog and write your own loop too! :)

You still want to do the test?
it wants me to wrap what would be methods into user control files
that aren't .net classes,

A user control _is_ a .net class that you express in a way that is exrpressed
in a way that is related to the problem domain.
( You can also write a custom control that looks exactly like a class )
if anthing needs OO programming it is UI rendering.
this is all I ask:
to write this:

void RenderHTML(string Title) {
%><html>
<head>
<title><%=HTML(Title)%></title>
</head><%
}
in my aspx page
with html, xml, wml whatever code coloring and completion inside the
code block
with proper syntax check during build (for both c# and html,
javascript) and now
i can build my rendering library properly.
they could have done this easily - but they chose to force the issue
and make people use user controls which are a flawed concept.

Switching to asp.net and finding that my render functions didn't work was
a pain indeed.
I used them all the time and now I had to write :
response.write("<head>")
instead of
<head>

Big deal? Maybe. Now that I write lots of .net code I don't mind.

You can still write the functions you are talking about so what's the poblem?

BTW Interspersing html and code this way did introduce a performance hit.
i don't make pretty websites, i make e-businesses that have to work
every second of every day for years on end with no hiccups
would i choose to use weird abstractions designed to make coding easy
for begineers which add complexity and non-determinism to my apps?
nope

Using superb controls that

- have been stress tested
- are virtualy bug free (you could do it better I know ;)
- are tested for security holes by good engineers and are scrutinized by
a community of thousands
- are extensible
- are free
- cooperate with other controls
- support caching
(-the asp.net v2 gridview does also do ajax pagination)

ere defenitly nice to have. Just use them where appropriate and you will
have more time to make a better site (or make more sites if its up to your
manager).

I have a feeling you only read about ASP.NET.
Did you actualy try to make a site with the controls just like in the days
you first discovered cASP and were an asp noob? Are do you approuch the subject
not open minded?
but then what is the datagrid doing?
just a loop ...

A Loop yes. A loop with built in edit support. Ow and sorting. Ah yes and
caching support too. And you can select a row too yes...etc
Its more than a loop John. See some of the properties that controls have
in my previous remark.
the fact that they are there means I HAVE TO LEARN them
it is forced on me, that is why i am a "troll" today
i don't like being forced to learn junk

Ok then. Try to convince your co-workers why they are bad design and stay
away from controls as for as you can.

Enough throwing arguments on the table for me. If you want to do the test
than lets to it through email and report back here.
If not than these are just words.

Switching to a new technology is always an experience. You start with an
attitude that you know everything and you see less experienced developers
getting up to speed much faster than you did using these abstractions. So
you check them out, dont fully understand the potential and go your own way.
Than you find a case where you indeed are more productive with the technology
and while using it find another suitable case. After some time you assimilate
it in your workflow and start doing everything with the new technology. You
are testing it to its limits.
Some time later you clearly see the overal picture and understand the potential
of the new technology and use it where appropriate.

Cheers,
Tom Pester
 
J

John Rivers

Hi Bork,

I like your funky approach to newsgroups, please see my replies below:

-> why don't you use a stylesheet???

i use an inline stylesheet, i don't like external ones

-> who did the design, it is really ugly ??

there is no design - it is a functional intranet for making money

-> what is the reason to block the context menu, aren't the users
allowed to
see you html code, if true, why, are you ashamed of it?

it is a re-usable popup menu that appears when you click a link
(like right click in windows)

-> why do you use ' and " in the same javascript strings ???

that is javascript string literals, you can do this: 'hello"there' or
this "hello'there" (rtfm!)

-> whats with the <!----> blocks...

i like them

-> why use ../ and https://some.url.com/50080, stick to ../ ?

there is very good reason
the fully qualified urls are from a class library that decides whether
to switch between http and https depending on certain factors

the / links are generated by self-referencing urls that wish to
maintain
the current ssl status whether http or https

when developing web apps which use ssl there are special
guidelines you have to follow regarding links, actions, images and
redirects

most people don't know them, which is why you get ssl warnings on
many websites - but not mine!

-> why don't you use the correct port for https trafic (but this can be
a
valid usage)

this is a private intranet application - you should never host such
an application on the correct well-known port for obvious reasons

-> where's the actual asp code, I only see the html output...

i can't give out my code, it belongs to the customer

-> was it frontpage or another crappy tool you used to create this?

ha ha - no way, HAND CRAFTED MAN!

this is my very first post in this newsgroup, so be honered :)

I am honoured!

Just out of interest how many years commercial experience do you have
(ie: building systems that can't go down for even 10 minutes and are
used
24x7 by thousands of users and form the core of a business?)
 
G

Guest

Just out of interest how many years commercial experience do you have
(ie: building systems that can't go down for even 10 minutes and are
used
24x7 by thousands of users and form the core of a business?)

well long enough to know the difference betweed an object oriented language
and a procedural language....

Please learn .net before you deside it's evil. Since I moved from Classic
ASP to .Net I've learned so much more....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Controls v HTML 30
ASP.NET 2.0 vs. XSLT 9
Atlas vs ASP.NET Callback 5
Ignoring the ASP.NET conventions... 14
html and asp.net 2
winforms vs webforms 5
Master pages, templates, inheritance 3
Language Confusion 2

Top