Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Consider changing WebApplication* to WebHost* #567

Closed
davidfowl opened this issue Jan 13, 2016 · 22 comments
Closed

Consider changing WebApplication* to WebHost* #567

davidfowl opened this issue Jan 13, 2016 · 22 comments
Assignees
Milestone

Comments

@davidfowl
Copy link
Member

We have IWebApplicationBuilder, WebApplicationBuilder, IWebApplication, and IApplicationBuilder.

IApplicationBuilder looks related to IWebApplicationBuilder but they are not.

Today:

var app = new WebApplicationBuilder()
                        .UseServer("Microsoft.AspNet.Server.Kestrel")
                        .UseUrls("http://localhost:5001")
                        .UseStartup<Startup>()
                        .Build();

app.Run();

Potentially changed to:

var host = new WebHostBuilder()
                        .UseServer("Microsoft.AspNet.Server.Kestrel")
                        .UseUrls("http://localhost:5001")
                        .UseStartup<Startup>()
                        .Build();

host.Run();

IWebHostBuilder builds the IWebHost

/cc @lodejard @Tratcher @JunTaoLuo @DamianEdwards Thoughts? I'm not 100% on the naming though and I also don't think this matters that much but think about it a little 😄

This is the hosting repository and we are hosting ASP.NET so it sorta makes sense.

@Tratcher
Copy link
Member

I do agree there's ambiguity between IWebApplicationBuilder and IApplicationBuilder.

@davidfowl
Copy link
Member Author

Shall we go with host instead of application then?

@Tratcher
Copy link
Member

You're with @DamianEdwards right? Did he have anything to say on the subject?

I think host is fine, but I don't envy @JunTaoLuo having to touch all the repos again.

@davidfowl
Copy link
Member Author

Yes, we spoke about this today and concluded that it looks like WebApplication was wrong.

@mikes-gh
Copy link

Would that mean also changing WebApplicationConfiguration to WebHostConfiguration?

Personally I prefer WebHosting prefix but WebHost is also fine.

@davidfowl
Copy link
Member Author

@mikes-gh yes re: WebHostConfiguration

@mikes-gh
Copy link

@davidfowl

WebHostBuilder
WebHostConfiguration

vs

WebHostingBuilder
WebHostingConfiguration

The later seems slightly more abstracted to me

@davidfowl
Copy link
Member Author

I dunno what you mean by more abstracted. I prefer:

I prefer a WebHostBuilder that builds a WebHost using WebHostConfiguration

@mikes-gh
Copy link

WebHost is fine.

@davidfowl
Copy link
Member Author

PS: @JunTaoLuo I'm sorry dude, that's a lot of repos to update 😞

@mikes-gh
Copy link

WebHostConfiguration would read hosting.json seems a mismatch
WebHostingConfiguration would seem a more logically. match..

@davidfowl
Copy link
Member Author

But we're going to call it WebHostConfiguration so it matches the other names. We're splitting hairs and naming is hard but that's what we're calling it.

@JunTaoLuo JunTaoLuo self-assigned this Jan 14, 2016
@JunTaoLuo JunTaoLuo added this to the 1.0.0-rc2 milestone Jan 16, 2016
@aL3891
Copy link

aL3891 commented Jan 16, 2016

Maybe hosting.json could be host.json? (or webhost.json)

@henkmollema
Copy link
Contributor

hosting.json configures the hosting API. Webhost is just a part of that. It's not like we're renaming the repo to Webhost.

@JunTaoLuo
Copy link
Contributor

Marking as done since rename has been merged to dev and all repos have been updated. Will post announcement after monitoring test pass and close issue.

@guardrex
Copy link
Contributor

@JunTaoLuo Suggestion: Due to the slight lag in MyGet, you might want to say it will be for (if I have this correct, of course) ...

Microsoft.AspNet.Hosting rc2-16219 and later. Microsoft.AspNet.IISIntegration rc2-16132 and later

... according to @Tratcher aspnet/IISIntegration#52 (comment)

@mikes-gh
Copy link

@JunTaoLuo
Looks like aspnet/Security is failing after this

@davidfowl
Copy link
Member Author

What is failing?

@mikes-gh
Copy link

Microsoft.AspNet.Authentication.Test

I noticed because I have a pull request for FacebookMiddleware

[00:05:14] Compiling 
[00:05:14] Microsoft.AspNet.Authentication.Test
[00:05:14]  for 
[00:05:14] DNX,Version=v4.5.1
[00:05:14] 
[00:05:17] �[1m�[31mC:\projects\security\test\Microsoft.AspNet.Authentication.Test\test\Microsoft.AspNet.Authentication.Test\Twitter\TwitterMiddlewareTests.cs(155,31): error CS0246: The type or namespace name 'WebHostBuilder' could not be found (are you missing a usi
[00:05:17] ng directive or an assembly reference?)
[00:05:17] 
[00:05:17] 
[00:05:17] Compilation failed.

@JunTaoLuo
Copy link
Contributor

@mikes-gh I think your packages may be out of date and updating to the newest packages should fix the problem. @guardrex I don't know how feasible listing all the versions is since many packages were affected. I will look into it but at least the renames will impact Microsoft.AspNet.Hosting rc2-16237 or later for sure.

@JunTaoLuo
Copy link
Contributor

Seems like test pass will be broken for other reasons. Since I did not see any test failures relating to this change, I'm closing the issue for now.

@davidfowl
Copy link
Member Author

👏

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants