damienbod/AngularWebpackVisualStudio

Your Custom Project vs Dotnet Angular Template?

Iamguy84 opened this issue · 5 comments

Hi,

What is difference between your custom project and Dotnet Angular template (ASP.NET Core with Angular) and why your custom project is SLOWER than Angular Template?

I am waiting for your response.

Thanks in Advance.

Hey,

I am not quite sure what you mean with "differences" because there are a lot of differences in many ways. There are different files used, a different architecture etc.

But let me explain the most important parts a bit:

First of all the Visual Studio Template has Server Side Rendering (SSR) activated which our template has not. To see how this is working you can just create a new Project in Visual Studio and see what is done there. It is a great example imho.

However: The file structure of the client app in the VS Template does not follow the best practises imho. It has no lettable operators (which can be easily introduced but like I said, I dont know in which kind of differences you are interested). In addition to that it is using the ViewBag which is a bad practice as ViewModels are a lot cleaner.

The biggest thing however is that client and server are not seperated. With that I mean that in the VS Template if a request is coming in the server renders the first site and is returning a view.

If you are doing web development you have frontend and backend development. Today there is REST as a standard to build your APIs which the client can call with HTTP-Calls. Client and server should be completely seperated. Client side has many topics, tools, a complete own ecosystem, even complete jobs exist only on frontend development like UX, Design and javascript developers. The backend, if kept seperated, can then be easily switched in technology or hardware. It can scale differently. The server does not care about the frontend (which can be an app, an WPF application etc.) and the frontend does not care about the backend (if its using ASP.NET Core, Java etc.) .

I personally seperate my application in different folders ("client"/"server") to switch easily and I am also using different tools for developing it. This template here is for developers who are into Visual Studio and do not want to use anything else but keep the client and server code seperated or have a situation where the client-side code can be extracted easily.

I touched some small and some big points here, as, again, I dont know exactly on which differences you are pointing at.

To be clear: We do not want to compete with the VS Template as we think its great work and you should decide what is best for you and your situation.

However I hope I did help you a bit :)

Fabian

PS: I don't know why our template is slower, have to investigate :)

Closing this issue as I think the question got answered.

@FabianGosebrink
Sorry for late reply. I was extremely busy.
Anyways, I was asking you about webpack.
Dotnet Angular template with Webpack is very faster than your custom project with webpack. Correct me if i am wrong. ;)

Can you be more precise? Faster in reload? Faster in building? Like I said, I have to investigate :)

Hello @FabianGosebrink
I'm trying your template right now.

I came to it after several weeks of trying the said dotnet angular template.
I have to say that I ran into multiple issues there. Generally, I solved most of them but got some drawbacks. But finally what brings me here is that it seems I'm consistently getting in troubles once trying to use third-party code like a theme I've purchased recently from ThemeForest.

I haven't understood all asp prerendering concepts quite well, but I feel that they mix together stuff that should be done completely separate. Front-end devs are not aware of asp prerendering and setting up it in webpack.config.js leads to conflicting webpack configuration in other's code.

So I'm quite happy to find your project, and this thread specifically, because you've just confirmed my thoughts. Thank you and other authors!