Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Contant UI messages in .NET

Posted on 2016-09-08
1
Medium Priority
?
130 Views
Last Modified: 2016-10-21
Hi

I have some standard UI messages like Error or Info. All are sent from the .Net Web Api service to UI angularjs.

There may be around 5-10 messages for now. This may increase in future.

1> Should I maintain them in the respective Business Class as constants.
2> keep them in Web.Config of the Web api
3> Or Global.asax of the Web api

What is the best practice. If you have any examples i.e helpful also. considering or performance, code maintenance and resusability. There is no database here.

Thanks in Advance
0
Comment
Question by:Member_2_7967608
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 30

Accepted Solution

by:
anarki_jimbel earned 2000 total points
ID: 41793693
As I understand these messages are intended for users (customers). In this case I wouldn't maintain these messages hard-coded in business classes. You may need to change them, or you may need to translate them (which is quite common). In this case config file is better, I'd say.

Also check this MS forum: Where to keep an application constant?

Or this one: ASP.NET MVC - Using Resource Files to Manage String Constants

Eventually it depends on your specific needs.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question