c# - What does it mean the something is Hardcoded ? -


I am following a movie MVC tutorial, and the author says the following:
  

Code> Public String Index () {Return "This is my default & lt; / b & gt; action ..."; }

Currently, the index method gives a string with a message that is a hard code in the controller class. Change the indexing method to return a visual object, as shown in the following code:

  public performance index () {return view (); }   

OK, okay, so he changed the signature of the ceremony. But why does he call it hardcode?

When you do hard work , then this is usually the string Refers to things like values ​​and other settings that are part of a compiled code.

In short, if you want to return the index method, then you have to make changes and recompile.

Use configuration files for optional settings, such as app.config and web.config files when it comes to certain strings (which are used as user interfacing messages) , You use resource files that allow you to store multi language strings as well.

This file lets you do the application without the need to recompile everything. It is desirable (usually) because:

  1. While working in a production environment, this is usually the case where you have the code that issues flagged by the user It may be solved if you need to recompile and re-deploy to make any changes to a text message (which can happen especially during a marketing campaign), to change the code, to recompile the code, unwanted circumstances Rtn or in progress deployed that may change.

  2. Some clients may have own marketing people and want to give them access to some site pages. If they can change the text on the journey, then generally they are saved while going through the development company, which results in more happy customers than usually .

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -