473,385 Members | 1,912 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,385 software developers and data experts.

Why ASP.NET MVC?

I happened to see this asp.net MVC tutorial at

http://www.asp.net/learn/mvc/tutorial-01-cs.aspx

Indeed as the author says it is gonna look like classic ASP at the
very beginning of this tutorial.

I think form post with an action (which is classic asp style) like

<form method="post" action="/Home/CreateNew">
the form to be posted goes here.
</form>

is OK to me, but as soon as I see embedded curly braces and ifs and
else's inside <% and %>, I am determined that I wanna stay far from
it.

I think embedding codes inside <% and %like that of classic ASP and
JSP is notoriously hard to read and difficult to maintain, and error-
prone.

To my understanding, part of struts' functionality is to embedded
codes in JSP. I don't know why people wanna revert back to the old
coding style with asp.net mvc and your input is appreciated.

Or is it the case that such embeddings are not necessary with asp.net
MVC? If yes, then it may be worth looking into a little.

I searched a little in this group and found this:

http://groups.google.com/group/micro...307ade5b2463d5
Oct 20 '08 #1
13 1390
On Oct 20, 12:13*pm, Author <gnewsgr...@gmail.comwrote:
I happened to see this asp.net MVC tutorial at

http://www.asp.net/learn/mvc/tutorial-01-cs.aspx

Indeed as the author says it is gonna look like classic ASP at the
very beginning of this tutorial.

I think form post with an action (which is classic asp style) like

<form method="post" action="/Home/CreateNew">
* the form to be posted goes here.
</form>

is OK to me, but as soon as I see embedded curly braces and ifs and
else's inside <% and %>, I am determined that I wanna stay far from
it.

I think embedding codes inside <% and %like that of classic ASP and
JSP is notoriously hard to read and difficult to maintain, and error-
prone.

To my understanding, part of struts' functionality is to embedded
codes in JSP. *I don't know why people wanna revert back to the old
coding style with asp.net mvc and your input is appreciated.

Or is it the case that such embeddings are not necessary with asp.net
MVC? *If yes, then it may be worth looking into a little.

I searched a little in this group and found this:

http://groups.google.com/group/micro...framework.aspn...
Correction:

<quote>
To my understanding, part of struts' functionality is to embedded
codes in JSP.
</quote>

should read

To my understanding, part of struts' functionality is to get rid of
embedded
codes in JSP.
Oct 20 '08 #2
casual web developers will probably stay with webforms. you switch to mvc
when any of the following are important enough to switch:

1) you are unit test developer (use test first design)
2) are tried of webforms "fake" and complex event model.
3) are writing lots of javascript and tired of id's changing, and want
standard html components.
4) want better seperation of view and controller code.
5) want a ruby on rails coding experience (mvc is easier with a dynamic
language like ironpython, ironruby or javascript)
6) you are commited to the mvc pattern, and want a supported platform
7) you switched to jQuery (see #3)
8) your web site is going to be large and complex.
-- bruce (sqlwork.com)
"Author" wrote:
On Oct 20, 12:13 pm, Author <gnewsgr...@gmail.comwrote:
I happened to see this asp.net MVC tutorial at

http://www.asp.net/learn/mvc/tutorial-01-cs.aspx

Indeed as the author says it is gonna look like classic ASP at the
very beginning of this tutorial.

I think form post with an action (which is classic asp style) like

<form method="post" action="/Home/CreateNew">
the form to be posted goes here.
</form>

is OK to me, but as soon as I see embedded curly braces and ifs and
else's inside <% and %>, I am determined that I wanna stay far from
it.

I think embedding codes inside <% and %like that of classic ASP and
JSP is notoriously hard to read and difficult to maintain, and error-
prone.

To my understanding, part of struts' functionality is to embedded
codes in JSP. I don't know why people wanna revert back to the old
coding style with asp.net mvc and your input is appreciated.

Or is it the case that such embeddings are not necessary with asp.net
MVC? If yes, then it may be worth looking into a little.

I searched a little in this group and found this:

http://groups.google.com/group/micro...framework.aspn...

Correction:

<quote>
To my understanding, part of struts' functionality is to embedded
codes in JSP.
</quote>

should read

To my understanding, part of struts' functionality is to get rid of
embedded
codes in JSP.
Oct 20 '08 #3
On Oct 20, 2:17*pm, bruce barker
<brucebar...@discussions.microsoft.comwrote:
casual web developers will probably stay with webforms. you switch to mvc
when any of the following are important enough to switch:

1) you are unit test developer (use test first design)
2) are tried of webforms "fake" and complex event model.
3) are writing lots of javascript and tired of id's changing, and want
standard html components.
4) want better seperation of view and controller code. *
5) want a ruby on rails coding experience (mvc is easier with a dynamic
language like ironpython, ironruby or *javascript)
6) you are commited to the mvc pattern, and want a supported platform
7) you switched to jQuery *(see #3)
8) your web site is going to be large and complex.

-- bruce (sqlwork.com)

"Author" wrote:
On Oct 20, 12:13 pm, Author <gnewsgr...@gmail.comwrote:
I happened to see this asp.net MVC tutorial at
>http://www.asp.net/learn/mvc/tutorial-01-cs.aspx
Indeed as the author says it is gonna look like classic ASP at the
very beginning of this tutorial.
I think form post with an action (which is classic asp style) like
<form method="post" action="/Home/CreateNew">
* the form to be posted goes here.
</form>
is OK to me, but as soon as I see embedded curly braces and ifs and
else's inside <% and %>, I am determined that I wanna stay far from
it.
I think embedding codes inside <% and %like that of classic ASP and
JSP is notoriously hard to read and difficult to maintain, and error-
prone.
To my understanding, part of struts' functionality is to embedded
codes in JSP. *I don't know why people wanna revert back to the old
coding style with asp.net mvc and your input is appreciated.
Or is it the case that such embeddings are not necessary with asp.net
MVC? *If yes, then it may be worth looking into a little.
I searched a little in this group and found this:
>http://groups.google.com/group/micro...framework.aspn....
Correction:
<quote>
To my understanding, part of struts' functionality is to embedded
codes in JSP.
</quote>
should read
To my understanding, part of struts' functionality is to get rid of
embedded
codes in JSP.
Thank you very much for sharing. Could you say something about the
main disadvantage of ASP.NET MVC?

Also, is there a way to avoid embedding codes inside <% and %>?

Thanks a lot.
Oct 20 '08 #4
It is very Rails like. It is designed to completely separate UI from
business rules and data access. This works if you just consider the actual
painting of the form UI. If you consider the entire wb application to be UI,
then most of the examples are still doing horrible on separation of
concerns, although the code is not in the actual UI element (whether ASPX or
otherwise).

I am not sure whether MVC will take off. I suspect not until the tools catch
up with the ASP.NET team. After that, I think it will take off, but only
time will tell.

As for the why? ASP.NET needed its rails. ;-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"Author" <gn********@gmail.comwrote in message
news:83**********************************@a18g2000 pra.googlegroups.com...
>I happened to see this asp.net MVC tutorial at

http://www.asp.net/learn/mvc/tutorial-01-cs.aspx

Indeed as the author says it is gonna look like classic ASP at the
very beginning of this tutorial.

I think form post with an action (which is classic asp style) like

<form method="post" action="/Home/CreateNew">
the form to be posted goes here.
</form>

is OK to me, but as soon as I see embedded curly braces and ifs and
else's inside <% and %>, I am determined that I wanna stay far from
it.

I think embedding codes inside <% and %like that of classic ASP and
JSP is notoriously hard to read and difficult to maintain, and error-
prone.

To my understanding, part of struts' functionality is to embedded
codes in JSP. I don't know why people wanna revert back to the old
coding style with asp.net mvc and your input is appreciated.

Or is it the case that such embeddings are not necessary with asp.net
MVC? If yes, then it may be worth looking into a little.

I searched a little in this group and found this:

http://groups.google.com/group/micro...307ade5b2463d5

Oct 20 '08 #5
"bruce barker" <br*********@discussions.microsoft.comwrote in message
news:98**********************************@microsof t.com...
casual web developers will probably stay with webforms. you switch to mvc
when any of the following are important enough to switch:

1) you are unit test developer (use test first design)
Bruce, MVC isn't the only way to do TDD with ASP.NET. Mostly, just don't
allow any business logic on a page, and the largest part of the problem is
solved. There's nothing left after that than pure UI testing.
2) are tried of webforms "fake" and complex event model.
3) are writing lots of javascript and tired of id's changing, and want
standard html components.
There are ways to address the id changing problem. Our product uses huge
amounts of JavaScript, has done for years, and does not have problems with
ids changing. It's not the only product I know of that does so, either.

In fact, you surely cannot be under the impression that during the more than
seven years that ASP.NET has been out there that nobody has been doing
large, complex JavaScript.
4) want better seperation of view and controller code.
Again, many ways to skin that cat.
5) want a ruby on rails coding experience (mvc is easier with a dynamic
language like ironpython, ironruby or javascript)
6) you are commited to the mvc pattern, and want a supported platform
7) you switched to jQuery (see #3)
8) your web site is going to be large and complex.
Our enterprise web applications are very large and complex, and are built
with standard ASP.NET controls, and, again, have done for years.

I'm sure that ASP.NET MVC will be great for those who think that ASP.NET MVC
is great. I just hope we don't get another case of the "Web Site" problem,
where Microsoft decided that we all should be creating Web Sites instead of
Web Application Projects.

--
John Saunders | MVP - Connected System Developer

Oct 20 '08 #6
Gregory A. Beamer (Cowboy) - MVP wrote:
It is very Rails like. It is designed to completely separate UI from
business rules and data access. This works if you just consider the actual
painting of the form UI. If you consider the entire wb application to be UI,
then most of the examples are still doing horrible on separation of
concerns, although the code is not in the actual UI element (whether ASPX or
otherwise).

I am not sure whether MVC will take off. I suspect not until the tools catch
up with the ASP.NET team. After that, I think it will take off, but only
time will tell.

As for the why? ASP.NET needed its rails. ;-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"Author" <gn********@gmail.comwrote in message
news:83**********************************@a18g2000 pra.googlegroups.com...
I happened to see this asp.net MVC tutorial at

http://www.asp.net/learn/mvc/tutorial-01-cs.aspx

Indeed as the author says it is gonna look like classic ASP at the
very beginning of this tutorial.

I think form post with an action (which is classic asp style) like

<form method="post" action="/Home/CreateNew">
the form to be posted goes here.
</form>

is OK to me, but as soon as I see embedded curly braces and ifs and
else's inside <% and %>, I am determined that I wanna stay far from
it.

I think embedding codes inside <% and %like that of classic ASP and
JSP is notoriously hard to read and difficult to maintain, and error-
prone.

To my understanding, part of struts' functionality is to embedded
codes in JSP. I don't know why people wanna revert back to the old
coding style with asp.net mvc and your input is appreciated.

Or is it the case that such embeddings are not necessary with asp.net
MVC? If yes, then it may be worth looking into a little.

I searched a little in this group and found this:

http://groups.google.com/group/micro...307ade5b2463d5
It looks like mvc will be included in future releases of the .net
framework. since scott guthrie has a few blogs about it, I'd assume
that his team is seriously working on it.

OK, MVC may be a good idea, but can we avoid embedding our codes in
the markup with <% and %>? Are we gonna have a struts for asp.net
mvc?
Oct 21 '08 #7
Gregory A. Beamer (Cowboy) - MVP wrote:
It is very Rails like. It is designed to completely separate UI from
business rules and data access. This works if you just consider the actual
painting of the form UI. If you consider the entire wb application to be UI,
then most of the examples are still doing horrible on separation of
concerns, although the code is not in the actual UI element (whether ASPX or
otherwise).

I am not sure whether MVC will take off. I suspect not until the tools catch
up with the ASP.NET team. After that, I think it will take off, but only
time will tell.

As for the why? ASP.NET needed its rails. ;-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"Author" <gn********@gmail.comwrote in message
news:83**********************************@a18g2000 pra.googlegroups.com...
I happened to see this asp.net MVC tutorial at

http://www.asp.net/learn/mvc/tutorial-01-cs.aspx

Indeed as the author says it is gonna look like classic ASP at the
very beginning of this tutorial.

I think form post with an action (which is classic asp style) like

<form method="post" action="/Home/CreateNew">
the form to be posted goes here.
</form>

is OK to me, but as soon as I see embedded curly braces and ifs and
else's inside <% and %>, I am determined that I wanna stay far from
it.

I think embedding codes inside <% and %like that of classic ASP and
JSP is notoriously hard to read and difficult to maintain, and error-
prone.

To my understanding, part of struts' functionality is to embedded
codes in JSP. I don't know why people wanna revert back to the old
coding style with asp.net mvc and your input is appreciated.

Or is it the case that such embeddings are not necessary with asp.net
MVC? If yes, then it may be worth looking into a little.

I searched a little in this group and found this:

http://groups.google.com/group/micro...307ade5b2463d5
It looks like mvc will be included in future releases of the .net
framework. since scott guthrie has a few blogs about it, I'd assume
that his team is seriously working on it.

OK, MVC may be a good idea, but can we avoid embedding our codes in
the markup with <% and %>? Are we gonna have a struts for asp.net
mvc?
Oct 21 '08 #8
the mvc pattern is very old, and pretty tried and true and its great
that microsoft has finally discovered it after all these years.

if you do not see the benefits of the mvc pattern then by all means
stick with webforms. they are bound to be the most common coding practice.

the controller is not the business layer. its the conduit to the
business layer. it supplies actions to the business layer, but should
not be part of it.

another approach is to combine mvc with a dynamic language and get the
ruby on rails productivity for a database driven site.

-- bruce (sqlwork.com)
John Saunders wrote:
"bruce barker" <br*********@discussions.microsoft.comwrote in message
news:98**********************************@microsof t.com...
>casual web developers will probably stay with webforms. you switch to mvc
when any of the following are important enough to switch:

1) you are unit test developer (use test first design)

Bruce, MVC isn't the only way to do TDD with ASP.NET. Mostly, just don't
allow any business logic on a page, and the largest part of the problem
is solved. There's nothing left after that than pure UI testing.
>2) are tried of webforms "fake" and complex event model.
3) are writing lots of javascript and tired of id's changing, and want
standard html components.

There are ways to address the id changing problem. Our product uses huge
amounts of JavaScript, has done for years, and does not have problems
with ids changing. It's not the only product I know of that does so,
either.

In fact, you surely cannot be under the impression that during the more
than seven years that ASP.NET has been out there that nobody has been
doing large, complex JavaScript.
>4) want better seperation of view and controller code.

Again, many ways to skin that cat.
>5) want a ruby on rails coding experience (mvc is easier with a dynamic
language like ironpython, ironruby or javascript)
6) you are commited to the mvc pattern, and want a supported platform
7) you switched to jQuery (see #3)
8) your web site is going to be large and complex.

Our enterprise web applications are very large and complex, and are
built with standard ASP.NET controls, and, again, have done for years.

I'm sure that ASP.NET MVC will be great for those who think that ASP.NET
MVC is great. I just hope we don't get another case of the "Web Site"
problem, where Microsoft decided that we all should be creating Web
Sites instead of Web Application Projects.
Oct 21 '08 #9
there are couple disadvantages with mvc

1) no UI designer tools for it at this point.
2) requires good understanding of anonymous function and lambda
expressions to take full use of it.
3) coding is harder with a highly typed languages like c# and vb.net,
but dynamic style features are being added to these languages.
4) requires you know the mvc pattern and has a littler longer learning
curve.
5) doesn't attempt to hide the stateless nature of a web site from the
coder.
why <% %>?

its because of the limitations of the asp.net control syntax. all it
allows are name value pairs (properties) which are strongly typed. in
mvc generally you want messages for the parameter value, and asp.net
control syntax will not cut it.

you could easily write some asp.net server controls that called the html
helper function at render, but you'd end up restricting the binding
syntax, so that you had to use codebehind code, and you really don't
want codebehind code in a view.

