|
Like http://geek-and-poke.com/geekandpoke/2013/7/28/tdd[^]
While we are talking about assemblers: Long time ago (around the RT-11 times), I looked into the source code of the assembler, of course written in assembler. Yes, the code was commented. Only that each and every comment was like 'Smart trick here!' and 'This is messy but it works' or 'Faster than [...]'. And the module heading (that is if you consider an assembler source file a 'module' ), there was a comment referring all questions, problems and bugs to R.S, which at the time when I read it, was the CEO of a 3000 man company...
|
|
|
|
|
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
I've found that one of the hardest parts of documenting (besides overcoming the initial inertia) is to do what I call philosophical documentation.
Don't write what the code does; I can read it and tell you that. Write why you're doing that, why you chose that technique over this one, stuff like that.
|
|
|
|
|
For sticking to philosophical terms: You say that we shouldn't document the extension, but the intention.
Which fits well with the more colloquial use of the term: You document what the program was intended to do, if it was bug free. That is not necessarily what it actually does
|
|
|
|
|
Indeed.
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Exactly
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
My Personal favorite (found in actual production code):
// Rather complicated - as in WTF was I thinking?
DB
It's a hard life.
But somebody's got to live it, if only to act as an inspiration to others.
|
|
|
|
|
|
John Woods said it best, and the same applies for comments:
Always code as if the guy who ends up
maintaining your code will be a violent
psychopath who knows where you live.
|
|
|
|
|
|
From what I can see, the only way to use the nice new features in MVC6 (tag helpers, view components, etc.) is to create a console application running its own web server, and then use IIS as a "reverse proxy" to forward requests to that server.
Servers — ASP.NET documentation[^]
So instead of requests coming in to IIS, being handled by ASP.NET, and then returned to the client, we get requests coming in to IIS, being picked up by a native module, forwarded on to a different web server hosted in a console application, processed, returned to the native module, and then being returned to the client.
And because it's an external process, you have to jump through hoops[^] to update the files, since they're always in use.
Not to mention the additional hassle of changing the configuration, with no GUI option, and the possibility that some of the settings can't be changed without recompiling.
If I'm targeting the full framework, and hosting on Windows, why the elephant would I want to host the code in anything other than IIS?
Please tell me I'm missing something? If not, I'll be sticking with v5.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
It seems you missed something...
A ASP.NET Core application needs some host - different from IIS - to run, and that comes from the cross-platform requirement...
However tag helpers can be used in standard (old fashioned ) MVC 6 too...
Try this: A Complete Guide to the MVC 6 Tag Helpers – Canadian Developer Connection[^]
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Are you sure about that? I can't find any documentation (other than for early betas) on hosting an MVC6 application directly within IIS. Everything I've seen says you have to deploy it as a console application + reverse proxy. And I can't see anything in that blog post to contradict that.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Wow.
Once upon a time I used to write code, dump the files in my wwwroot directory and IIS would run it.
I understand why Microsoft exploded the ecosystem in order to embrace and extend competing platforms, but they need to tidy up the rubble a little. Regressing development by making infrastructure management such a big part of development is a bad idea.
There once was a move to let developers focus on just their core business logic. I miss those days.
cheers
Chris Maunder
|
|
|
|
|
Chris Maunder wrote: There once was a move to let developers focus on just their core business logic. I miss those days.
Good ol' 90s, eh?
|
|
|
|
|
One of the first sites I worked on was a Perl website and people used an editor that would work via FTP, and directly edited live files on the server. No source control, no staging or dev, this was all on production.
|
|
|
|
|
There are a few changes with the cross-platform area opening...I'm optimistic, however, and do believe that it will change and we will get back our tools...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
I take it you're not a big fan of DevCowFl ops business practices.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Both of those links describe the situation I was wanting to avoid. You're setting up IIS as a "reverse proxy" to pass all requests through to the custom web server in a console application.
It seems there's no way to have an MVC 6 application hosted directly in IIS.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: You're setting up IIS as a "reverse proxy" to pass all requests through to the custom web server in a console application.
That's correct, and that makes ASP.NET Core completely different from previous version of ASP.NET. Since ASP.NET Core was designed to be host-agnostic that can run on any platform (OSX and Linux). ASP.NET Core applications are standalone Console applications invoked through the dotnet runtime command. They are not loaded into an IIS worker process, but rather loaded through a native IIS module called AspNetCoreModule that executes the external Console application.
Richard Deeming wrote: It seems there's no way to have an MVC 6 application hosted directly in IIS.
At the moment, yes, there's no direct way. It involves quite of configuration to be able to run on IIS. Perhaps, this article might give you some insights:
[ Publishing and Running ASP.NET Core Applications with IIS^]
PS: The term/name "MVC 6" might be changed in the future, as ASP.NET Core merges MVC and Web API (a.k.a MVC 6). Though Web Pages and SignalR aren't included yet.
|
|
|
|
|
That's great, but as I said, I don't want to host on other platforms. I want to write an ASP.NET site using the full framework, and host it in IIS, as per the "classic ASP.NET hosting" section of Rick's post.
But it seems there's no way to do that if you want the new features like tag helpers or view components. To host in IIS, you're stuck with MVC 5, which doesn't have those features.
It seems that "classic" ASP.NET is now no longer supported, and we're actively being pushed towards .NET Core, even though the tooling isn't ready yet. (For example, read this blog post[^] - almost every step is "manually edit the project file".)
I don't want to write a console application with a custom embedded web server. I already have a perfectly good web server, called IIS. I want to use IIS to host my code, and to take care of things like not locking the files whilst the site is running.
Which means I'm stuck with using MVC 5 or WebForms. And I have to put up with the fact that there will never be any improvements to either.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I completely understand your point. There's no need to rush. ASP.NET Core is very new, and the tooling/hosting/configurations aren't finalized yet. It would take atleast 3-5 years before it gets mature, and hope that by that time they will provide an easy way to host ASPNET Core apps in Windows (IIS).
For the time being, ASP.NET MVC 5 is still the recommended for building production applications. I can feel your frustrations ~ I mean who the f*** doesn't want to use the new cool features in MVC.
|
|
|
|
|
Sounds like MS is trying to compete with Node. Having not used ASP.NET Core at all, just Node, I can tell you that the whole self-hosting thing is awesome. I mean... awesome. On my dev box I'll typically have two servers going... one to host the back end code and one to host the front end requests.
It sounds redundant, but it better smiulates what will happen in a real environment, and without much extra work. Using PHP as an example, I can have Apache going to do my old school hosting PHP back end or whatever. And then crank up a Node server to run my front end on the same box, to allow me to do some pretty nifty things right on the spot... without having to shuffle around project files, etc.
One you get used to it, there simply is no going back.
Jeremy Falcon
|
|
|
|
|
I started looking at ASP.Net Core last night and was reading the documentation about how it is essentially a console app that fires up an instance of IIS server.
I have not been keeping up with current ASP.Net technology for years, still doing webforms. I'm not sure I want to get current. There are lots of changes. Maybe I'll go back into management.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|