Relative Content

Tag Archive for object-oriented

Best way to load application settings

A simple way to keep the settings of a Java application is represented by a text file with “.properties” extension containing the identifier of each setting associated with a specific value (this value may be a number, string, date, etc..). C# uses a similar approach, but the text file must be named “App.config”. In both cases, in source code you must initialize a specific class for reading settings: this class has a method that returns the value (as string) associated with the specified setting identifier.

How can we protect the namespace of an object in Javascript?

Continuing from my previous question: Javascript simple code to understand prototype-based OOP basics
Let’s say we run into console this two separate objects(even if they are called child and parent there is no inheritance between them):