Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I hate asp.net webforms as much as the next guy, but this is the same program in webforms:

    <html>
      <head>
	<title>Hello world</title>
      </head>
      <body>
	<p>Hello <%= Request["name"] %></p>
      </body>
    <html>
How many lines of code and config files are in that blog? 100? Compared to the 1 line of actual code in this...


It's not really the same. The tutorial shows how to setup two frameworks to work together, so it's easy to extend the application in both front- and backend with other functionalities. Noone in their clear mind wouldn't combine asp.net and angular to display simple message


Keep moving the goalposts.


It's a tutorial, not code golf. Their example teaches me a lot more about ASP.NET Core + Angular2 than your example teaches me about ASP.NET WebForms.


ASP.NET WebForms would have a bunch of <asp:Label id="myLabel"></asp:Label> (ASP namespaced form controls), with associated event handlers using the "page lifecycle" [1].

Your code here is much closer to ASP.NET MVC.

[1] https://msdn.microsoft.com/en-us/library/ms178472.aspx?f=255...


You don't have to use label controls.


I think it's just a bad use case. No one in their right mind is going to lay down this much pipe just to display a query string variable in a page.


I might have been happy to use ASP.NET if I only had to write this one hello world program with it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: