Ignoring the ASP.NET conventions...

J

jufemaiz: jc

Is there any information out there on ignoring the desktop oriented
conventions of ASP.NET and developing web app's more in line with
traditional web app development. I need far more control over the x/
html output environment than ASP.NET is currently giving me (coming
from PHP + RoR background) - custom iteration over object groups,
inline controls within those iterators, linking *without* resorting to
client side javascript based form submission, "page as a single form"
desktop application method, mixing of html elements (form) to activate
server side alterations, altering information in the html > head
section of a page directly (there's got to be a way to do this).

Anyone, help?
 
C

clintonG

I don't understand some of your terminology but here's some insight...

** We can control the output of the XHTML with declarations written into the
web.config file. The same can be done when using Visual Studio 2005.

** Iteration over objects and your other concerns just confused me as stated
but are generally understood as tasks performed with program logic using
your preferred language which common sense and contemporary trends suggests
should now be C#.

** ASP.NET Forms are in fact a single form.

** The head element and all of its contents can be created at will, edited
at will and managed at will using various classes in the framework.

What you need to do is what the rest of us have done: learn more about the
framework. Its humonguos and for awhile the big thing most of us related to
with one another was our mutual experience writing many lines of code when
in fact there was a class with methods in the frasmework mostly already
written for us. That's where you're at now. My best advice? Delve into the
documentation noting the latest ASP.NET documentation is at the subdomain
msdn2.microsoft.com.

Microsoft uses consistent terminology for their documentation and
knowledgebase documents. The word "overview" and other similar word are the
words you want to start with submitted to google or wherever used like
this...

// example 1
page lifecycle overview site:msdn2.microsoft.com

// example 2
htmlmeta class site:msdn2.microsoft.com

// example 3
3.0 site:msdn2.microsoft.com

Once you get the search results when we load one of the references such as
the page for the HtmlMeta class the menu which loads on the left of the page
must be consulted where you can find all other related links to the head
element for example.

You see, for the most part its about learning the correct terminology for
the .NET Framework and then using the documentation that will help you get
through this learning curve...

-
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
 
J

jufemaiz: jc

I don't understand some of your terminology but here's some insight...

** We can control the output of the XHTML with declarations written into the
web.config file. The same can be done when using Visual Studio 2005.

** Iteration over objects and your other concerns just confused me as stated
but are generally understood as tasks performed with program logic using
your preferred language which common sense and contemporary trends suggests
should now be C#.

** ASP.NET Forms are in fact a single form.

** The head element and all of its contents can be created at will, edited
at will and managed at will using various classes in the framework.

What you need to do is what the rest of us have done: learn more about the
framework. Its humonguos and for awhile the big thing most of us related to
with one another was our mutual experience writing many lines of code when
in fact there was a class with methods in the frasmework mostly already
written for us. That's where you're at now. My best advice? Delve into the
documentation noting the latest ASP.NET documentation is at the subdomain
msdn2.microsoft.com.

Microsoft uses consistent terminology for their documentation and
knowledgebase documents. The word "overview" and other similar word are the
words you want to start with submitted to google or wherever used like
this...

// example 1
page lifecycle overview site:msdn2.microsoft.com

// example 2
htmlmeta class site:msdn2.microsoft.com

// example 3
3.0 site:msdn2.microsoft.com

Once you get the search results when we load one of the references such as
the page for the HtmlMeta class the menu which loads on the left of the page
must be consulted where you can find all other related links to the head
element for example.

You see, for the most part its about learning the correct terminology for
the .NET Framework and then using the documentation that will help you get
through this learning curve...

-
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URLhttp://clintongallagher.metromilwaukee.com/

Kind of, but not really. Again, from a background in web development
MS appears to have opted to effectively shaft web standards with this
(naming conventions of elements, use of x/html elements as backend
control elements etc)

I'm yet to find any instance of a iterators for output code with the
level of dexterity I want, while attempting some form of separation of
object control code from markup code. I've looked at repeaters, and
that's as close as I can get, but I still can't put inline controls
(if/if-else statements) within the repeater without pulling it away
from the markup code and into the object control code. What is the
model (ala Rails, Django etc's MCV methodology) that ASP.NET follows,
because it seems an incoherent mashup. Not really model focussed, nor
view focussed, nor, really, control focussed, but rather everything
mashed together. The classes you refer to are fine in an environment
where there isn't a great deal of flexibility in controls (read that
as "desktop applications") when compared with x/html elements. I don't
want tables everywhere, I want graceful semantic code.

Again, I want to know why there is the reliance on client side
javascript to activate forms all the time (using the classes etc you
refer to). Also, who in their right mind made an x/html element a
backend control element (the form runat="server") when semantically
forms (plural *or* singular) may not be needed on the page. The
ASP.NET terminology is not designed for the web at all, and nor does
it want its users to actually be educated in web technologies (as I
can see by so many of the questions being asked in this group), the
concept of graceful degradation (or progressive enhancement), real
understanding of the separation of client side behaviour, styling and
markup from server side operations. Sites should *not* rely on
javascript and styling to ensure that they can still be used. Nice to
add in to make it pretty, and to give the user a better experience,
sure, but not absolutely necessary.

The approach is driving me nuts, because of this drag and drop,
wysiwyg, don't understand the fundamentals because "classes will take
care of it" (but if you want something slightly beyond simple tabular
data, or the occasional repeater, and keep code easily understood and
maintainable it seems like the effort required is phenomenal, even for
simple things).
 
A

Aidy

If only you spent as much time learning as you did ranting.
I'm yet to find any instance of a iterators for output code with the
level of dexterity I want

<asp:Literal ID="MyWebPage" runat="server">Generate your entire page
here</Literal>

That will let you do "old style" web development where you build up your
output as a concatinated string and dump it to the response stream. Your
code will, of course, be unmaintainable rubbish.
I don't want tables everywhere

So don't use them.
Again, I want to know why there is the reliance on client side
javascript to activate forms all the time

There isn't, you can disable autopostback (see first comment in this post).
Also, who in their right mind made an x/html element a
backend control element (the form runat="server") when semantically
forms (plural *or* singular) may not be needed on the page.

So don't include one. Only certain elements must be inside a FORM. If your
control isn't a form control it can sit outside a FORM. VS just adds the
FORM element for you as part of the default page, there is nothing stopping
you removing it (see first comment in this post) or adding more yourself
(although you can only have one that has runat="server")
..
ASP.NET terminology is not designed for the web at all

That's the desired affect. It gives desktop programmers a consistant
environment where they needn't learn the ins and outs of HTML and how the
web works. If, however, you *do* know the ins and outs that is an
advantage.
The approach is driving me nuts, because of this drag and drop,
wysiwyg

I don't use the drag and drop wysiwyg and I'm sure more regular posters on
this site are the same. Just cos MS give you a tool doesn't mean you *have*
to use it.
but if you want something slightly beyond simple tabular
data, or the occasional repeater, and keep code easily understood and
maintainable it seems like the effort required is phenomenal, even for
simple things

I disagree. Now why don't you use classic ASP or PHP and leave this forum
for people who want to move as technology moves?
 
M

Mark Rae

If only you spent as much time learning as you did ranting.

This isn't the first person I've encountered who thinks they're a bit of a
whizz with "traditional" web development, only to find that ASP.NET and the
Framework represents a *huge* learning curve... Most simply knuckle down and
get on with it, but occasionally some do give up because it's too hard for
them...
I don't use the drag and drop wysiwyg and I'm sure more regular posters on
this site are the same.

I certainly never use it...
Just cos MS give you a tool doesn't mean you *have* to use it.

Indeed. Two areas of functionality in ASP.NET which I *never* use are
validation controls (I have my own set of JavaScript validation routines)
and SqlDataSource / ObjectDataSource (I have my own lightweight DAL)...
 
K

Kevin Spencer

Kind of, but not really. Again, from a background in web development
MS appears to have opted to effectively shaft web standards with this
(naming conventions of elements, use of x/html elements as backend
control elements etc)

I have built a number of ASP.Net web applications that are completely in
line with W3C standards for XHTML, CSS, and scripting. I'm not sure what
other "standards" you may be referring to, but if you're referring to W3C
standards, you're way wrong. The fact that you *can* build ASP.Net web sites
that are not standards-adherent is simply a reflection of the flexibility of
the technology. You *can* create any HTTP output you want with ASP.Net, and
have full control over it.
I'm yet to find any instance of a iterators for output code with the
level of dexterity I want, while attempting some form of separation of
object control code from markup code. I've looked at repeaters, and
that's as close as I can get, but I still can't put inline controls
(if/if-else statements) within the repeater without pulling it away
from the markup code and into the object control code. What is the
model (ala Rails, Django etc's MCV methodology) that ASP.NET follows,
because it seems an incoherent mashup. Not really model focussed, nor
view focussed, nor, really, control focussed, but rather everything
mashed together.

What is the "model" that C++ follows? Answer: none. C++ is a technology, not
an architecture. It is the same with ASP.Net. You may use any architectural
models and patterns that you wish. It is up to you to implement them. Some
are suggested. Some are even supported. But none are dictated. That is not
the purview of a technology.
The classes you refer to are fine in an environment
where there isn't a great deal of flexibility in controls (read that
as "desktop applications") when compared with x/html elements. I don't
want tables everywhere, I want graceful semantic code.

There are many classes available in the CLR, as well as the complete freedom
to create your own Controls and have complete control over what output they
generate. Again, the fact that the menu is large does not imply that you
can't order what you want from it, a al carte, if you wish.
Again, I want to know why there is the reliance on client side
javascript to activate forms all the time (using the classes etc you
refer to). Also, who in their right mind made an x/html element a
backend control element (the form runat="server") when semantically
forms (plural *or* singular) may not be needed on the page.

An HtmlControl is simply a tool. It is useful for various things, if you
understand what it is, and how it works. Like any other tool, it is designed
with certain purposes in mind. However, one can use a wrench to drive nails
if one so chooses, or if one does not know what a wrench is, or what it is
designed to be used for. This is not a reflection on the tool, but on the
user of the tool.
The
ASP.NET terminology is not designed for the web at all, and nor does
it want its users to actually be educated in web technologies (as I
can see by so many of the questions being asked in this group),

The fact that there are many ignorant people asking questions in these
newsgroups is simply due to the nature of the newsgroups. After all, people
who know the answers are not likely to be asking for them. Ignorance is a
condition that is remedied by investigation and by asking the right
questions. The idea that one can evaluate a technology by observing the
behavior those who are ignorant of the technology is simply illogical.
the
concept of graceful degradation (or progressive enhancement), real
understanding of the separation of client side behaviour, styling and
markup from server side operations. Sites should *not* rely on
javascript and styling to ensure that they can still be used. Nice to
add in to make it pretty, and to give the user a better experience,
sure, but not absolutely necessary.

JavaScript is entirely unnecessary in many cases, and ASP.Net technology
does not dictate the use of it. On the other hand, JavaScript is widely
accepted, supported by every browser manufactured, and used for a great
variety of purposes. Ajax, for example, could not exist without it. The idea
that there is something "impure" or inherently wrong with using JavaScript,
particularly in an interactive web application, is illogical.
The approach is driving me nuts, because of this drag and drop,
wysiwyg, don't understand the fundamentals because "classes will take
care of it" (but if you want something slightly beyond simple tabular
data, or the occasional repeater, and keep code easily understood and
maintainable it seems like the effort required is phenomenal, even for
simple things).

When you speak of "drag and drop" and "wysiwyg" you are not talking about
ASP.Net; you are talking about Visual Studio. Visual Studio is a tool set
for creating ASP.Net web applications. It has many tools for many purposes.
Again, the key to effective use of the tool set is understanding what each
tool is, what it is designed for, and how to use it properly. The fact that
any tool can be abused is common to all tools, and therefore irrelevant.

As for "don't understand the fundamentals...." the various SDKs and
documentation are designed for a wide audience, from those who have never
programmed before to those who have professionally programmed for years.
Therefore, there is plenty of documentation designed to get a new user with
no experience up and running, as well as low-level, technical documentation,
and everything in between. Apparently, as you are a new user of the
technology, you have not had the opportunity to dig deeply into it, and have
been looking at the beginner stuff.

It is up to the individual to self-educate and dig more deeply into the
technical details; it is not the responsibility of the documentation.
Microsoft has always created documentation that included "Getting Started"
types of articles designed to help new programmers get started without
getting entirely frustrated. This is commendable, especially when one
considers the sheer technical depth of technologies like the .Net Platform
and ASP.Net.

On the other hand, try downloading and installing the entire MSDN Library
some time. It is perhaps a half-dozen gigabytes of mostly HTML text in size.
The "Getting Started" and beginner-level stuff is just the tip of the
iceberg. You sound like you want to plumb the depths of it. That's a good
thing. But jumping to conclusions without knowledge does not make one a good
programmer.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
M

Mythran

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,

Printing Components, Email Components....ALL made in TAIWAN!

--

Sorry...had too :p Doesn't really come out the way it does in 'Armageddon'
(the movie).

Mythran
 
M

Mythran

Mark Rae said:
'had too' ???

Yeah, it's from the movie 'Armageddon'. The russian guy says, "American
components, Russian components, ALL MADE IN TAIWAN..then continues to beat
on the Taiwan made American components... :)

Mythran
 
M

Mark Rae

Yeah, it's from the movie 'Armageddon'. The russian guy says, "American
components, Russian components, ALL MADE IN TAIWAN..then continues to beat
on the Taiwan made American components... :)


Yes, I understand that, but what do you mean by "had too"...?
 
T

Timbo

I don't want tables everywhere, I want graceful semantic code.

When you say this do you mean that some of the controls in .net render
their output as table's which you are not happy about? If so then
there are the .NET CSS Friendly Content Adapters which can convert
some of the somewhat messy asp.net controls like ASP:Menu into the
kind of semantic code you desire (i.e. an unordered list of links for
example)

I'm by no means an expert from this point of .net but i do believe you
can change the code each control renders using such adapters freely
available within the community or by writing your own if you know
how. I'm sure someone will be able to correct me on this if i've got
this slightly wrong.
 
A

Alan Silver

When you say this do you mean that some of the controls in .net render
their output as table's which you are not happy about? If so then
there are the .NET CSS Friendly Content Adapters which can convert
some of the somewhat messy asp.net controls like ASP:Menu into the
kind of semantic code you desire (i.e. an unordered list of links for
example)

I'm by no means an expert from this point of .net but i do believe you
can change the code each control renders using such adapters freely
available within the community or by writing your own if you know
how. I'm sure someone will be able to correct me on this if i've got
this slightly wrong.

Do you have any more info on this? I would be very interested in
standards-friendly controls, as I have had to rewrite some stuff myself
to get around MS' love of table-based layout.

TIA
 
A

Alan Silver

Kevin Spencer said:
The fact that there are many ignorant people asking questions in these
newsgroups is simply due to the nature of the newsgroups.

I presume your use of the word "ignorant" here refers simply to a low
level of knowledge, and was not meant in an insulting manner. Many of
the people that ask questions here are highly intelligent, and are
attempting to research the topic. Just because they don't have the
knowledge or experience of the subject matter does not make them
ignorant in the derogatory sense of the word.

My apologies if you meant this in the first place, but I don't want any
newbies reading this and thinking they're going to be treated like
stupid idiots just for asking basic questions.

Ta ra
 

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

Top