You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
May be it better to rename ClientApp folder to src? Or at least allow to change it in yo generato? (this name use in couple places accross app (index.cshtml, webpack.configs).
It doesn't seem necessarily appropriate to use the name src for that, because this project includes both server and client aspects, both of which are "source" files. This is different from the starter kits you've linked to, which are client-only apps (and as such, have no source files besides their React/Angular/Aurelia code).
We could rename it to ClientSrc but I'm not sure if that's really any better.
I strongly prefer src folder. I talk to some front-end guys, and they used to see some src or app folder as front app folder. But you are right - this for UI only apps, but for combined it could be difference. ClientSrc is not quite good imho, since it still not proper cased for front-end app. Usualy they have different from .net naming convention for folder. It can be client or may be client-src. The case is pretty serious thing when you tolk about front-end, since it usually builded on linux machines (you know case sensitive folder etc 😰 ). Usually front-end do not use any came case notations for folders.
In my opinion if there will be such option in yo generator it would be really nice! 🐱
Also keep in mind the latest structure for ASP dotnet core solutions in Visual Studio (and possibly other project types?) is to create a src folder that contains all projects under the solution folder. Renaming ClientApp to src would be confusing I think.
Reacted by Jonathan Kuleff, Wayne Mather, V and Adil Mughal
@VishalMadhvani - I would prefer the code not to be in wwwroot/src. It would be better for the source be outside the tree as that would be .ts files.
wwroot/clientapp should contain the emitted es5 code for the browser to consume (or whatever depending on the rules done by the developer to pack the emitted code). The key takeway is the source outside wwwroot and emitted/bundled code inside it.
Typically it would just be named app since that's where the main components / etc are located. Also since it's being server-side rendered it's not "just" a client-side app :)
I prefer it will not be called just src, since someone will put their HomeController.cs there. It not a good idea to mix *.ts and *.cs files in the same folder.
Based on this discussion, it doesn't look like there will be one particular layout that everyone would consider ideal, so whatever we do will be arbitrary.
My best recommendation is that you rename ClientApp to whatever you like best in your own project. With this starting point, at least it's easy to rename and then search-replace for any references to the string ClientApp. Also, having a shared starting point for everyone makes the documentation much easier to understand (vs having warnings in every code snippet that you might have chosen a different name).
Activity
SteveSandersonMS commentedon May 2, 2016
Good question.
It doesn't seem necessarily appropriate to use the name
srcfor that, because this project includes both server and client aspects, both of which are "source" files. This is different from the starter kits you've linked to, which are client-only apps (and as such, have no source files besides their React/Angular/Aurelia code).We could rename it to
ClientSrcbut I'm not sure if that's really any better.What do you think?
laskoviymishka commentedon May 4, 2016
I strongly prefer
srcfolder. I talk to some front-end guys, and they used to see somesrcorappfolder as front app folder. But you are right - this for UI only apps, but for combined it could be difference.ClientSrcis not quite good imho, since it still not proper cased for front-end app. Usualy they have different from .net naming convention for folder. It can beclientor may beclient-src. The case is pretty serious thing when you tolk about front-end, since it usually builded on linux machines (you know case sensitive folder etc 😰 ). Usually front-end do not use any came case notations for folders.In my opinion if there will be such option in yo generator it would be really nice! 🐱
VishalMadhvani commentedon Jul 12, 2016
how about wwwroot/src?
chris-herring commentedon Jul 13, 2016
Also keep in mind the latest structure for ASP dotnet core solutions in Visual Studio (and possibly other project types?) is to create a src folder that contains all projects under the solution folder. Renaming ClientApp to src would be confusing I think.
Wayne-Mather commentedon Jul 13, 2016
@VishalMadhvani - I would prefer the code not to be in wwwroot/src. It would be better for the source be outside the tree as that would be .ts files.
wwroot/clientapp should contain the emitted es5 code for the browser to consume (or whatever depending on the rules done by the developer to pack the emitted code). The key takeway is the source outside wwwroot and emitted/bundled code inside it.
RobCannon commentedon Jul 28, 2016
I would prefer clientsrc. But it definitely needs to be lower case to match javascript developer conventions.
MarkPieszak commentedon Jul 28, 2016
Typically it would just be named
appsince that's where the main components / etc are located. Also since it's being server-side rendered it's not "just" a client-side app :)andreymir commentedon Jul 30, 2016
I prefer it will not be called just
src, since someone will put their HomeController.cs there. It not a good idea to mix *.ts and *.cs files in the same folder.adilmughal commentedon Aug 6, 2016
I have seen some projects, which include both server and client side code, have "src" folder containing "server" and "client".
SteveSandersonMS commentedon Sep 29, 2016
Based on this discussion, it doesn't look like there will be one particular layout that everyone would consider ideal, so whatever we do will be arbitrary.
My best recommendation is that you rename
ClientAppto whatever you like best in your own project. With this starting point, at least it's easy to rename and then search-replace for any references to the stringClientApp. Also, having a shared starting point for everyone makes the documentation much easier to understand (vs having warnings in every code snippet that you might have chosen a different name).