Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. The things you learn writing your own web server

The things you learn writing your own web server

Scheduled Pinned Locked Moved The Lounge
rubyasp-netcsharpjavascripthtml
17 Posts 10 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Marc Clifton
    wrote on last edited by
    #1

    For example: When you start typing a link into Chrome (like, the first letter even!), if it can resolve from your history what that link is, it pre-loads the page behind the scenes so that when you select the link, in all likelihood, most, if not all of the page has already been loaded. Firefox doesn't do that. I have no idea what IE does. Yes indeedy, because I'm logging the HTTP Get stuff (I'm using .NET HttpListener) you can in fact see this behavior of Chrome's. You also learn other things, more on the mundane level, but it gives one a real appreciation of what tags and attributes like "form", "submit", and "name" do and their interaction with regards to actually emitting a POST HTTP method. Or, another example, responding with the correct encoding of images vs text files. It's quite fun stuff, and while I know that there's been a lot of work that others have put into the finer devilish details of writing a web server, it sure is nice to do something at the bare metal level which doesn't depend on IIS, doesn't use the bloated dog slow crap that I discovered is MVC Razor, or, in the *nix world, isn't a morass of arcane configuration files (Apache, nginx, etc) or involves yucky ducky languages/frameworks like Ruby on Rails. Oh, and after several hours of hair pulling and teeth gnashing last night, I also learned that you do not (I was using an example, so I sadly copy&pasted the code) create buttons with and id of "submit" because this breaks, not just jQuery but the DOM itself, with something like $('#form').submit(); Go figure. And of course the bug I found the most amusing is that (and it may have been fixed now, but according to SO it has been like this for like, you know man, forever) in Firefox, you can't programmatically submit a form unless the form actually has a button of type "submit". Wow. What a f***ed up world the web is. And I was just reading on LinkedIn on some group post where someone said that XAML is more complicated and desktop UI is moving towards web-forms, which is much simpler. :laugh: Marc

    Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

    OriginalGriffO A B D B 9 Replies Last reply
    0
    • M Marc Clifton

      For example: When you start typing a link into Chrome (like, the first letter even!), if it can resolve from your history what that link is, it pre-loads the page behind the scenes so that when you select the link, in all likelihood, most, if not all of the page has already been loaded. Firefox doesn't do that. I have no idea what IE does. Yes indeedy, because I'm logging the HTTP Get stuff (I'm using .NET HttpListener) you can in fact see this behavior of Chrome's. You also learn other things, more on the mundane level, but it gives one a real appreciation of what tags and attributes like "form", "submit", and "name" do and their interaction with regards to actually emitting a POST HTTP method. Or, another example, responding with the correct encoding of images vs text files. It's quite fun stuff, and while I know that there's been a lot of work that others have put into the finer devilish details of writing a web server, it sure is nice to do something at the bare metal level which doesn't depend on IIS, doesn't use the bloated dog slow crap that I discovered is MVC Razor, or, in the *nix world, isn't a morass of arcane configuration files (Apache, nginx, etc) or involves yucky ducky languages/frameworks like Ruby on Rails. Oh, and after several hours of hair pulling and teeth gnashing last night, I also learned that you do not (I was using an example, so I sadly copy&pasted the code) create buttons with and id of "submit" because this breaks, not just jQuery but the DOM itself, with something like $('#form').submit(); Go figure. And of course the bug I found the most amusing is that (and it may have been fixed now, but according to SO it has been like this for like, you know man, forever) in Firefox, you can't programmatically submit a form unless the form actually has a button of type "submit". Wow. What a f***ed up world the web is. And I was just reading on LinkedIn on some group post where someone said that XAML is more complicated and desktop UI is moving towards web-forms, which is much simpler. :laugh: Marc

      Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      That sounds like "seriously interesting article" material going on there! Are you going to write it up at some point?

      Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      M 1 Reply Last reply
      0
      • M Marc Clifton

        For example: When you start typing a link into Chrome (like, the first letter even!), if it can resolve from your history what that link is, it pre-loads the page behind the scenes so that when you select the link, in all likelihood, most, if not all of the page has already been loaded. Firefox doesn't do that. I have no idea what IE does. Yes indeedy, because I'm logging the HTTP Get stuff (I'm using .NET HttpListener) you can in fact see this behavior of Chrome's. You also learn other things, more on the mundane level, but it gives one a real appreciation of what tags and attributes like "form", "submit", and "name" do and their interaction with regards to actually emitting a POST HTTP method. Or, another example, responding with the correct encoding of images vs text files. It's quite fun stuff, and while I know that there's been a lot of work that others have put into the finer devilish details of writing a web server, it sure is nice to do something at the bare metal level which doesn't depend on IIS, doesn't use the bloated dog slow crap that I discovered is MVC Razor, or, in the *nix world, isn't a morass of arcane configuration files (Apache, nginx, etc) or involves yucky ducky languages/frameworks like Ruby on Rails. Oh, and after several hours of hair pulling and teeth gnashing last night, I also learned that you do not (I was using an example, so I sadly copy&pasted the code) create buttons with and id of "submit" because this breaks, not just jQuery but the DOM itself, with something like $('#form').submit(); Go figure. And of course the bug I found the most amusing is that (and it may have been fixed now, but according to SO it has been like this for like, you know man, forever) in Firefox, you can't programmatically submit a form unless the form actually has a button of type "submit". Wow. What a f***ed up world the web is. And I was just reading on LinkedIn on some group post where someone said that XAML is more complicated and desktop UI is moving towards web-forms, which is much simpler. :laugh: Marc

        Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

        A Offline
        A Offline
        Afzaal Ahmad Zeeshan
        wrote on last edited by
        #3

        Agree-ing to Griff, and requesting for an article or the date of it! ;P

        The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

        M 1 Reply Last reply
        0
        • OriginalGriffO OriginalGriff

          That sounds like "seriously interesting article" material going on there! Are you going to write it up at some point?

          Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

          M Offline
          M Offline
          Marc Clifton
          wrote on last edited by
          #4

          OriginalGriff wrote:

          That sounds like "seriously interesting article" material going on there! Are you going to write it up at some point?

          Eventually -- there's a lot of bare bones examples out there on writing a web server, I think what I would want to demonstrate are the nuances of browser behavior and data interaction. Though, putting together a functional but bare bones web-server would probably be useful too -- Sacha's Simple REST Framework[^] though is a good place to start. Marc

          Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

          1 Reply Last reply
          0
          • A Afzaal Ahmad Zeeshan

            Agree-ing to Griff, and requesting for an article or the date of it! ;P

            The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

            M Offline
            M Offline
            Marc Clifton
            wrote on last edited by
            #5

            Afzaal Ahmad Zeeshan wrote:

            and requesting for an article or the date of it!

            OK, OK, give me a few weeks. ;) Marc

            Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

            A 1 Reply Last reply
            0
            • M Marc Clifton

              Afzaal Ahmad Zeeshan wrote:

              and requesting for an article or the date of it!

              OK, OK, give me a few weeks. ;) Marc

              Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

              A Offline
              A Offline
              Afzaal Ahmad Zeeshan
              wrote on last edited by
              #6

              Hopefully weeks aren't Integral multiples of 52! :D

              The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

              1 Reply Last reply
              0
              • M Marc Clifton

                For example: When you start typing a link into Chrome (like, the first letter even!), if it can resolve from your history what that link is, it pre-loads the page behind the scenes so that when you select the link, in all likelihood, most, if not all of the page has already been loaded. Firefox doesn't do that. I have no idea what IE does. Yes indeedy, because I'm logging the HTTP Get stuff (I'm using .NET HttpListener) you can in fact see this behavior of Chrome's. You also learn other things, more on the mundane level, but it gives one a real appreciation of what tags and attributes like "form", "submit", and "name" do and their interaction with regards to actually emitting a POST HTTP method. Or, another example, responding with the correct encoding of images vs text files. It's quite fun stuff, and while I know that there's been a lot of work that others have put into the finer devilish details of writing a web server, it sure is nice to do something at the bare metal level which doesn't depend on IIS, doesn't use the bloated dog slow crap that I discovered is MVC Razor, or, in the *nix world, isn't a morass of arcane configuration files (Apache, nginx, etc) or involves yucky ducky languages/frameworks like Ruby on Rails. Oh, and after several hours of hair pulling and teeth gnashing last night, I also learned that you do not (I was using an example, so I sadly copy&pasted the code) create buttons with and id of "submit" because this breaks, not just jQuery but the DOM itself, with something like $('#form').submit(); Go figure. And of course the bug I found the most amusing is that (and it may have been fixed now, but according to SO it has been like this for like, you know man, forever) in Firefox, you can't programmatically submit a form unless the form actually has a button of type "submit". Wow. What a f***ed up world the web is. And I was just reading on LinkedIn on some group post where someone said that XAML is more complicated and desktop UI is moving towards web-forms, which is much simpler. :laugh: Marc

                Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                B Offline
                B Offline
                BillWoodruff
                wrote on last edited by
                #7

                Yes, looking forward to the article(s), thanks ! Merry Xmas, Bill

                «OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. »  Alan Kay's clarification on what he meant by the term "Object" in "Object-Oriented Programming."

                1 Reply Last reply
                0
                • M Marc Clifton

                  For example: When you start typing a link into Chrome (like, the first letter even!), if it can resolve from your history what that link is, it pre-loads the page behind the scenes so that when you select the link, in all likelihood, most, if not all of the page has already been loaded. Firefox doesn't do that. I have no idea what IE does. Yes indeedy, because I'm logging the HTTP Get stuff (I'm using .NET HttpListener) you can in fact see this behavior of Chrome's. You also learn other things, more on the mundane level, but it gives one a real appreciation of what tags and attributes like "form", "submit", and "name" do and their interaction with regards to actually emitting a POST HTTP method. Or, another example, responding with the correct encoding of images vs text files. It's quite fun stuff, and while I know that there's been a lot of work that others have put into the finer devilish details of writing a web server, it sure is nice to do something at the bare metal level which doesn't depend on IIS, doesn't use the bloated dog slow crap that I discovered is MVC Razor, or, in the *nix world, isn't a morass of arcane configuration files (Apache, nginx, etc) or involves yucky ducky languages/frameworks like Ruby on Rails. Oh, and after several hours of hair pulling and teeth gnashing last night, I also learned that you do not (I was using an example, so I sadly copy&pasted the code) create buttons with and id of "submit" because this breaks, not just jQuery but the DOM itself, with something like $('#form').submit(); Go figure. And of course the bug I found the most amusing is that (and it may have been fixed now, but according to SO it has been like this for like, you know man, forever) in Firefox, you can't programmatically submit a form unless the form actually has a button of type "submit". Wow. What a f***ed up world the web is. And I was just reading on LinkedIn on some group post where someone said that XAML is more complicated and desktop UI is moving towards web-forms, which is much simpler. :laugh: Marc

                  Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                  D Offline
                  D Offline
                  David Lormor
                  wrote on last edited by
                  #8

                  I've experienced the same insights after learning most of my web dev skills from that "yucky ducky" framework you mentioned - Ruby on Rails. The affordances and speed gains you get from things like Rails or .NET MVC are definitely advantageous, but they definitely give you a lot of "magic" to really abstract what's going on. I've found that learning the bare metal technologies that power something such as Rails help me to be a more efficient coder...it's too bad that many people never take that next step and are happy to take on the technical debt and overhead of all that "magic" much too easily. Happy Coding!

                  1 Reply Last reply
                  0
                  • M Marc Clifton

                    For example: When you start typing a link into Chrome (like, the first letter even!), if it can resolve from your history what that link is, it pre-loads the page behind the scenes so that when you select the link, in all likelihood, most, if not all of the page has already been loaded. Firefox doesn't do that. I have no idea what IE does. Yes indeedy, because I'm logging the HTTP Get stuff (I'm using .NET HttpListener) you can in fact see this behavior of Chrome's. You also learn other things, more on the mundane level, but it gives one a real appreciation of what tags and attributes like "form", "submit", and "name" do and their interaction with regards to actually emitting a POST HTTP method. Or, another example, responding with the correct encoding of images vs text files. It's quite fun stuff, and while I know that there's been a lot of work that others have put into the finer devilish details of writing a web server, it sure is nice to do something at the bare metal level which doesn't depend on IIS, doesn't use the bloated dog slow crap that I discovered is MVC Razor, or, in the *nix world, isn't a morass of arcane configuration files (Apache, nginx, etc) or involves yucky ducky languages/frameworks like Ruby on Rails. Oh, and after several hours of hair pulling and teeth gnashing last night, I also learned that you do not (I was using an example, so I sadly copy&pasted the code) create buttons with and id of "submit" because this breaks, not just jQuery but the DOM itself, with something like $('#form').submit(); Go figure. And of course the bug I found the most amusing is that (and it may have been fixed now, but according to SO it has been like this for like, you know man, forever) in Firefox, you can't programmatically submit a form unless the form actually has a button of type "submit". Wow. What a f***ed up world the web is. And I was just reading on LinkedIn on some group post where someone said that XAML is more complicated and desktop UI is moving towards web-forms, which is much simpler. :laugh: Marc

                    Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                    B Offline
                    B Offline
                    bantling
                    wrote on last edited by
                    #9

                    You also get problems submitting forms when you make your own javascript function called submit(), and try to set the form to call it on submission. So I'm not surprised about the id thing :)

                    1 Reply Last reply
                    0
                    • M Marc Clifton

                      For example: When you start typing a link into Chrome (like, the first letter even!), if it can resolve from your history what that link is, it pre-loads the page behind the scenes so that when you select the link, in all likelihood, most, if not all of the page has already been loaded. Firefox doesn't do that. I have no idea what IE does. Yes indeedy, because I'm logging the HTTP Get stuff (I'm using .NET HttpListener) you can in fact see this behavior of Chrome's. You also learn other things, more on the mundane level, but it gives one a real appreciation of what tags and attributes like "form", "submit", and "name" do and their interaction with regards to actually emitting a POST HTTP method. Or, another example, responding with the correct encoding of images vs text files. It's quite fun stuff, and while I know that there's been a lot of work that others have put into the finer devilish details of writing a web server, it sure is nice to do something at the bare metal level which doesn't depend on IIS, doesn't use the bloated dog slow crap that I discovered is MVC Razor, or, in the *nix world, isn't a morass of arcane configuration files (Apache, nginx, etc) or involves yucky ducky languages/frameworks like Ruby on Rails. Oh, and after several hours of hair pulling and teeth gnashing last night, I also learned that you do not (I was using an example, so I sadly copy&pasted the code) create buttons with and id of "submit" because this breaks, not just jQuery but the DOM itself, with something like $('#form').submit(); Go figure. And of course the bug I found the most amusing is that (and it may have been fixed now, but according to SO it has been like this for like, you know man, forever) in Firefox, you can't programmatically submit a form unless the form actually has a button of type "submit". Wow. What a f***ed up world the web is. And I was just reading on LinkedIn on some group post where someone said that XAML is more complicated and desktop UI is moving towards web-forms, which is much simpler. :laugh: Marc

                      Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                      B Offline
                      B Offline
                      bantling
                      wrote on last edited by
                      #10

                      Also, if you think the web is screwed up, try writing desktop applications for OS X, Linux, and Windows. Good luck with that. You won't even get to writing code before going mental just trying to decipher which APIs are considered current and what language to use. Have fun doing any of the following: 1. Using a single language in all cases, even if it is something like Java that's supposed just work everywhere. 2. Sorting out what menu shortcuts to use and quasi-standards on them. 3. Integrating with the various taskbars. 4. Working on past versions as well as newer versions of the OS. 5. Making an installer that doesn't suck. 6. Providing updates. 7. Working with/around some of the "features" of each system. Gotta love the way Win7 automatically makes dialogs show up behind the current window, that's just so awesome. As much as the web may be frustrating as all hell, it pales in comparison to the wrist-slitting exercise of writing desktop applications of even the smallest semblance of quality. Really, the only truly badass, "where's a cliff to fling myself off of?" part of web design is using CSS.

                      M 1 Reply Last reply
                      0
                      • B bantling

                        Also, if you think the web is screwed up, try writing desktop applications for OS X, Linux, and Windows. Good luck with that. You won't even get to writing code before going mental just trying to decipher which APIs are considered current and what language to use. Have fun doing any of the following: 1. Using a single language in all cases, even if it is something like Java that's supposed just work everywhere. 2. Sorting out what menu shortcuts to use and quasi-standards on them. 3. Integrating with the various taskbars. 4. Working on past versions as well as newer versions of the OS. 5. Making an installer that doesn't suck. 6. Providing updates. 7. Working with/around some of the "features" of each system. Gotta love the way Win7 automatically makes dialogs show up behind the current window, that's just so awesome. As much as the web may be frustrating as all hell, it pales in comparison to the wrist-slitting exercise of writing desktop applications of even the smallest semblance of quality. Really, the only truly badass, "where's a cliff to fling myself off of?" part of web design is using CSS.

                        M Offline
                        M Offline
                        Mustafa Ismail Mustafa
                        wrote on last edited by
                        #11

                        bantling wrote:

                        Really, the only truly badass, "where's a cliff to fling myself off of?" part of web design is using CSS

                        This. CSS is the offspring of a rabid Tasmanian Devil and Satan and it is no way a love child.

                        If the post was helpful, please vote, eh! Quote worthy: I hereby claim this thread in the name of Drivel. Now and forever, defiant to the end. What is Multiple Sclerosis[^]? Food

                        1 Reply Last reply
                        0
                        • M Marc Clifton

                          For example: When you start typing a link into Chrome (like, the first letter even!), if it can resolve from your history what that link is, it pre-loads the page behind the scenes so that when you select the link, in all likelihood, most, if not all of the page has already been loaded. Firefox doesn't do that. I have no idea what IE does. Yes indeedy, because I'm logging the HTTP Get stuff (I'm using .NET HttpListener) you can in fact see this behavior of Chrome's. You also learn other things, more on the mundane level, but it gives one a real appreciation of what tags and attributes like "form", "submit", and "name" do and their interaction with regards to actually emitting a POST HTTP method. Or, another example, responding with the correct encoding of images vs text files. It's quite fun stuff, and while I know that there's been a lot of work that others have put into the finer devilish details of writing a web server, it sure is nice to do something at the bare metal level which doesn't depend on IIS, doesn't use the bloated dog slow crap that I discovered is MVC Razor, or, in the *nix world, isn't a morass of arcane configuration files (Apache, nginx, etc) or involves yucky ducky languages/frameworks like Ruby on Rails. Oh, and after several hours of hair pulling and teeth gnashing last night, I also learned that you do not (I was using an example, so I sadly copy&pasted the code) create buttons with and id of "submit" because this breaks, not just jQuery but the DOM itself, with something like $('#form').submit(); Go figure. And of course the bug I found the most amusing is that (and it may have been fixed now, but according to SO it has been like this for like, you know man, forever) in Firefox, you can't programmatically submit a form unless the form actually has a button of type "submit". Wow. What a f***ed up world the web is. And I was just reading on LinkedIn on some group post where someone said that XAML is more complicated and desktop UI is moving towards web-forms, which is much simpler. :laugh: Marc

                          Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                          C Offline
                          C Offline
                          crazedDotNetDev
                          wrote on last edited by
                          #12

                          Dude, you had me at "yucky ducky languages/frameworks like Ruby on Rails"! :laugh: Back in the early 2000’s I wrote a very thin "web server and client" that ran on a set of AS/400s. Certain events would send data to the AS/400s via HTTP and internal AS/400 events would shoot data out of the AS/400 over HTTP. Thankfully I didn’t have to be concerned with browser stupidity, but spent many days buried in HTTP’s rfc.

                          - great coders make code look easy - When humans are doing things computers could be doing instead, the computers get together late at night and laugh at us. - ¿Neal Ford?

                          1 Reply Last reply
                          0
                          • M Marc Clifton

                            For example: When you start typing a link into Chrome (like, the first letter even!), if it can resolve from your history what that link is, it pre-loads the page behind the scenes so that when you select the link, in all likelihood, most, if not all of the page has already been loaded. Firefox doesn't do that. I have no idea what IE does. Yes indeedy, because I'm logging the HTTP Get stuff (I'm using .NET HttpListener) you can in fact see this behavior of Chrome's. You also learn other things, more on the mundane level, but it gives one a real appreciation of what tags and attributes like "form", "submit", and "name" do and their interaction with regards to actually emitting a POST HTTP method. Or, another example, responding with the correct encoding of images vs text files. It's quite fun stuff, and while I know that there's been a lot of work that others have put into the finer devilish details of writing a web server, it sure is nice to do something at the bare metal level which doesn't depend on IIS, doesn't use the bloated dog slow crap that I discovered is MVC Razor, or, in the *nix world, isn't a morass of arcane configuration files (Apache, nginx, etc) or involves yucky ducky languages/frameworks like Ruby on Rails. Oh, and after several hours of hair pulling and teeth gnashing last night, I also learned that you do not (I was using an example, so I sadly copy&pasted the code) create buttons with and id of "submit" because this breaks, not just jQuery but the DOM itself, with something like $('#form').submit(); Go figure. And of course the bug I found the most amusing is that (and it may have been fixed now, but according to SO it has been like this for like, you know man, forever) in Firefox, you can't programmatically submit a form unless the form actually has a button of type "submit". Wow. What a f***ed up world the web is. And I was just reading on LinkedIn on some group post where someone said that XAML is more complicated and desktop UI is moving towards web-forms, which is much simpler. :laugh: Marc

                            Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                            P Offline
                            P Offline
                            Peter Shaw
                            wrote on last edited by
                            #13

                            You lot seriously crack me up sometimes :-) Marc: would this be the same server you've been on about over at Lidnug? if so, then I too think your write-up's going to be rather interesting (I might even contribute to it if you want :-) ) For those of you who are down in the dumps about CSS, don't worry... I'll be starting to write CSS3 Succinctly this week, which should be out Q1 in the new year and I intend to try and make it fun even if it can be a painful subject. for those of you who really want to get stuck in and learn the in's and out's of the various web server protocols, then may I suggest you spend a delightful evening reading the RFC's at http://www.rfc-editor.org/[^] you'll have such a delightful time ;-) Shawty

                            M 1 Reply Last reply
                            0
                            • P Peter Shaw

                              You lot seriously crack me up sometimes :-) Marc: would this be the same server you've been on about over at Lidnug? if so, then I too think your write-up's going to be rather interesting (I might even contribute to it if you want :-) ) For those of you who are down in the dumps about CSS, don't worry... I'll be starting to write CSS3 Succinctly this week, which should be out Q1 in the new year and I intend to try and make it fun even if it can be a painful subject. for those of you who really want to get stuck in and learn the in's and out's of the various web server protocols, then may I suggest you spend a delightful evening reading the RFC's at http://www.rfc-editor.org/[^] you'll have such a delightful time ;-) Shawty

                              M Offline
                              M Offline
                              Marc Clifton
                              wrote on last edited by
                              #14

                              Peter Shaw wrote:

                              Marc: would this be the same server you've been on about over at Lidnug?

                              No, that's a product called Interacx which I never went public with but have used for a client that was migrating from Clarion to .NET. Long-winded story -- In this particular case, there was some synchronicity in the universe. My experiences with Ruby on Rails and Razor/MVC have left me very dissatisfied with writing web apps, especially with Razor/MVC performance (RoR can run circles around Razor). I also wanted to see what would be involved in writing a web server receptor and other pieces as a plug-in in the HOPE framework. Anyways, my client needed a simple and lightweight intranet server so I figured I could kill two birds (or more) with one piece of code. Sure, I could have gone the PHP route, or Nancy, or even RoR, but I wanted something ridiculously simple to configure and get running. So I've been learning a lot of cool stuff in the process that is really deepening my understanding, and I've got a decent web server with routing, session management and authentication working in about 500 lines of code -- no IIS, no bloat, no heavyweight EF or Rails or whatever ORM -- it's really nice to decouple all that from the job of serving html, css, js, and images.

                              Peter Shaw wrote:

                              I'll be starting to write CSS3 Succinctly this week, which should be out Q1 in the new year and I intend to try and make it fun even if it can be a painful subject.

                              Awesome - I have O'Reilly's "CSS3 - the missing manual" but haven't cracked it open yet. I'll be looking forward to your book!

                              Peter Shaw wrote:

                              for those of you who really want to get stuck in and learn the in's and out's of the various web server protocols, then may I suggest you spend a delightful evening reading the RFC's at

                              Well, HttpListener isolates me from some of the low level details. :) Marc

                              Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                              P 1 Reply Last reply
                              0
                              • M Marc Clifton

                                For example: When you start typing a link into Chrome (like, the first letter even!), if it can resolve from your history what that link is, it pre-loads the page behind the scenes so that when you select the link, in all likelihood, most, if not all of the page has already been loaded. Firefox doesn't do that. I have no idea what IE does. Yes indeedy, because I'm logging the HTTP Get stuff (I'm using .NET HttpListener) you can in fact see this behavior of Chrome's. You also learn other things, more on the mundane level, but it gives one a real appreciation of what tags and attributes like "form", "submit", and "name" do and their interaction with regards to actually emitting a POST HTTP method. Or, another example, responding with the correct encoding of images vs text files. It's quite fun stuff, and while I know that there's been a lot of work that others have put into the finer devilish details of writing a web server, it sure is nice to do something at the bare metal level which doesn't depend on IIS, doesn't use the bloated dog slow crap that I discovered is MVC Razor, or, in the *nix world, isn't a morass of arcane configuration files (Apache, nginx, etc) or involves yucky ducky languages/frameworks like Ruby on Rails. Oh, and after several hours of hair pulling and teeth gnashing last night, I also learned that you do not (I was using an example, so I sadly copy&pasted the code) create buttons with and id of "submit" because this breaks, not just jQuery but the DOM itself, with something like $('#form').submit(); Go figure. And of course the bug I found the most amusing is that (and it may have been fixed now, but according to SO it has been like this for like, you know man, forever) in Firefox, you can't programmatically submit a form unless the form actually has a button of type "submit". Wow. What a f***ed up world the web is. And I was just reading on LinkedIn on some group post where someone said that XAML is more complicated and desktop UI is moving towards web-forms, which is much simpler. :laugh: Marc

                                Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                                A Offline
                                A Offline
                                AspDotNetDev
                                wrote on last edited by
                                #15

                                Marc Clifton wrote:

                                When you start typing a link into Chrome (like, the first letter even!), if it can resolve from your history what that link is, it pre-loads the page behind the scene

                                I actually find this pretty annoying, but am glad that it can be disabled (Chrome has a setting for it). In fact, I take this into account when I create temporary import pages (for a web CMS)... I have seen coworkers write them so that when you visit the URL, the import is started. However, with this Chrome "feature", it can be inadvertently be kicked off without your knowledge. Because of this, I typically add a form to my imports so that I need to click a button to initiate the import process. By the way, I too have been writing my own web server... kind of. I made a short Node.js app to serve up some markup. It's not much of a web server and it isn't exactly from scratch, but it's fun nonetheless. :)

                                Marc Clifton wrote:

                                the bloated dog slow crap that I discovered is MVC Razor

                                Razor doesn't seem slow to me, unless you mean the compilation.

                                Thou mewling ill-breeding pignut!

                                1 Reply Last reply
                                0
                                • M Marc Clifton

                                  Peter Shaw wrote:

                                  Marc: would this be the same server you've been on about over at Lidnug?

                                  No, that's a product called Interacx which I never went public with but have used for a client that was migrating from Clarion to .NET. Long-winded story -- In this particular case, there was some synchronicity in the universe. My experiences with Ruby on Rails and Razor/MVC have left me very dissatisfied with writing web apps, especially with Razor/MVC performance (RoR can run circles around Razor). I also wanted to see what would be involved in writing a web server receptor and other pieces as a plug-in in the HOPE framework. Anyways, my client needed a simple and lightweight intranet server so I figured I could kill two birds (or more) with one piece of code. Sure, I could have gone the PHP route, or Nancy, or even RoR, but I wanted something ridiculously simple to configure and get running. So I've been learning a lot of cool stuff in the process that is really deepening my understanding, and I've got a decent web server with routing, session management and authentication working in about 500 lines of code -- no IIS, no bloat, no heavyweight EF or Rails or whatever ORM -- it's really nice to decouple all that from the job of serving html, css, js, and images.

                                  Peter Shaw wrote:

                                  I'll be starting to write CSS3 Succinctly this week, which should be out Q1 in the new year and I intend to try and make it fun even if it can be a painful subject.

                                  Awesome - I have O'Reilly's "CSS3 - the missing manual" but haven't cracked it open yet. I'll be looking forward to your book!

                                  Peter Shaw wrote:

                                  for those of you who really want to get stuck in and learn the in's and out's of the various web server protocols, then may I suggest you spend a delightful evening reading the RFC's at

                                  Well, HttpListener isolates me from some of the low level details. :) Marc

                                  Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                                  P Offline
                                  P Offline
                                  Peter Shaw
                                  wrote on last edited by
                                  #16

                                  I do know of one server stack that's even simpler than what you where doing in .NET and just as fast. NodeJS, but that's a discussion for another thread :-) We need to get together on Skype or something and have a pow-wow ... Happy Xmas ya-awl Shawty

                                  M 1 Reply Last reply
                                  0
                                  • P Peter Shaw

                                    I do know of one server stack that's even simpler than what you where doing in .NET and just as fast. NodeJS, but that's a discussion for another thread :-) We need to get together on Skype or something and have a pow-wow ... Happy Xmas ya-awl Shawty

                                    M Offline
                                    M Offline
                                    Marc Clifton
                                    wrote on last edited by
                                    #17

                                    Peter Shaw wrote:

                                    NodeJS, but that's a discussion for another thread

                                    Personally, I'm not particularly excited by anything javascript related. :)

                                    Peter Shaw wrote:

                                    We need to get together on Skype or something and have a pow-wow ...

                                    That would be great -- how about sometime early next year? (That sounds more ominous than it actually is). Merry Christmas to you too! Marc

                                    Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!

                                    1 Reply Last reply
                                    0
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • World
                                    • Users
                                    • Groups