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 4 years ago.
Improve this question
I'm planning to design an asp.net MVC web application which keeps its constant values such as Page Titles, Label Values, Tooltips, Page Headers, Menu titles and etc. in a separate common location.
when I do this research one way to this achieve this expectation, is using resource files (.resx)
So I found this article Create Multi-Language WebSite in Asp.Net MVC – Localization
I did hands-on project, which retrieves label names from layout files and HTML pages and its working properly.
But it seems, usage of resource files (.resx) is to achieve Localization
So I have following ambiguities
If this is not the best way, what are the other alternatives
If this is a good approach, will it affect application performance(like lagging the website than accessing directly from HTML pages)
I don't often use .resx for resources, but that's just personal preference.
They work fine and I have never run into performance issues with them.
For localization and similar string resources, I usually create a JSON file and make it an embedded resource instead. The benefit to this is that it's easier to work with outside of Visual Studio and .NET.
That's just an alternative though. Either practice is fine.
Related
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.
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.
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 starting a project in asp.net. I want to use 3 layer architecture. now I have problem with layers. I manage these layers like this:
but I have seen somewhere that uses App_Code and some other formats. could you please help me which one is true and standard?
App_Code is a special ASP.NET folder which is used by ASP.NET Websites. It is not used by precompiled ASP.NET applications. You can read more about the differences between the two in this article. So if UI is an ASP.NET Website you could use the App_Code folder to put some logic although this is better suited to external libraries as you have in your current design. This allows for better unit testability of this code and reusability.
Avoid the use of App_Code. Anything you put in here doesn't compile until the site is executed. Any dependency that your forms and user controls have is best put into your UI layer, outside of the main web folder. You'll have a lot more peace with objects that are compiled early rather than later.
Now-a-days I see this standard a lot:
ProjectName
-ProjectName.Core (All poco classes and interfaces)
-ProjectName.Data (All entity framework stuff)
-ProjectName.Service (All business logic)
-ProjectName.Web (All font end logic)
"Core" is reference in all projects to move data around.
"Data" is referenced only in "Service".
"Service" is referenced only in "Web".
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 9 years ago.
Improve this question
I am follow this article and ASP.NET learning site in order to build simple web site. i have database with an objects, each object represent file on dist and several properties (size, name etc...) and i have a question:
After add the controller like in this article (min 1:45) and run my application it navigate into my files page:
And to my file details:
How hard is (i am not new developer but totally new in websites) to change this 2 pages (default looking) to something else / other design ? (i follow ASP.NET learning site guides but sometimes is hard to implement it alone i i want something else)
BTW, i will glad for some screenshots\examples\tutorials for new look
Within the project there is a Content folder, you will find you CSS and image files etc. in here. Your Views folder contains the html and razor view engine. If you are not aware of how to change the structure and look of a website I recommend you start the tutorials here
http://www.w3schools.com/
And for further asp.net mvc help here
http://www.asp.net/mvc
If you are using visual studio, you might try the asp.net mvc template to start a new website project, it has initial design which might be good foundation to start and afterwards you need to change css files to get what you need.
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.