Why ASP.NET MVC?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Author

    Why ASP.NET MVC?

    I happened to see this asp.net MVC tutorial at

    Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.


    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:


  • Author

    #2
    Re: Why ASP.NET MVC?

    On Oct 20, 12:13 pm, Author <gnewsgr...@gma il.comwrote:
    I happened to see this asp.net MVC tutorial at
    >
    Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.

    >
    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.

    Comment

    • =?Utf-8?B?YnJ1Y2UgYmFya2Vy?=

      #3
      Re: Why ASP.NET MVC?

      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...@gma il.comwrote:
      I happened to see this asp.net MVC tutorial at

      Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.


      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.
      >

      Comment

      • Author

        #4
        Re: Why ASP.NET MVC?

        On Oct 20, 2:17 pm, bruce barker
        <brucebar...@di scussions.micro soft.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...@gma il.comwrote:
        I happened to see this asp.net MVC tutorial at
        >>
        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:
        >>
        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.

        Comment

        • Gregory A. Beamer \(Cowboy\) - MVP

          #5
          Re: Why ASP.NET MVC?

          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


          or just read it:


          *************** *************** **************
          | Think outside the box! |
          *************** *************** **************
          "Author" <gnewsgroup@gma il.comwrote in message
          news:8317bbff-53a8-476c-9389-ace760c02049@a1 8g2000pra.googl egroups.com...
          >I happened to see this asp.net MVC tutorial at
          >
          Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.

          >
          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

          Comment

          • John Saunders

            #6
            Re: Why ASP.NET MVC?

            "bruce barker" <brucebarker@di scussions.micro soft.comwrote in message
            news:98E3FD2E-9042-4DC4-8070-D5433053CB49@mi crosoft.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

            Comment

            • Author

              #7
              Re: Why ASP.NET MVC?

              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

              >
              or just read it:

              >
              *************** *************** **************
              | Think outside the box! |
              *************** *************** **************
              "Author" <gnewsgroup@gma il.comwrote in message
              news:8317bbff-53a8-476c-9389-ace760c02049@a1 8g2000pra.googl egroups.com...
              I happened to see this asp.net MVC tutorial at

              Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.


              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?

              Comment

              • Author

                #8
                Re: Why ASP.NET MVC?

                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

                >
                or just read it:

                >
                *************** *************** **************
                | Think outside the box! |
                *************** *************** **************
                "Author" <gnewsgroup@gma il.comwrote in message
                news:8317bbff-53a8-476c-9389-ace760c02049@a1 8g2000pra.googl egroups.com...
                I happened to see this asp.net MVC tutorial at

                Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.


                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?

                Comment

                • bruce barker

                  #9
                  Re: Why ASP.NET MVC?

                  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" <brucebarker@di scussions.micro soft.comwrote in message
                  news:98E3FD2E-9042-4DC4-8070-D5433053CB49@mi crosoft.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.
                  >

                  Comment

                  • bruce barker

                    #10
                    Re: Why ASP.NET MVC?

                    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...@di scussions.micro soft.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...@gma il.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.

                    Comment

                    • bruce barker

                      #11
                      Re: Why ASP.NET MVC?

                      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" <gnewsgroup@gma il.comwrote in message
                      >news:8317bbf f-53a8-476c-9389-ace760c02049@a1 8g2000pra.googl egroups.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?

                      Comment

                      • Author

                        #12
                        Re: Why ASP.NET MVC?

                        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
                        >>>
                        *************** *************** **************
                        | Think outside the box!                               |
                        *************** *************** **************
                        "Author" <gnewsgr...@gma il.comwrote in message
                        >news:8317bbf f-53a8-476c-9389-ace760c02049@a1 8g2000pra.googl egroups.com....
                        >I happened to see this asp.net MVC tutorial at
                        >>
                        >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:
                        >>
                        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="btnLog in_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.

                        Comment

                        • Gregory A. Beamer \(Cowboy\) - MVP

                          #13
                          Re: Why ASP.NET MVC?


                          "Author" <gnewsgroup@gma il.comwrote in message
                          news:c3263ef2-9af5-4205-a825-f2406fbcf369@17 g2000hsk.google groups.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


                          or just read it:


                          *************** *************** **************
                          | Think outside the box! |
                          *************** *************** **************


                          Comment

                          • Gregory A. Beamer \(Cowboy\) - MVP

                            #14
                            Re: Why ASP.NET MVC?

                            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


                            or just read it:


                            *************** *************** **************
                            | Think outside the box! |
                            *************** *************** **************
                            "Author" <gnewsgroup@gma il.comwrote in message
                            news:b9ba7861-2369-48d8-bed5-4449effe1c3c@f7 7g2000hsf.googl egroups.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
                            >>>
                            *************** *************** **************
                            | Think outside the box! |
                            *************** *************** **************
                            "Author" <gnewsgr...@gma il.comwrote in message
                            >news:8317bbf f-53a8-476c-9389-ace760c02049@a1 8g2000pra.googl egroups.com...
                            >I happened to see this asp.net MVC tutorial at
                            >>
                            >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:
                            >>
                            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="btnLog in_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.


                            Comment

                            Working...