-- bruce (sqlwork.com)
Author wrote:
On Oct 20, 2:17 pm, bruce barker
<brucebar...@discussions.microsoft.comwrote:
>casual web developers will probably stay with webforms. you switch to mvc
when any of the following are important enough to switch:

1) you are unit test developer (use test first design)
2) are tried of webforms "fake" and complex event model.
3) are writing lots of javascript and tired of id's changing, and want
standard html components.
4) want better seperation of view and controller code.
5) want a ruby on rails coding experience (mvc is easier with a dynamic
language like ironpython, ironruby or javascript)
6) you are commited to the mvc pattern, and want a supported platform
7) you switched to jQuery (see #3)
8) your web site is going to be large and complex.

-- bruce (sqlwork.com)

"Author" wrote:
>>On Oct 20, 12:13 pm, Author <gnewsgr...@gmail.comwrote:
I happened to see this asp.net MVC tutorial at
http://www.asp.net/learn/mvc/tutorial-01-cs.aspx
Indeed as the author says it is gonna look like classic ASP at the
very beginning of this tutorial.
I think form post with an action (which is classic asp style) like
<form method="post" action="/Home/CreateNew">
the form to be posted goes here.
</form>
is OK to me, but as soon as I see embedded curly braces and ifs and
else's inside <% and %>, I am determined that I wanna stay far from
it.
I think embedding codes inside <% and %like that of classic ASP and
JSP is notoriously hard to read and difficult to maintain, and error-
prone.
To my understanding, part of struts' functionality is to embedded
codes in JSP. I don't know why people wanna revert back to the old
coding style with asp.net mvc and your input is appreciated.
Or is it the case that such embeddings are not necessary with asp.net
MVC? If yes, then it may be worth looking into a little.
I searched a little in this group and found this:
http://groups.google.com/group/micro...framework.aspn...
Correction:
<quote>
To my understanding, part of struts' functionality is to embedded
codes in JSP.
</quote>
should read
To my understanding, part of struts' functionality is to get rid of
embedded
codes in JSP.

Thank you very much for sharing. Could you say something about the
main disadvantage of ASP.NET MVC?

Also, is there a way to avoid embedding codes inside <% and %>?

Thanks a lot.
Oct 21 '08 #10
they are copying ruby on rails which is template based (Rhtml) more than
struts. the current view engine is the webforms page and its syntax,
which matches ruby on rails pretty close.

there are alternate view engines available, Haml for one, and while a
more struts like one could be added, the current trend with mvc web
viewers is template based.

-- bruce (sqlwork.com)
Author wrote:
Gregory A. Beamer (Cowboy) - MVP wrote:
>It is very Rails like. It is designed to completely separate UI from
business rules and data access. This works if you just consider the actual
painting of the form UI. If you consider the entire wb application to be UI,
then most of the examples are still doing horrible on separation of
concerns, although the code is not in the actual UI element (whether ASPX or
otherwise).

I am not sure whether MVC will take off. I suspect not until the tools catch
up with the ASP.NET team. After that, I think it will take off, but only
time will tell.

As for the why? ASP.NET needed its rails. ;-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"Author" <gn********@gmail.comwrote in message
news:83**********************************@a18g200 0pra.googlegroups.com...
>>I happened to see this asp.net MVC tutorial at

http://www.asp.net/learn/mvc/tutorial-01-cs.aspx

Indeed as the author says it is gonna look like classic ASP at the
very beginning of this tutorial.

I think form post with an action (which is classic asp style) like

<form method="post" action="/Home/CreateNew">
the form to be posted goes here.
</form>

is OK to me, but as soon as I see embedded curly braces and ifs and
else's inside <% and %>, I am determined that I wanna stay far from
it.

I think embedding codes inside <% and %like that of classic ASP and
JSP is notoriously hard to read and difficult to maintain, and error-
prone.

To my understanding, part of struts' functionality is to embedded
codes in JSP. I don't know why people wanna revert back to the old
coding style with asp.net mvc and your input is appreciated.

Or is it the case that such embeddings are not necessary with asp.net
MVC? If yes, then it may be worth looking into a little.

I searched a little in this group and found this:

http://groups.google.com/group/micro...307ade5b2463d5

It looks like mvc will be included in future releases of the .net
framework. since scott guthrie has a few blogs about it, I'd assume
that his team is seriously working on it.

OK, MVC may be a good idea, but can we avoid embedding our codes in
the markup with <% and %>? Are we gonna have a struts for asp.net
mvc?
Oct 21 '08 #11
On Oct 21, 1:59*am, bruce barker <nos...@nospam.comwrote:
they are copying ruby on rails which is template based (Rhtml) more than
struts. the current view engine is the webforms page and its syntax,
which matches ruby on rails pretty close.

there are alternate view engines available, Haml for one, and while a
more struts like one could be added, the current trend with mvc web
viewers is template based.

-- bruce (sqlwork.com)

Author wrote:
Gregory A. Beamer (Cowboy) - MVP wrote:
It is very Rails like. It is designed to completely separate UI from
business rules and data access. This works if you just consider the actual
painting of the form UI. If you consider the entire wb application to be UI,
then most of the examples are still doing horrible on separation of
concerns, although the code is not in the actual UI element (whether ASPX or
otherwise).
I am not sure whether MVC will take off. I suspect not until the toolscatch
up with the ASP.NET team. After that, I think it will take off, but only
time will tell.
As for the why? ASP.NET needed its rails. ;-)
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#
or just read it:
http://feeds.feedburner.com/GregoryBeamer
********************************************
| Think outside the box! * * * * * * * * * * * * * * * |
********************************************
"Author" <gnewsgr...@gmail.comwrote in message
news:83**********************************@a18g200 0pra.googlegroups.com....
I happened to see this asp.net MVC tutorial at
>>http://www.asp.net/learn/mvc/tutorial-01-cs.aspx
>Indeed as the author says it is gonna look like classic ASP at the
very beginning of this tutorial.
>I think form post with an action (which is classic asp style) like
><form method="post" action="/Home/CreateNew">
*the form to be posted goes here.
</form>
>is OK to me, but as soon as I see embedded curly braces and ifs and
else's inside <% and %>, I am determined that I wanna stay far from
it.
>I think embedding codes inside <% and %like that of classic ASP and
JSP is notoriously hard to read and difficult to maintain, and error-
prone.
>To my understanding, part of struts' functionality is to embedded
codes in JSP. *I don't know why people wanna revert back to the old
coding style with asp.net mvc and your input is appreciated.
>Or is it the case that such embeddings are not necessary with asp.net
MVC? *If yes, then it may be worth looking into a little.
>I searched a little in this group and found this:
>>http://groups.google.com/group/micro...framework.aspn....
It looks like mvc will be included in future releases of the .net
framework. since scott guthrie has a few blogs about it, I'd assume
that his team is seriously working on it.
OK, MVC may be a good idea, but can we avoid embedding our codes in
the markup with <% and %>? *Are we gonna have a struts for asp.net
mvc?
Is it the case that ASP.NET MVC will not be event driven, but instead
will be controller driven? For example, in a regular web form, we can
use the server side button control like <asp:Button ID="btnLogin"
runat="Server" OnClick="btnLogin_Click"and implement the click event
handler.

But in ASP.MVC, I see this becomes

<form method="post" action="/Home/Login">
[snip]
<input type="submit" value="Log In" />
</form>

No mas event handler.
Oct 21 '08 #12

"Author" <gn********@gmail.comwrote in message
news:c3**********************************@17g2000h sk.googlegroups.com...
>
It looks like mvc will be included in future releases of the .net
framework. since scott guthrie has a few blogs about it, I'd assume
that his team is seriously working on it.
I understand it is in .NET 4.0, but I cannot confirm it, although I suspect
there will be a 2010 build for PDC that might have bits in it.
OK, MVC may be a good idea, but can we avoid embedding our codes in
the markup with <% and %>? Are we gonna have a struts for asp.net
mvc?
First, do not get overly consumed on the samples out there. Most of them
suck. In addition, they use the ASPX implementation for views. If you don't
like the ASPX implementation, you can use other methods to set up your
views. People have built adapters for a variety of other view (UI)
methodologies for ASP.NET MVC. A search should find one or more rather
quickly. Not sure if any out there now are struts like, however.

I am not that worried about <% %as they are just tokens. You are not
really running code in the page, you are setting up regions that your
controller parses and uses to set up UI. It looks a lot like ASP, which
bothers some people. Once you start working with it, it is not that bad,
although a controller with a lot of code still tightly couples code and UI,
which is bad.

I forget which of the MS employees (Haack, Hanselman, Guthrie, etc.) posted
a sample with a different method of setting up views, but there are samples
out there. once again, not sure about struts, but I am sure someone will do
one, if there is a market for it.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
Oct 24 '08 #13
Many of the ASP.NET controls can be dropped on a page and have the proper
postback(s) created. I imagine you will see more as MVC matures. But if you
opt for this direction, you will be stuck with <% %for anything outside of
the control "box".

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"Author" <gn********@gmail.comwrote in message
news:b9**********************************@f77g2000 hsf.googlegroups.com...
On Oct 21, 1:59 am, bruce barker <nos...@nospam.comwrote:
they are copying ruby on rails which is template based (Rhtml) more than
struts. the current view engine is the webforms page and its syntax,
which matches ruby on rails pretty close.

there are alternate view engines available, Haml for one, and while a
more struts like one could be added, the current trend with mvc web
viewers is template based.

-- bruce (sqlwork.com)

Author wrote:
Gregory A. Beamer (Cowboy) - MVP wrote:
It is very Rails like. It is designed to completely separate UI from
business rules and data access. This works if you just consider the
actual
painting of the form UI. If you consider the entire wb application to
be UI,
then most of the examples are still doing horrible on separation of
concerns, although the code is not in the actual UI element (whether
ASPX or
otherwise).
I am not sure whether MVC will take off. I suspect not until the tools
catch
up with the ASP.NET team. After that, I think it will take off, but
only
time will tell.
As for the why? ASP.NET needed its rails. ;-)
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#
or just read it:
http://feeds.feedburner.com/GregoryBeamer
********************************************
| Think outside the box! |
********************************************
"Author" <gnewsgr...@gmail.comwrote in message
news:83**********************************@a18g200 0pra.googlegroups.com...
I happened to see this asp.net MVC tutorial at
>>http://www.asp.net/learn/mvc/tutorial-01-cs.aspx
>Indeed as the author says it is gonna look like classic ASP at the
very beginning of this tutorial.
>I think form post with an action (which is classic asp style) like
><form method="post" action="/Home/CreateNew">
the form to be posted goes here.
</form>
>is OK to me, but as soon as I see embedded curly braces and ifs and
else's inside <% and %>, I am determined that I wanna stay far from
it.
>I think embedding codes inside <% and %like that of classic ASP and
JSP is notoriously hard to read and difficult to maintain, and error-
prone.
>To my understanding, part of struts' functionality is to embedded
codes in JSP. I don't know why people wanna revert back to the old
coding style with asp.net mvc and your input is appreciated.
>Or is it the case that such embeddings are not necessary with asp.net
MVC? If yes, then it may be worth looking into a little.
>I searched a little in this group and found this:
>>http://groups.google.com/group/micro...framework.aspn...
It looks like mvc will be included in future releases of the .net
framework. since scott guthrie has a few blogs about it, I'd assume
that his team is seriously working on it.
OK, MVC may be a good idea, but can we avoid embedding our codes in
the markup with <% and %>? Are we gonna have a struts for asp.net
mvc?
Is it the case that ASP.NET MVC will not be event driven, but instead
will be controller driven? For example, in a regular web form, we can
use the server side button control like <asp:Button ID="btnLogin"
runat="Server" OnClick="btnLogin_Click"and implement the click event
handler.

But in ASP.MVC, I see this becomes

<form method="post" action="/Home/Login">
[snip]
<input type="submit" value="Log In" />
</form>

No mas event handler.
Oct 24 '08 #14

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

Similar topics

3
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL)...
2
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
3
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which...
0
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. ...
1
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the...
4
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the...
1
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url ...
2
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value...
3
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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,...

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.