How to call views in other solutions [closed] - c#

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
new job, new giant website made of multiple solutions, I have to develop a new page:
I'm in solution A, I want to load a view in solution B... How does this work, its my first experience with multiple solutions websites.
both solutions are in asp.net c# mvc

Presumably you are working within an existing codebase with plenty of examples? This question is fairly vague, but my assumption would be that your views are being routed by a controller which determines the URL of the page. I can't tell based on your tags though.
If this is the case, then it doesn't matter how many projects are running as long as you hit that URL. The controller acts as an API and will handle the request as long as that project is running. At my job we run a composite application using ASP.NET Core with a dedicated "content discovery" project which acts as a middleware API for handling all route requests from all (and we have a lot) of our various projects that are working together but it doesn't need to be that complicated.

Related

c# solution architecture for signal-r and angular [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I would like to build a c# spa application using angular with real-time messaging signal-r. The signal-r should read the data continuously from a data source and publish the updated data to the user and store the data in a database as well. It should also enable the chatting of the users.The expected number of users is around a hundred.
For such application what should be the best architectural structure of the solution? Should I implement two (three?) projects, e.g. one for the web app and the other for the signal-r, running as two applications? Then, in this case, how can I do the messaging between the applications? Or should I implement a single project for all of these? It would be best if you can provide the pros and cons of these alternatives or provide any other option.
Start with one project.
For 100 simultaneous users, you aren't even close to worried about load. Any simple hosting plan would take care of it easily. If you get more, ASP.NET and SignalR work just fine behind a load balancer (though certain operations can get more complicated).
A properly architected application won't be difficult to split into multiple processes in the future if it ever came to that, and doing so now is just adding mounds of complexity for no appreciable benefit. This goes double since it sounds like you are just starting out.

Modular .NET Core Web Application with AngularJS and WebAPI [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I want to working on the Single Page Application Based on .Net Core 2.0 with AngularJS for front-end. We have request that the application must be modular, which means that we must separate Back-end and front-end for each modules. We have been trying to find best approach for the project.
We try to use ASP.NET Boilerplate - Application Framework for this approach but i don't know how to support static files such as html and JavaScript files for angular per modules and We cannot configured Main Web-app to lookup static files in different location (modules must separate with project files).
I cannot find examples for this case (Modular App Based on .NET core and WebAPI and AngularJS,Typescript ...). Do anybody have suggestion how can we solve this problem, or do you suggest another approach or framework or sample code.
Note: The main problem is add routing With angularJS in Modules when modules are load in Main application start up Event.

Combine ASP.NET WebForms with DotVVM in single project [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
currently I have the web application using Web.Forms. It consist of more than thousand pages and rewriting everything from scratch will be extremely time consuming.
I'm planning to gradually rewrite each page while the others remains as webforms.
Is that even possible? Having mix of DotVVM and Web.Forms pages within single project?
What would you suggest to start with? Ideally I'd like users not to even know that the page looks different. I don't care about URLs as it's admin application.
From what I learned so far I need to duplicate my current MasterPage to the .dotmaster page and then add views for pages I am rewriting.
Thanks for suggestions.
I have created a sample app which shows how to combine ASP.NET Web Forms and DotVVM in one project.
Basically you need to install DotVVM.Owin and Microsoft.Owin.Host.SystemWeb packages in the project, add the OWIN Startup class where you register DotVVM middleware, and add the project type GUID in the .csproj file to make the Visual Studio extension for DotVVM work.

Why you would choose ASP.NET MVC over SPA + ASP.NET WebAPI? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm asking this just to see experiences from others.
For most of the cases having ASP MVC web site is an overhead. At least for me it's much cleaner and easier to have WebAPI which responds with JSON and then you can attach either SPA application or Mobile app or whatever.
I have a feeling that if you are using ASP MVC controllers will not be controllers, but controllers full of the if conditions and some session bags which are hanging around. Views are combination of HTML and Razor which in most cases looks really ugly and full of "TODOs" ;)
I can understand if it's used in older projects and now we just need to maintain them. But when you are starting a new one, why you would choose ASP.NET MVC or any other similar framework?
In my opinion, it is all about your expectations - if you need REST you should take WebAPI of course, but in case of RPC Style Actions requirements in your project, MVC will be better choice
It depends on the resources available. If you have a team already that is doing all pure UI (all request/response to the backend is via a RESTful API), then you can have those team create the UI for you and you can focus on the API. These UI applications are mostly client-facing products.
But sometimes in your team there is a need to develop in-house or internal applications such admin/operations applications, and the UI requirement is not as sophisticated , the teams skillset is not heavy on UI, and there is a need to develop the application ASAP, then I would go with MVC.

What are advantages & disadvantages of creating multiple controllers in single project using asp.net mvc2 [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am creating a asp.net mvc2 project which contains multiple modules in the project.I am thinking to create supprate controller for each module, but i want to know what are the advantages & disadvantages out of it?
Seperate controllers means a Seperation of Concerns, you would have separate controllers to handle logic that should be separated. So you won't get a cluttered controller handling everything in your application. Besides clarity in your application, this brings the benefit that if you need to change one thing, you don't break other code handling other logic in the same place.
Naturally this separation is also present in your Views folder, so you'd have clear oversight what's going on where in your app.
Also, if you have a lot of dependencies that your one controller needs (like services getting different domain models) you would have these listed in one place, which would make it less clear what the primarily function of that controller is. It's nicer to have more controllers with less dependencies each.
Another benefit is that you get user friendly Urls without much effort:
www.domain.com\home\index
Pretty much spells out this is the homepage.
And:
www.domain.com\account\login
does so too.
Basically, make objects (controllers) for each "section" of your web app, like you would make objects for each functionality of the business logic.
i would read this article: Biggest advantage to using ASP.Net MVC vs web forms
since it already covered your question for a big part.

Categories