I was looking at babel through the React.NET nuget package to do some BabelBundel or BableTransform things but couldn't find any examples for transpiling. I saw plenty for taking jsx files and bundling those..
Dude I can't just tell you that. I don't think your code is organzied the right way. I agree that you need a WebApi controller but it shouldn't be returning a View();
@Riccardo you should have two sets of controllers, normal MVC controllers to return a view (even if it just embeds a single-page javascript app) and a set of WebAPI controllers that your javascript will make calls to to retreive data
well somewhere something needs to be defined that is either a localhost or an freightApi.com. Can you run the app with dev tools open and see where the data is actually coming from?
It's possible that the api isn't in your project at all. For the url provided, do you see any "base" urls nearby? Whatever goes in front of ___/api/freightelement/GetElements
It's essentially just a controller that doesn't return a view, only data. You generally hae a Controllers/Api/ folder that contains things like FreightElementController.cs
My last job that I brought up had several different data repositories that each provided data to a service later that did the work/ returns the data to the controller
.Net is a Microsoft thing. It's not going anywhere anytime soon. And I think they're making their new things open source, so it should be getting bigger and more support as time goes on
There is nothing wrong with using HTML/bootstrap on your front-end and using a C# .NET framework on the back. I guess my suggestion would to just pick something and hit the ground running. A lot of people have different preferences, and there is no right answer, which is my most opinion based questions get closed
@OTANO My previous job had an MVC website that split our controllers into web and api controllers, where the web controllers served raw html/css/angular apps and those angular apps made asycn calls to the api controllers, I really liked that structure
I couldn't find anything definitive either. For what it's worth, it took me about 3 revisions of my own edit to work up to wanting to make those strings into code-blocks, so I'm not super on my own side, just a little bit.
I understand that, and it makes sense. I guess my point is that the grey background of the code block helps certain things stand out, and I tend to think that expected output/input warrants that distinct, kind of like stacktraces, but on a smaller scale.
I might throw up a META post just to see if there is a consensus on convention, but the last time I made a META question the spread was +2/-12 so we'll see how my opinion holds up this time.
@AndrewMorton I wasn't trying to start a fight, and I agree with for everyone. I'm simply projecting my opinion onto everyone, which I realize is unrealistic, but finding the true opinion of everyone is also unreasonable. The big reason I use code blocks for output strings is so when I'm trying to answer a question, I can scroll back up and down and my eyes are drawn to those blocks more easily.
@AndrewMorton Aside from the markdown being labeled code I've found nothing that limits it's use to code. Everything I've read implies "Make the question easier to understand", which in my opinion applies to expected vs. actual output.
@AndrewMorton is that officially written anywhere? I've always found it easier to read strings if they stand out, but I am open to not doing it anymore.