<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rsoni</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rsoni"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Rsoni"/>
	<updated>2026-06-04T23:49:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=39493</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=39493"/>
		<updated>2010-10-29T20:05:04Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://en.wikipedia.org/wiki/Namespace Namespaces] give you control over the visibility of the properties and methods that you create in a program.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized. Lets use an analogy to [http://en.wikipedia.org/wiki/File_system file system] in the computer which uses [http://en.wikipedia.org/wiki/Directory_%28file_systems%29 directories] and sub-directories. Namespaces in this context could be viewed as the path to a file in the directory/sub-directory which can uniquely identify each file. User can create more than one files with same name in different directories or sub-directories as they are in different namespaces.&amp;lt;sup&amp;gt;[http://snook.ca/archives/javascript/javascript_name]&amp;lt;/sup&amp;gt;&lt;br /&gt;
Another advantage of namespace is logical grouping of source code.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
Above figure depicts the use of namespace in programming language. The left part of the diagram shows variable &amp;quot;var&amp;quot; used by two different contexts. Now, the context which wants to use the variable &amp;quot;var&amp;quot; should have some means of distinguishing between its declarations. This is where namespaces comes into account. As shown in the second part of the diagram each variable &amp;quot;var&amp;quot; can now be identified independently.&lt;br /&gt;
==Types of Namespaces==&lt;br /&gt;
Different languages support namespace either using implicit types or explicitly by using keyword 'namespace'.  &lt;br /&gt;
&lt;br /&gt;
===Implicit Namespaces===&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts. Some of the constructs of implicit namespaces in different languages are [http://en.wikipedia.org/wiki/Interface_%28Java%29 interfaces], [http://en.wikipedia.org/wiki/Java_package packages], [http://en.wikipedia.org/wiki/Scope_%28programming%29 scope], [http://en.wikipedia.org/wiki/Attribute_%28computing%29 attributes], etc.&lt;br /&gt;
&lt;br /&gt;
====Blocks====&lt;br /&gt;
Blocks are often used as an abstraction to resolve naming conflicts. In many languages blocks determine scope of the variables. Hence a variable declared in a particular block has its scope within the block. Hence, we can think of a block as a namespace.&lt;br /&gt;
&lt;br /&gt;
Below is the example that shows how a block resolves naming ambiguities.&lt;br /&gt;
&lt;br /&gt;
 main()&lt;br /&gt;
 {&lt;br /&gt;
       int i=5;&lt;br /&gt;
       ------&lt;br /&gt;
       ------&lt;br /&gt;
       {&lt;br /&gt;
       int i=10;&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               //printing I here gives value equal to 10&lt;br /&gt;
       }&lt;br /&gt;
 //printing I here gives value equal to 5&lt;br /&gt;
 }&lt;br /&gt;
The above program depicts the concept of [http://en.wikipedia.org/wiki/Global_variable global] and [http://en.wikipedia.org/wiki/Local_variable local] variable initialization which can be viewed as a example of implicit namespace handled by programming language constructs. Disadvantage of this type of namespace is that programmer has to keep track of all variables in program and their namespaces.&lt;br /&gt;
&lt;br /&gt;
====Objects====&lt;br /&gt;
&lt;br /&gt;
In JavaScript&amp;lt;sup&amp;gt;[http://www.codeproject.com/KB/scripting/jsnamespaces.aspx]&amp;lt;/sup&amp;gt;, a namespace is actually an [http://en.wikipedia.org/wiki/Object_%28programming%29 object] which is used to reference methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in [http://en.wikipedia.org/wiki/JavaScript_language Javascript]:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
&lt;br /&gt;
The above example shows the use of object to reference the methods in its namespace. Hence the functions above are called using the object.&lt;br /&gt;
&lt;br /&gt;
====Packages====&lt;br /&gt;
&lt;br /&gt;
Packages&amp;lt;sup&amp;gt;[http://www.javacamp.org/javavscsharp/namespace.html]&amp;lt;/sup&amp;gt; can be used as a mechanism to organize [http://en.wikipedia.org/wiki/Class_%28programming%29 classes] into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in [http://en.wikipedia.org/wiki/Java_language Java]:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The above code snippet shows how a package can behave as a namespace in some programming language. Here, package A and package B are two different namespaces with variable var in each of them.&lt;br /&gt;
&lt;br /&gt;
====Modules====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby programming language:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
The above code snippet shows the use of modules in a form of namespace in [http://en.wikipedia.org/wiki/Ruby_language Ruby language].The methods are referenced using the name of the module as shown in the code. Hence there is no clash on method name 'sin'.&lt;br /&gt;
&lt;br /&gt;
====Attributes====&lt;br /&gt;
XML namespaces&amp;lt;sup&amp;gt;[http://en.wikipedia.org/wiki/XML_namespace]&amp;lt;/sup&amp;gt; provide method for qualifying element and attribute names by associating them with namespaces identified by unique [http://en.wikipedia.org/wiki/URI Uniform Resource Identifier] URI references. For example, Id could be in both vocabularies, employee and student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved [http://en.wikipedia.org/wiki/XML XML] attribute xmlns, the value of which must be an [http://en.wikipedia.org/wiki/Internationalized_Resource_Identifier Internationalized Resource Identifier] (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot;http://www.w3schools.com/fruits&amp;quot;&lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The above XML creates the namespace &amp;quot;fruits&amp;quot; and &amp;quot;furniture&amp;quot; in the attribute of xmlns in XML. This way we define namespaces in XML.&lt;br /&gt;
&lt;br /&gt;
===Explicit Namespaces===&lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules. Hence some languages use keyword &amp;quot;namespaces&amp;quot; for declaring namespaces. For example, [http://en.wikipedia.org/wiki/C_language C], [http://en.wikipedia.org/wiki/C%2B%2B CPP], [http://en.wikipedia.org/wiki/PHP PHP], [http://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29 C#].&lt;br /&gt;
Below is the CPP code which depicts use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace Square{&lt;br /&gt;
   int length = 4;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 namespace Rectangle{&lt;br /&gt;
   int  length = 12;&lt;br /&gt;
   int  breath  = 8;   &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Square::length &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Rectangle::length &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
The above code snippet tells us the use of explicit namespace by using the keyword &amp;quot;namespace&amp;quot; in C++. It defines length in two different namespaces using the keyword namespace.When the length is referenced it is referenced using the name of the namespace.&lt;br /&gt;
&lt;br /&gt;
Similarly, PHP&amp;lt;sup&amp;gt;[http://www.php.net/manual/en/language.namespaces.definition.php&amp;gt;&amp;lt;/sup&amp;gt; uses the namespace keyword to distinguish between identifiers.Below is an example of PHP using namespace keyword:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
  Namespace A;&lt;br /&gt;
  Const NAME = ‘this is constant’&lt;br /&gt;
  Function FUN()&lt;br /&gt;
  {&lt;br /&gt;
       -----&lt;br /&gt;
       -----&lt;br /&gt;
       return _MYVARIABLE_;&lt;br /&gt;
  }&lt;br /&gt;
  Class C&lt;br /&gt;
  {&lt;br /&gt;
       function print_this()&lt;br /&gt;
       {&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               return _THIS_METHOD_;&lt;br /&gt;
       }&lt;br /&gt;
  }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The above example denotes the use of namespace keyword in PHP language. Hence in the code const NAME,function fun() and class C are defined in Namespace A. Therefore, they are referenced using the namespace A.  &lt;br /&gt;
Similarly, C# also uses namespace keyword to distinguish names. Below is the code of C# showing use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace A&lt;br /&gt;
 {&lt;br /&gt;
   public class A1&lt;br /&gt;
   {&lt;br /&gt;
       static void Main()&lt;br /&gt;
       {&lt;br /&gt;
           B.B1.welcome();&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 namespace B&lt;br /&gt;
 {&lt;br /&gt;
   public class B1&lt;br /&gt;
   {&lt;br /&gt;
       public static void welcome()&lt;br /&gt;
       {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Welcome&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
The above code snippet shows the use of namespace keyword in C# language. Here, function main in namespace A calls to function 'welcome' from namespace B by referring its namespace_name.class_name.function_name.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Every programming language support namespaces at different abstraction level. They are not just containers but designed to allow simple,fast and efficient usage and understanding of the code. Namespaces actually provide luxury to declare multiple variable with same name which in turn protect code with name clashes. Using namespace generally gives a better structure to program which makes easier to maintain when the code length increases. In summary, different languages have different methods of providing namespace functionality be it explicit or implicit to provide better coding experience to the user.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
# [http://snook.ca/archives/javascript/javascript_name NameSpace]&lt;br /&gt;
# [http://www.codeproject.com/KB/scripting/jsnamespaces.aspx Namespaces in Javascript]&lt;br /&gt;
# [http://www.javacamp.org/javavscsharp/namespace.html Namespace vs. Packages]&lt;br /&gt;
# [http://en.wikipedia.org/wiki/XML_namespace XML Namespace]&lt;br /&gt;
# [http://www.php.net/manual/en/language.namespaces.definition.php PHP Manual by Mehdi Achour, Friedhelm Betz, Antony Dovgal, Nuno Lopes, Hannes Magnusson]&lt;br /&gt;
Georg Richter&lt;br /&gt;
Damien Seguy&lt;br /&gt;
Jakub Vrana&lt;br /&gt;
# Explicit Namespaces, Franz Achermann and Oscar Nierstrasz, Software Composition Group, University of Berne&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=39483</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=39483"/>
		<updated>2010-10-29T19:48:47Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. Namespaces &amp;lt;sup&amp;gt;[http://www.google.com/search?hl=en&amp;amp;defl=en&amp;amp;q=define:Namespace&amp;amp;sa=X&amp;amp;ei=Gqy_TMyYK8OC8ga_ioGCBQ&amp;amp;sqi=2&amp;amp;ved=0CBMQkAE]&amp;lt;/sup&amp;gt; give you control over the visibility of the properties and methods that you create in a program.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized&amp;lt;sup&amp;gt;[http://snook.ca/archives/javascript/javascript_name]&amp;lt;/sup&amp;gt;. Lets use an analogy to [http://en.wikipedia.org/wiki/File_system file system] in the computer which uses [http://en.wikipedia.org/wiki/Directory_%28file_systems%29 directories] and sub-directories. Namespaces in this context could be viewed as the path to a file in the directory/sub-directory which can uniquely identify each file. User can create more than one files with same name in different directories or sub-directories as they are in different namespaces.&lt;br /&gt;
Another advantage of namespace is logical grouping of source code.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
Above figure depicts the use of namespace in programming language. The identifier &amp;quot;var&amp;quot; is used in both the namespaces and while using them we need to specify to which namespace they belong to.&lt;br /&gt;
&lt;br /&gt;
==Types of Namespaces==&lt;br /&gt;
Different languages support namespace either using implicit types or explicitly by using keyword 'namespace'.  &lt;br /&gt;
&lt;br /&gt;
===Implicit Namespaces===&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts. Some of the constructs of implicit namespaces in different languages are [http://en.wikipedia.org/wiki/Interface_%28Java%29 interfaces], [http://en.wikipedia.org/wiki/Java_package packages], [http://en.wikipedia.org/wiki/Scope_%28programming%29 scope], [http://en.wikipedia.org/wiki/Attribute_%28computing%29 attributes], etc.&lt;br /&gt;
&lt;br /&gt;
====Blocks====&lt;br /&gt;
Blocks are often used as an abstraction to resolve naming conflicts. In many languages blocks determine scope of the variables. Hence a variable declared in a particular block has its scope within the block. Hence, we can think of a block as a namespace.&lt;br /&gt;
&lt;br /&gt;
Below is the example that shows how a block resolves naming ambiguities.&lt;br /&gt;
&lt;br /&gt;
 main()&lt;br /&gt;
 {&lt;br /&gt;
       int i=5;&lt;br /&gt;
       ------&lt;br /&gt;
       ------&lt;br /&gt;
       {&lt;br /&gt;
       int i=10;&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               //printing I here gives value equal to 10&lt;br /&gt;
       }&lt;br /&gt;
 //printing I here gives value equal to 5&lt;br /&gt;
 }&lt;br /&gt;
The above program depicts the concept of [http://en.wikipedia.org/wiki/Global_variable global] and [http://en.wikipedia.org/wiki/Local_variable local] variable initialization which can be viewed as a example of implicit namespace handled by programming language constructs. Disadvantage of this type of namespace is that programmer has to keep track of all variables in program and their namespaces.&lt;br /&gt;
&lt;br /&gt;
====Objects====&lt;br /&gt;
&lt;br /&gt;
In JavaScript&amp;lt;sup&amp;gt;[http://www.codeproject.com/KB/scripting/jsnamespaces.aspx]&amp;lt;/sup&amp;gt;, a namespace is actually an [http://en.wikipedia.org/wiki/Object_%28programming%29 object] which is used to reference methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in [http://en.wikipedia.org/wiki/JavaScript_language Javascript]:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
&lt;br /&gt;
The above example shows the use of object to reference the methods in its namespace. Hence the functions above are called using the object.&lt;br /&gt;
&lt;br /&gt;
====Packages====&lt;br /&gt;
&lt;br /&gt;
Packages&amp;lt;sup&amp;gt;[http://www.javacamp.org/javavscsharp/namespace.html]&amp;lt;/sup&amp;gt; can be used as a mechanism to organize [http://en.wikipedia.org/wiki/Class_%28programming%29 classes] into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in [http://en.wikipedia.org/wiki/Java_language Java]:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The above code snippet shows how a package can behave as a namespace in some programming language. Here, package A and package B are two different namespaces with variable var in each of them.&lt;br /&gt;
&lt;br /&gt;
====Modules====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby programming language:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
The above code snippet shows the use of modules in a form of namespace in [http://en.wikipedia.org/wiki/Ruby_language Ruby language].The methods are referenced using the name of the module as shown in the code. Hence there is no clash on method name 'sin'.&lt;br /&gt;
&lt;br /&gt;
====Attributes====&lt;br /&gt;
XML namespaces&amp;lt;sup&amp;gt;[http://en.wikipedia.org/wiki/XML_namespace]&amp;lt;/sup&amp;gt; provide method for qualifying element and attribute names by associating them with namespaces identified by unique [http://en.wikipedia.org/wiki/URI URI] references. For example, Id could be in both vocabularies, employee and student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved [http://en.wikipedia.org/wiki/XML XML] attribute xmlns, the value of which must be an [http://en.wikipedia.org/wiki/Internationalized_Resource_Identifier Internationalized Resource Identifier] (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot;http://www.w3schools.com/fruits&amp;quot;&lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The above XML creates the namespace &amp;quot;fruits&amp;quot; and &amp;quot;furniture&amp;quot; in the attribute of xmlns in XML. This way we define namespaces in XML.&lt;br /&gt;
&lt;br /&gt;
===Explicit Namespaces===&lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules. Hence some languages use keyword &amp;quot;namespaces&amp;quot; for declaring namespaces. For example, [http://en.wikipedia.org/wiki/C_language C], [http://en.wikipedia.org/wiki/C%2B%2B CPP], [http://en.wikipedia.org/wiki/PHP PHP], [http://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29 C#].&lt;br /&gt;
Below is the CPP code which depicts use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace Square{&lt;br /&gt;
   int length = 4;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 namespace Rectangle{&lt;br /&gt;
   int  length = 12;&lt;br /&gt;
   int  breath  = 8;   &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Square::length &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Rectangle::length &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
The above code snippet tells us the use of explicit namespace by using the keyword &amp;quot;namespace&amp;quot; in C++. It defines length in two different namespaces using the keyword namespace.When the length is referenced it is referenced using the name of the namespace.&lt;br /&gt;
&lt;br /&gt;
Similarly, PHP&amp;lt;sup&amp;gt;[http://www.php.net/manual/en/language.namespaces.definition.php&amp;gt;&amp;lt;/sup&amp;gt; uses the namespace keyword to distinguish between identifiers.Below is an example of PHP using namespace keyword:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
  Namespace A;&lt;br /&gt;
  Const NAME = ‘this is constant’&lt;br /&gt;
  Function FUN()&lt;br /&gt;
  {&lt;br /&gt;
       -----&lt;br /&gt;
       -----&lt;br /&gt;
       return _MYVARIABLE_;&lt;br /&gt;
  }&lt;br /&gt;
  Class C&lt;br /&gt;
  {&lt;br /&gt;
       function print_this()&lt;br /&gt;
       {&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               return _THIS_METHOD_;&lt;br /&gt;
       }&lt;br /&gt;
  }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The above example denotes the use of namespace keyword in PHP language. Hence in the code const NAME,function fun() and class C are defined in Namespace A. Therefore, they are referenced using the namespace A.  &lt;br /&gt;
Similarly, C# also uses namespace keyword to distinguish names. Below is the code of C# showing use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace A&lt;br /&gt;
 {&lt;br /&gt;
   public class A1&lt;br /&gt;
   {&lt;br /&gt;
       static void Main()&lt;br /&gt;
       {&lt;br /&gt;
           B.B1.welcome();&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 namespace B&lt;br /&gt;
 {&lt;br /&gt;
   public class B1&lt;br /&gt;
   {&lt;br /&gt;
       public static void welcome()&lt;br /&gt;
       {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Welcome&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
The above code snippet shows the use of namespace keyword in C# language. Here, function main in namespace A calls to function 'welcome' from namespace B by referring its namespace_name.class_name.function_name.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Every programming language support namespaces at different abstraction level. They are not just containers but designed to allow simple,fast and efficient usage and understanding of the code. Namespaces actually provide luxury to declare multiple variable with same name which in turn protect code with name clashes. Using namespace generally gives a better structure to program which makes easier to maintain when the code length increases. In summary, different languages have different methods of providing namespace functionality be it explicit or implicit to provide better coding experience to the user.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
# [http://www.google.com/search?hl=en&amp;amp;defl=en&amp;amp;q=define:Namespace&amp;amp;sa=X&amp;amp;ei=Gqy_TMyYK8OC8ga_ioGCBQ&amp;amp;sqi=2&amp;amp;ved=0CBMQkAE Namespace]&lt;br /&gt;
# [http://snook.ca/archives/javascript/javascript_name NameSpace]&lt;br /&gt;
# [http://www.codeproject.com/KB/scripting/jsnamespaces.aspx Namespaces in Javascript]&lt;br /&gt;
# [http://www.javacamp.org/javavscsharp/namespace.html Namespace vs. Packages]&lt;br /&gt;
# [http://en.wikipedia.org/wiki/XML_namespace XML Namespace]&lt;br /&gt;
# [http://www.php.net/manual/en/language.namespaces.definition.php PHP Manual by Mehdi Achour, Friedhelm Betz, Antony Dovgal, Nuno Lopes, Hannes Magnusson]&lt;br /&gt;
Georg Richter&lt;br /&gt;
Damien Seguy&lt;br /&gt;
Jakub Vrana&lt;br /&gt;
# Explicit Namespaces, Franz Achermann and Oscar Nierstrasz, Software Composition Group, University of Berne&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=39244</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=39244"/>
		<updated>2010-10-21T03:32:09Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: /* Attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://www.google.com/search?hl=en&amp;amp;defl=en&amp;amp;q=define:Namespace&amp;amp;sa=X&amp;amp;ei=Gqy_TMyYK8OC8ga_ioGCBQ&amp;amp;sqi=2&amp;amp;ved=0CBMQkAE Namespaces] give you control over the visibility of the properties and methods that you create in a program.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized. Lets use an analogy to [http://en.wikipedia.org/wiki/File_system file system] in the computer which uses [http://en.wikipedia.org/wiki/Directory_%28file_systems%29 directories] and sub-directories. Namespaces in this context could be viewed as the path to a file in the directory/sub-directory which can uniquely identify each file. User can create more than one files with same name in different directories or sub-directories as they are in different namespaces. &lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
Above figure depicts the use of namespace in programming language. The identifier &amp;quot;var&amp;quot; is used in both the namespaces and while using them we need to specify to which namespace they belong to.&lt;br /&gt;
&lt;br /&gt;
==Types of Namespaces==&lt;br /&gt;
Different languages support namespace either using implicit types or explicitly by using keyword 'namespace'.  &lt;br /&gt;
&lt;br /&gt;
===Implicit Namespaces===&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts. Some of the constructs of implicit namespaces in different languages are [http://en.wikipedia.org/wiki/Interface_%28Java%29 interfaces], [http://en.wikipedia.org/wiki/Java_package packages], [http://en.wikipedia.org/wiki/Scope_%28programming%29 scope], [http://en.wikipedia.org/wiki/Attribute_%28computing%29 attributes], etc.&lt;br /&gt;
&lt;br /&gt;
====Blocks====&lt;br /&gt;
Blocks are often used as an abstraction to resolve naming conflicts. In many languages blocks determine scope of the variables. Hence a variable declared in a particular block has its scope within the block. Hence, we can think of a block as a namespace.&lt;br /&gt;
&lt;br /&gt;
Below is the example that shows how a block resolves naming ambiguities.&lt;br /&gt;
&lt;br /&gt;
 main()&lt;br /&gt;
 {&lt;br /&gt;
       int i=5;&lt;br /&gt;
       ------&lt;br /&gt;
       ------&lt;br /&gt;
       {&lt;br /&gt;
       int i=10;&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               //printing I here gives value equal to 10&lt;br /&gt;
       }&lt;br /&gt;
 //printing I here gives value equal to 5&lt;br /&gt;
 }&lt;br /&gt;
The above program depicts the concept of [http://en.wikipedia.org/wiki/Global_variable global] and [http://en.wikipedia.org/wiki/Local_variable local] variable initialization which can be viewed as a example of implicit namespace handled by programming language constructs. Disadvantage of this type of namespace is that programmer has to keep track of all variables in program and their namespaces.&lt;br /&gt;
&lt;br /&gt;
====Objects====&lt;br /&gt;
&lt;br /&gt;
In JavaScript, a namespace is actually an [http://en.wikipedia.org/wiki/Object_%28programming%29 object] which is used to reference methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in [http://en.wikipedia.org/wiki/JavaScript_language Javascript]:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
&lt;br /&gt;
The above example shows the use of object to reference the methods in its namespace. Hence the functions above are called using the object.&lt;br /&gt;
&lt;br /&gt;
====Packages====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize [http://en.wikipedia.org/wiki/Class_%28programming%29 classes] into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in [http://en.wikipedia.org/wiki/Java_language Java]:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The above code snippet shows how a package can behave as a namespace in some programming language. Here, package A and package B are two different namespaces with variable var in each of them.&lt;br /&gt;
&lt;br /&gt;
====Modules====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby programming language:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
The above code snippet shows the use of modules in a form of namespace in [http://en.wikipedia.org/wiki/Ruby_language Ruby language].The methods are referenced using the name of the module as shown in the code. Hence there is no clash on method name 'sin'.&lt;br /&gt;
&lt;br /&gt;
====Attributes====&lt;br /&gt;
XML namespaces provide method for qualifying element and attribute names by associating them with namespaces identified by unique [http://en.wikipedia.org/wiki/URI URI] references. For example, Id could be in both vocabularies, employee and student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved [http://en.wikipedia.org/wiki/XML XML] attribute xmlns, the value of which must be an [http://en.wikipedia.org/wiki/Internationalized_Resource_Identifier Internationalized Resource Identifier] (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot;http://www.w3schools.com/fruits&amp;quot;&lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The above XML creates the namespace &amp;quot;fruits&amp;quot; and &amp;quot;furniture&amp;quot; in the attribute of xmlns in XML. This way we define namespaces in XML.&lt;br /&gt;
&lt;br /&gt;
===Explicit Namespaces===&lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules. Hence some languages use keyword &amp;quot;namespaces&amp;quot; for declaring namespaces. For example, [http://en.wikipedia.org/wiki/C_language C], [http://en.wikipedia.org/wiki/C%2B%2B CPP], [http://en.wikipedia.org/wiki/PHP PHP], [http://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29 C#].&lt;br /&gt;
Below is the CPP code which depicts use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace Square{&lt;br /&gt;
   int length = 4;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 namespace Rectangle{&lt;br /&gt;
   int  length = 12;&lt;br /&gt;
   int  breath  = 8;   &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Square::length &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Rectangle::length &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
The above code snippet tells us the use of explicit namespace by using the keyword &amp;quot;namespace&amp;quot; in C++. It defines length in two different namespaces using the keyword namespace.When the length is referenced it is referenced using the name of the namespace.&lt;br /&gt;
&lt;br /&gt;
Similarly, PHP uses the namespace keyword to distinguish between identifiers.Below is an example of PHP using namespace keyword:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
  Namespace A;&lt;br /&gt;
  Const NAME = ‘this is constant’&lt;br /&gt;
  Function FUN()&lt;br /&gt;
  {&lt;br /&gt;
       -----&lt;br /&gt;
       -----&lt;br /&gt;
       return _MYVARIABLE_;&lt;br /&gt;
  }&lt;br /&gt;
  Class C&lt;br /&gt;
  {&lt;br /&gt;
       function print_this()&lt;br /&gt;
       {&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               return _THIS_METHOD_;&lt;br /&gt;
       }&lt;br /&gt;
  }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The above example denotes the use of namespace keyword in PHP language.&lt;br /&gt;
Similarly, C# also uses namespace keyword to distinguish names. Below is the code of C# showing use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace A&lt;br /&gt;
 {&lt;br /&gt;
   public class A1&lt;br /&gt;
   {&lt;br /&gt;
       static void Main()&lt;br /&gt;
       {&lt;br /&gt;
           B.B1.welcome();&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 namespace B&lt;br /&gt;
 {&lt;br /&gt;
   public class B1&lt;br /&gt;
   {&lt;br /&gt;
       public static void welcome()&lt;br /&gt;
       {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Welcome&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
The above code snippet shows the use of namespace keyword in C# language. Here, function main in namespace A calls to function 'welcome' from namespace B by referring its namespace_name.class_name.function_name.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Every programming language support namespaces at different abstraction level. They are not just containers but designed to allow simple,fast and efficient usage and understanding of the code. Namespaces actually provide luxury to declare multiple variable with same name which in turn protect code with name clashes. Using namespace generally gives a better structure to program which makes easier to maintain when the code length increases. In summary, different languages have different methods of providing namespace functionality be it explicit or implicit to provide better coding experience to the user.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=39241</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=39241"/>
		<updated>2010-10-21T03:31:39Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: /* Attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://www.google.com/search?hl=en&amp;amp;defl=en&amp;amp;q=define:Namespace&amp;amp;sa=X&amp;amp;ei=Gqy_TMyYK8OC8ga_ioGCBQ&amp;amp;sqi=2&amp;amp;ved=0CBMQkAE Namespaces] give you control over the visibility of the properties and methods that you create in a program.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized. Lets use an analogy to [http://en.wikipedia.org/wiki/File_system file system] in the computer which uses [http://en.wikipedia.org/wiki/Directory_%28file_systems%29 directories] and sub-directories. Namespaces in this context could be viewed as the path to a file in the directory/sub-directory which can uniquely identify each file. User can create more than one files with same name in different directories or sub-directories as they are in different namespaces. &lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
Above figure depicts the use of namespace in programming language. The identifier &amp;quot;var&amp;quot; is used in both the namespaces and while using them we need to specify to which namespace they belong to.&lt;br /&gt;
&lt;br /&gt;
==Types of Namespaces==&lt;br /&gt;
Different languages support namespace either using implicit types or explicitly by using keyword 'namespace'.  &lt;br /&gt;
&lt;br /&gt;
===Implicit Namespaces===&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts. Some of the constructs of implicit namespaces in different languages are [http://en.wikipedia.org/wiki/Interface_%28Java%29 interfaces], [http://en.wikipedia.org/wiki/Java_package packages], [http://en.wikipedia.org/wiki/Scope_%28programming%29 scope], [http://en.wikipedia.org/wiki/Attribute_%28computing%29 attributes], etc.&lt;br /&gt;
&lt;br /&gt;
====Blocks====&lt;br /&gt;
Blocks are often used as an abstraction to resolve naming conflicts. In many languages blocks determine scope of the variables. Hence a variable declared in a particular block has its scope within the block. Hence, we can think of a block as a namespace.&lt;br /&gt;
&lt;br /&gt;
Below is the example that shows how a block resolves naming ambiguities.&lt;br /&gt;
&lt;br /&gt;
 main()&lt;br /&gt;
 {&lt;br /&gt;
       int i=5;&lt;br /&gt;
       ------&lt;br /&gt;
       ------&lt;br /&gt;
       {&lt;br /&gt;
       int i=10;&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               //printing I here gives value equal to 10&lt;br /&gt;
       }&lt;br /&gt;
 //printing I here gives value equal to 5&lt;br /&gt;
 }&lt;br /&gt;
The above program depicts the concept of [http://en.wikipedia.org/wiki/Global_variable global] and [http://en.wikipedia.org/wiki/Local_variable local] variable initialization which can be viewed as a example of implicit namespace handled by programming language constructs. Disadvantage of this type of namespace is that programmer has to keep track of all variables in program and their namespaces.&lt;br /&gt;
&lt;br /&gt;
====Objects====&lt;br /&gt;
&lt;br /&gt;
In JavaScript, a namespace is actually an [http://en.wikipedia.org/wiki/Object_%28programming%29 object] which is used to reference methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in [http://en.wikipedia.org/wiki/JavaScript_language Javascript]:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
&lt;br /&gt;
The above example shows the use of object to reference the methods in its namespace. Hence the functions above are called using the object.&lt;br /&gt;
&lt;br /&gt;
====Packages====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize [http://en.wikipedia.org/wiki/Class_%28programming%29 classes] into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in [http://en.wikipedia.org/wiki/Java_language Java]:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The above code snippet shows how a package can behave as a namespace in some programming language. Here, package A and package B are two different namespaces with variable var in each of them.&lt;br /&gt;
&lt;br /&gt;
====Modules====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby programming language:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
The above code snippet shows the use of modules in a form of namespace in [http://en.wikipedia.org/wiki/Ruby_language Ruby language].The methods are referenced using the name of the module as shown in the code. Hence there is no clash on method name 'sin'.&lt;br /&gt;
&lt;br /&gt;
====Attributes====&lt;br /&gt;
XML namespaces provide method for qualifying element and attribute names by associating them with namespaces identified by unique [http://en.wikipedia.org/wiki/URI URI] references. For example, Id could be in both vocabularies, employee and student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved [http://en.wikipedia.org/wiki/XML XML] attribute xmlns, the value of which must be an [http://en.wikipedia.org/wiki/Internationalized_Resource_Identifier Internationalized Resource Identifier] (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot;&amp;lt;p&amp;gt; http://www.w3schools.com/fruits &amp;lt;/p&amp;gt;&amp;quot;&lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The above XML creates the namespace &amp;quot;fruits&amp;quot; and &amp;quot;furniture&amp;quot; in the attribute of xmlns in XML. This way we define namespaces in XML.&lt;br /&gt;
&lt;br /&gt;
===Explicit Namespaces===&lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules. Hence some languages use keyword &amp;quot;namespaces&amp;quot; for declaring namespaces. For example, [http://en.wikipedia.org/wiki/C_language C], [http://en.wikipedia.org/wiki/C%2B%2B CPP], [http://en.wikipedia.org/wiki/PHP PHP], [http://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29 C#].&lt;br /&gt;
Below is the CPP code which depicts use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace Square{&lt;br /&gt;
   int length = 4;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 namespace Rectangle{&lt;br /&gt;
   int  length = 12;&lt;br /&gt;
   int  breath  = 8;   &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Square::length &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Rectangle::length &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
The above code snippet tells us the use of explicit namespace by using the keyword &amp;quot;namespace&amp;quot; in C++. It defines length in two different namespaces using the keyword namespace.When the length is referenced it is referenced using the name of the namespace.&lt;br /&gt;
&lt;br /&gt;
Similarly, PHP uses the namespace keyword to distinguish between identifiers.Below is an example of PHP using namespace keyword:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
  Namespace A;&lt;br /&gt;
  Const NAME = ‘this is constant’&lt;br /&gt;
  Function FUN()&lt;br /&gt;
  {&lt;br /&gt;
       -----&lt;br /&gt;
       -----&lt;br /&gt;
       return _MYVARIABLE_;&lt;br /&gt;
  }&lt;br /&gt;
  Class C&lt;br /&gt;
  {&lt;br /&gt;
       function print_this()&lt;br /&gt;
       {&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               return _THIS_METHOD_;&lt;br /&gt;
       }&lt;br /&gt;
  }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The above example denotes the use of namespace keyword in PHP language.&lt;br /&gt;
Similarly, C# also uses namespace keyword to distinguish names. Below is the code of C# showing use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace A&lt;br /&gt;
 {&lt;br /&gt;
   public class A1&lt;br /&gt;
   {&lt;br /&gt;
       static void Main()&lt;br /&gt;
       {&lt;br /&gt;
           B.B1.welcome();&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 namespace B&lt;br /&gt;
 {&lt;br /&gt;
   public class B1&lt;br /&gt;
   {&lt;br /&gt;
       public static void welcome()&lt;br /&gt;
       {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Welcome&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
The above code snippet shows the use of namespace keyword in C# language. Here, function main in namespace A calls to function 'welcome' from namespace B by referring its namespace_name.class_name.function_name.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Every programming language support namespaces at different abstraction level. They are not just containers but designed to allow simple,fast and efficient usage and understanding of the code. Namespaces actually provide luxury to declare multiple variable with same name which in turn protect code with name clashes. Using namespace generally gives a better structure to program which makes easier to maintain when the code length increases. In summary, different languages have different methods of providing namespace functionality be it explicit or implicit to provide better coding experience to the user.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=39234</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=39234"/>
		<updated>2010-10-21T03:26:34Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://www.google.com/search?hl=en&amp;amp;defl=en&amp;amp;q=define:Namespace&amp;amp;sa=X&amp;amp;ei=Gqy_TMyYK8OC8ga_ioGCBQ&amp;amp;sqi=2&amp;amp;ved=0CBMQkAE Namespaces] give you control over the visibility of the properties and methods that you create in a program.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized. Lets use an analogy to [http://en.wikipedia.org/wiki/File_system file system] in the computer which uses [http://en.wikipedia.org/wiki/Directory_%28file_systems%29 directories] and sub-directories. Namespaces in this context could be viewed as the path to a file in the directory/sub-directory which can uniquely identify each file. User can create more than one files with same name in different directories or sub-directories as they are in different namespaces. &lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
Above figure depicts the use of namespace in programming language. The identifier &amp;quot;var&amp;quot; is used in both the namespaces and while using them we need to specify to which namespace they belong to.&lt;br /&gt;
&lt;br /&gt;
==Types of Namespaces==&lt;br /&gt;
Different languages support namespace either using implicit types or explicitly by using keyword 'namespace'.  &lt;br /&gt;
&lt;br /&gt;
===Implicit Namespaces===&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts. Some of the constructs of implicit namespaces in different languages are [http://en.wikipedia.org/wiki/Interface_%28Java%29 interfaces], [http://en.wikipedia.org/wiki/Java_package packages], [http://en.wikipedia.org/wiki/Scope_%28programming%29 scope], [http://en.wikipedia.org/wiki/Attribute_%28computing%29 attributes], etc.&lt;br /&gt;
&lt;br /&gt;
====Blocks====&lt;br /&gt;
Blocks are often used as an abstraction to resolve naming conflicts. In many languages blocks determine scope of the variables. Hence a variable declared in a particular block has its scope within the block. Hence, we can think of a block as a namespace.&lt;br /&gt;
&lt;br /&gt;
Below is the example that shows how a block resolves naming ambiguities.&lt;br /&gt;
&lt;br /&gt;
 main()&lt;br /&gt;
 {&lt;br /&gt;
       int i=5;&lt;br /&gt;
       ------&lt;br /&gt;
       ------&lt;br /&gt;
       {&lt;br /&gt;
       int i=10;&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               //printing I here gives value equal to 10&lt;br /&gt;
       }&lt;br /&gt;
 //printing I here gives value equal to 5&lt;br /&gt;
 }&lt;br /&gt;
The above program depicts the concept of [http://en.wikipedia.org/wiki/Global_variable global] and [http://en.wikipedia.org/wiki/Local_variable local] variable initialization which can be viewed as a example of implicit namespace handled by programming language constructs. Disadvantage of this type of namespace is that programmer has to keep track of all variables in program and their namespaces.&lt;br /&gt;
&lt;br /&gt;
====Objects====&lt;br /&gt;
&lt;br /&gt;
In JavaScript, a namespace is actually an [http://en.wikipedia.org/wiki/Object_%28programming%29 object] which is used to reference methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in [http://en.wikipedia.org/wiki/JavaScript_language Javascript]:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
&lt;br /&gt;
The above example shows the use of object to reference the methods in its namespace. Hence the functions above are called using the object.&lt;br /&gt;
&lt;br /&gt;
====Packages====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize [http://en.wikipedia.org/wiki/Class_%28programming%29 classes] into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in [http://en.wikipedia.org/wiki/Java_language Java]:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The above code snippet shows how a package can behave as a namespace in some programming language. Here, package A and package B are two different namespaces with variable var in each of them.&lt;br /&gt;
&lt;br /&gt;
====Modules====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby programming language:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
The above code snippet shows the use of modules in a form of namespace in [http://en.wikipedia.org/wiki/Ruby_language Ruby language].The methods are referenced using the name of the module as shown in the code. Hence there is no clash on method name 'sin'.&lt;br /&gt;
&lt;br /&gt;
====Attributes====&lt;br /&gt;
XML namespaces provide method for qualifying element and attribute names by associating them with namespaces identified by unique [http://en.wikipedia.org/wiki/URI URI] references. For example, Id could be in both vocabularies, employee and student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved [http://en.wikipedia.org/wiki/XML XML] attribute xmlns, the value of which must be an [http://en.wikipedia.org/wiki/Internationalized_Resource_Identifier Internationalized Resource Identifier] (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot; http://www.w3schools.com/fruits &amp;quot;&lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The above XML creates the namespace &amp;quot;fruits&amp;quot; and &amp;quot;furniture&amp;quot; in the attribute of xmlns in XML. This way we define namespaces in XML.&lt;br /&gt;
&lt;br /&gt;
===Explicit Namespaces===&lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules. Hence some languages use keyword &amp;quot;namespaces&amp;quot; for declaring namespaces. For example, C, CPP, PHP, C#.&lt;br /&gt;
Below is the CPP code which depicts use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace Square{&lt;br /&gt;
   int length = 4;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 namespace Rectangle{&lt;br /&gt;
   int  length = 12;&lt;br /&gt;
   int  breath  = 8;   &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Square::length &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Rectangle::length &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
The above code snippet tells us the use of explicit namespace by using the keyword &amp;quot;namespace&amp;quot; in C++. It defines length in two different namespaces using the keyword namespace.When the length is referenced it is referenced using the name of the namespace.&lt;br /&gt;
&lt;br /&gt;
Similarly, PHP uses the namespace keyword to distinguish between identifiers.Below is an example of PHP using namespace keyword:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
  Namespace A;&lt;br /&gt;
  Const NAME = ‘this is constant’&lt;br /&gt;
  Function FUN()&lt;br /&gt;
  {&lt;br /&gt;
       -----&lt;br /&gt;
       -----&lt;br /&gt;
       return _MYVARIABLE_;&lt;br /&gt;
  }&lt;br /&gt;
  Class C&lt;br /&gt;
  {&lt;br /&gt;
       function print_this()&lt;br /&gt;
       {&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               return _THIS_METHOD_;&lt;br /&gt;
       }&lt;br /&gt;
  }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The above example denotes the use of namespace keyword in PHP language.&lt;br /&gt;
Similarly, C# also uses namespace keyword to distinguish names. Below is the code of C# showing use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace A&lt;br /&gt;
 {&lt;br /&gt;
   public class A1&lt;br /&gt;
   {&lt;br /&gt;
       static void Main()&lt;br /&gt;
       {&lt;br /&gt;
           B.B1.welcome();&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 namespace B&lt;br /&gt;
 {&lt;br /&gt;
   public class B1&lt;br /&gt;
   {&lt;br /&gt;
       public static void welcome()&lt;br /&gt;
       {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Welcome&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
The above code snippet shows the use of namespace keyword in C# language. Here, function main in namespace A calls to function 'welcome' from namespace B by referring its namespace_name.class_name.function_name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Every programming language support namespaces at different abstraction level. They are not just containers but designed to allow simple,fast and efficient usage and understanding of the code. Namespaces actually provide luxury to declare multiple variable with same name which in turn protect code with name clashes. Using namespace generally gives a better structure to program which makes easier to maintain when the code length increases. In summary, different languages have different methods of providing namespace functionality be it explicit or implicit to provide better coding experience to the user.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38659</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38659"/>
		<updated>2010-10-19T04:41:37Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
Above figure depicts the use of namespace in programming language.The identifier &amp;quot;var&amp;quot; is used in both the namespace and we need to specify to which namespace it belongs.&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Blocks=====&lt;br /&gt;
Blocks are often used as an abstraction to resolve naming conflicts. In many languages blocks determine scope of the variables. Hence a variable declared in a particular block has its scope within the block. Hence, we can think of a block as a namespace.&lt;br /&gt;
&lt;br /&gt;
Below is the example that shows how a block resolves naming ambiguities.&lt;br /&gt;
&lt;br /&gt;
 main()&lt;br /&gt;
 {&lt;br /&gt;
       int i=5;&lt;br /&gt;
       ------&lt;br /&gt;
       ------&lt;br /&gt;
       {&lt;br /&gt;
       int i=10;&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               //printing I here gives value equal to 10&lt;br /&gt;
       }&lt;br /&gt;
 //printing I here gives value equal to 5&lt;br /&gt;
 }&lt;br /&gt;
The above program depicts the concept of global and local variable initialization which can be viewed as a example of implicit namespace handled by programming language constructs. &lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Javascript:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
The above example shows the use of object to reference the methods. Hence the functions above are called using the objects &lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The above code snippet shows how a package can behave as a namespace in some programming language.&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
The above code snippet shows the use of modules in a form of namespace in Ruby language.The methods are referenced using the name of the module as shown in the code.&lt;br /&gt;
=====Attributes=====&lt;br /&gt;
XML namespaces provide method for qualifying element and attribute names by associating them with namespaces identified by unique URI references.For example,  Id could be in both vocabularies,employee, student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved XML attribute xmlns, the value of which must be an Internationalized Resource Identifier (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot;http://www.w3schools.com/fruits&amp;quot; &lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
The above XML creates the namespace &amp;quot;fruits&amp;quot; and &amp;quot;furniture&amp;quot; in the attribute of xmlns in XML.&lt;br /&gt;
====Explicit Namespaces==== &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules. Hence some languages use keyword &amp;quot;namespaces&amp;quot; for declaring namespaces. For example, C, Cpp, PHP, C#.&lt;br /&gt;
Below is the CPP code which depicts use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace Square{&lt;br /&gt;
   int length = 4;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 namespace Rectangle{&lt;br /&gt;
   int  length = 12;&lt;br /&gt;
   int  breath  = 8;   &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Square::length &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Rectangle::length &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
The above code snippet tells us the use of explicit namespace by using the keyword &amp;quot;namespace&amp;quot; in C++. It defines length in two different namespaces using the keyword namespace.When the length is referenced it is referenced using the name of the namespace.&lt;br /&gt;
&lt;br /&gt;
Similarly, PHP uses the namespace keyword to distinguish between identifiers.Below is an example of PHP using namespace keyword:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
  Namespace A;&lt;br /&gt;
  Const NAME = ‘this is constant’&lt;br /&gt;
  Function FUN()&lt;br /&gt;
  {&lt;br /&gt;
       -----&lt;br /&gt;
       -----&lt;br /&gt;
       return _MYVARIABLE_;&lt;br /&gt;
  }&lt;br /&gt;
  Class C&lt;br /&gt;
  {&lt;br /&gt;
       function print_this()&lt;br /&gt;
       {&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               return _THIS_METHOD_;&lt;br /&gt;
       }&lt;br /&gt;
  }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
The above example denotes the use of namespace keyword in PHP.&lt;br /&gt;
Similarly, C# also uses namespace keyword to distinguish names. Below is the code of C# showing use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace A&lt;br /&gt;
 {&lt;br /&gt;
   public class A1&lt;br /&gt;
   {&lt;br /&gt;
       static void Main()&lt;br /&gt;
       {&lt;br /&gt;
           B.B1.welcome();&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 namespace B&lt;br /&gt;
 {&lt;br /&gt;
   public class B1&lt;br /&gt;
   {&lt;br /&gt;
       public static void welcome()&lt;br /&gt;
       {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Welcome&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
The above code snippet shows the use of namespace keyword in C# language. &lt;br /&gt;
==Conclusion==&lt;br /&gt;
Every programming language support namespaces at different abstraction level. They are not just containers but designed to allow simple,fast and efficient usage and understanding of the code. Namespaces actually provide luxury to declare multiple variable with same name which in turn protect code with name clashes. Using namespace generally gives a better structure to program which makes easier to maintain when the code length increases. In summary, different languages have different methods of providing namespace functionality be it explicit or implicit to provide better coding experience to the user. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38510</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38510"/>
		<updated>2010-10-17T05:09:04Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
Above figure depicts the use of namespace in programming language. &lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Blocks=====&lt;br /&gt;
Blocks are often used as an abstraction to resolve naming conflicts. In many languages blocks determine scope of the variables. Hence a variable declared in a particular block has its scope within the block. Hence, we can think of a block as a namespace.&lt;br /&gt;
&lt;br /&gt;
Below is the example that shows how a block resolves naming ambiguities.&lt;br /&gt;
&lt;br /&gt;
 main()&lt;br /&gt;
 {&lt;br /&gt;
       int i=5;&lt;br /&gt;
       ------&lt;br /&gt;
       ------&lt;br /&gt;
       {&lt;br /&gt;
       int i=10;&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               //printing I here gives value equal to 10&lt;br /&gt;
       }&lt;br /&gt;
 //printing I here gives value equal to 5&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Javascript:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Attributes=====&lt;br /&gt;
XML namespaces provide method for qualifying element and attribute names by associating them with namespaces identified by unique URI references.For example,  Id could be in both vocabularies,employee, student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved XML attribute xmlns, the value of which must be an Internationalized Resource Identifier (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot;http://www.w3schools.com/fruits&amp;quot; &lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Explicit Namespaces==== &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules. Hence some languages use keyword &amp;quot;namespaces&amp;quot; for declaring namespaces. For example, C, Cpp, PHP, C#.&lt;br /&gt;
Below is the CPP code which depicts use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace Square{&lt;br /&gt;
   int length = 4;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 namespace Rectangle{&lt;br /&gt;
   int  length = 12;&lt;br /&gt;
   int  breath  = 8;   &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Square::length &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Rectangle::length &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  cout &amp;lt;&amp;lt; length &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Similarly, PHP uses the namespace keyword to distinguish between identifiers.Below is an example of PHP using namespace keyword:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
  Namespace A;&lt;br /&gt;
  Const NAME = ‘this is constant’&lt;br /&gt;
  Function FUN()&lt;br /&gt;
  {&lt;br /&gt;
       -----&lt;br /&gt;
       -----&lt;br /&gt;
       return _MYVARIABLE_;&lt;br /&gt;
  }&lt;br /&gt;
  Class C&lt;br /&gt;
  {&lt;br /&gt;
       function print_this()&lt;br /&gt;
       {&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               return _THIS_METHOD_;&lt;br /&gt;
       }&lt;br /&gt;
  }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, C# also uses namespace keyword to distinguish names. Below is the code of C# showing use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace A&lt;br /&gt;
 {&lt;br /&gt;
   public class A1&lt;br /&gt;
   {&lt;br /&gt;
       static void Main()&lt;br /&gt;
       {&lt;br /&gt;
           B.B1.welcome();&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 namespace B&lt;br /&gt;
 {&lt;br /&gt;
   public class B1&lt;br /&gt;
   {&lt;br /&gt;
       public static void welcome()&lt;br /&gt;
       {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Welcome&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Every programming language support namespaces at different abstraction level. They are not just containers but designed to allow simple,fast and efficient usage and understanding of the code. Namespaces actually provide luxu&lt;br /&gt;
1.        Protect code from name clashes&lt;br /&gt;
2.        Namespace gives better structure to program&lt;br /&gt;
3.        It becomes easy to maintain large codes with namespaces&lt;br /&gt;
4.        Custom Branding &lt;br /&gt;
5.        Integration with Future Web 2.0 Sites&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38407</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38407"/>
		<updated>2010-10-16T01:57:50Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Blocks=====&lt;br /&gt;
Blocks are often used as an abstraction to resolve naming conflicts. In many languages blocks determine scope of the variables. Hence a variable declared in a particular block has its scope within the block. Hence, we can think of a block as a namespace.&lt;br /&gt;
&lt;br /&gt;
Below is the example that shows how a block resolves naming ambiguities.&lt;br /&gt;
&lt;br /&gt;
 main()&lt;br /&gt;
 {&lt;br /&gt;
       int i=5;&lt;br /&gt;
       ------&lt;br /&gt;
       ------&lt;br /&gt;
       {&lt;br /&gt;
       int i=10;&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               //printing I here gives value equal to 10&lt;br /&gt;
       }&lt;br /&gt;
 //printing I here gives value equal to 5&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Javascript:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Attributes=====&lt;br /&gt;
XML namespaces provide method for qualifying element and attribute names by associating them with namespaces identified by unique URI references.For example,  Id could be in both vocabularies,employee, student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved XML attribute xmlns, the value of which must be an Internationalized Resource Identifier (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot;http://www.w3schools.com/fruits&amp;quot; &lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Explicit Namespaces==== &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules. Hence some languages use keyword &amp;quot;namespaces&amp;quot; for declaring namespaces. For example, C, Cpp, PHP, C#.&lt;br /&gt;
Below is the CPP code which depicts use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace Square{&lt;br /&gt;
   int length = 4;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 namespace Rectangle{&lt;br /&gt;
   int  length = 12;&lt;br /&gt;
   int  breath  = 8;   &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Square::length &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Rectangle::length &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  cout &amp;lt;&amp;lt; length &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Similarly, PHP uses the namespace keyword to distinguish between identifiers.Below is an example of PHP using namespace keyword:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
  Namespace A;&lt;br /&gt;
  Const NAME = ‘this is constant’&lt;br /&gt;
  Function FUN()&lt;br /&gt;
  {&lt;br /&gt;
       -----&lt;br /&gt;
       -----&lt;br /&gt;
       return _MYVARIABLE_;&lt;br /&gt;
  }&lt;br /&gt;
  Class C&lt;br /&gt;
  {&lt;br /&gt;
       function print_this()&lt;br /&gt;
       {&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               return _THIS_METHOD_;&lt;br /&gt;
       }&lt;br /&gt;
  }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, C# also uses namespace keyword to distinguish names. Below is the code of C# showing use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace A&lt;br /&gt;
 {&lt;br /&gt;
   public class A1&lt;br /&gt;
   {&lt;br /&gt;
       static void Main()&lt;br /&gt;
       {&lt;br /&gt;
           B.B1.welcome();&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 namespace B&lt;br /&gt;
 {&lt;br /&gt;
   public class B1&lt;br /&gt;
   {&lt;br /&gt;
       public static void welcome()&lt;br /&gt;
       {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Welcome&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Every programming language support namespaces at different abstraction level. They are not just containers but designed to allow simple,fast and efficient usage and understanding of the code. Namespaces actually provide luxu&lt;br /&gt;
1.        Protect code from name clashes&lt;br /&gt;
2.        Namespace gives better structure to program&lt;br /&gt;
3.        It becomes easy to maintain large codes with namespaces&lt;br /&gt;
4.        Custom Branding &lt;br /&gt;
5.        Integration with Future Web 2.0 Sites&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38405</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38405"/>
		<updated>2010-10-16T01:47:46Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Blocks=====&lt;br /&gt;
Blocks are often used as an abstraction to resolve naming conflicts. In many languages blocks determine scope of the variables. Hence a variable declared in a particular block has its scope within the block. Hence, we can think of a block as a namespace.&lt;br /&gt;
&lt;br /&gt;
Below is the example that shows how a block resolves naming ambiguities.&lt;br /&gt;
&lt;br /&gt;
 main()&lt;br /&gt;
 {&lt;br /&gt;
       int i=5;&lt;br /&gt;
       ------&lt;br /&gt;
       ------&lt;br /&gt;
       {&lt;br /&gt;
       int i=10;&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               //printing I here gives value equal to 10&lt;br /&gt;
       }&lt;br /&gt;
 //printing I here gives value equal to 5&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Javascript:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Attributes=====&lt;br /&gt;
XML namespaces provide method for qualifying element and attribute names by associating them with namespaces identified by unique URI references.For example,  Id could be in both vocabularies,employee, student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved XML attribute xmlns, the value of which must be an Internationalized Resource Identifier (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot;http://www.w3schools.com/fruits&amp;quot; &lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Explicit Namespaces==== &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules. Hence some languages use keyword &amp;quot;namespaces&amp;quot; for declaring namespaces. For example, C, Cpp, PHP, C#.&lt;br /&gt;
Below is the CPP code which depicts use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace Square{&lt;br /&gt;
   int length = 4;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 namespace Rectangle{&lt;br /&gt;
   int  length = 12;&lt;br /&gt;
   int  breath  = 8;   &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Square::length &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Rectangle::length &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  cout &amp;lt;&amp;lt; length &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Similarly, PHP uses the namespace keyword to distinguish between identifiers.Below is an example of PHP using namespace keyword:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
  Namespace A;&lt;br /&gt;
  Const NAME = ‘this is constant’&lt;br /&gt;
  Function FUN()&lt;br /&gt;
  {&lt;br /&gt;
       -----&lt;br /&gt;
       -----&lt;br /&gt;
       return _MYVARIABLE_;&lt;br /&gt;
  }&lt;br /&gt;
  Class C&lt;br /&gt;
  {&lt;br /&gt;
       function print_this()&lt;br /&gt;
       {&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               return _THIS_METHOD_;&lt;br /&gt;
       }&lt;br /&gt;
  }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, C# also uses namespace keyword to distinguish names. Below is the code of C# showing use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace A&lt;br /&gt;
 {&lt;br /&gt;
   public class A1&lt;br /&gt;
   {&lt;br /&gt;
       static void Main()&lt;br /&gt;
       {&lt;br /&gt;
           B.B1.welcome();&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 namespace B&lt;br /&gt;
 {&lt;br /&gt;
   public class B1&lt;br /&gt;
   {&lt;br /&gt;
       public static void welcome()&lt;br /&gt;
       {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Welcome&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Every programming language support namespaces at different abstraction level. They are not just containers but designed to allow simple,fast and efficient usage and understanding of the code. With the help of namespaces &lt;br /&gt;
1.        Protect code from name clashes&lt;br /&gt;
2.        Namespace gives better structure to program&lt;br /&gt;
3.        It becomes easy to maintain large codes with namespaces&lt;br /&gt;
4.        Custom Branding &lt;br /&gt;
5.        Integration with Future Web 2.0 Sites&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38404</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38404"/>
		<updated>2010-10-16T01:41:28Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Blocks=====&lt;br /&gt;
Blocks are often used as an abstraction to resolve naming conflicts. In many languages blocks determine scope of the variables. Hence a variable declared in a particular block has its scope within the block. Hence, we can think of a block as a namespace.&lt;br /&gt;
&lt;br /&gt;
Below is the example that shows how a block resolves naming ambiguities.&lt;br /&gt;
&lt;br /&gt;
 main()&lt;br /&gt;
 {&lt;br /&gt;
       int i=5;&lt;br /&gt;
       ------&lt;br /&gt;
       ------&lt;br /&gt;
       {&lt;br /&gt;
       int i=10;&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               //printing I here gives value equal to 10&lt;br /&gt;
       }&lt;br /&gt;
 //printing I here gives value equal to 5&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Javascript:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Attributes=====&lt;br /&gt;
XML namespaces provide method for qualifying element and attribute names by associating them with namespaces identified by unique URI references.For example,  Id could be in both vocabularies,employee, student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved XML attribute xmlns, the value of which must be an Internationalized Resource Identifier (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot;http://www.w3schools.com/fruits&amp;quot; &lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Explicit Namespaces==== &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules. Hence some languages use keyword &amp;quot;namespaces&amp;quot; for declaring namespaces. For example, C, Cpp, PHP, C#.&lt;br /&gt;
Below is the CPP code which depicts use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace Square{&lt;br /&gt;
   int length = 4;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 namespace Rectangle{&lt;br /&gt;
   int  length = 12;&lt;br /&gt;
   int  breath  = 8;   &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Square::length &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Rectangle::length &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  cout &amp;lt;&amp;lt; length &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Similarly, PHP uses the namespace keyword to distinguish between identifiers.Below is an example of PHP using namespace keyword:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
  Namespace A;&lt;br /&gt;
  Const NAME = ‘this is constant’&lt;br /&gt;
  Function FUN()&lt;br /&gt;
  {&lt;br /&gt;
       -----&lt;br /&gt;
       -----&lt;br /&gt;
       return _MYVARIABLE_;&lt;br /&gt;
  }&lt;br /&gt;
  Class C&lt;br /&gt;
  {&lt;br /&gt;
       function print_this()&lt;br /&gt;
       {&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               return _THIS_METHOD_;&lt;br /&gt;
       }&lt;br /&gt;
  }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, C# also uses namespace keyword to distinguish names. Below is the code of C# showing use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace A&lt;br /&gt;
 {&lt;br /&gt;
   public class A1&lt;br /&gt;
   {&lt;br /&gt;
       static void Main()&lt;br /&gt;
       {&lt;br /&gt;
           B.B1.welcome();&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 namespace B&lt;br /&gt;
 {&lt;br /&gt;
   public class B1&lt;br /&gt;
   {&lt;br /&gt;
       public static void welcome()&lt;br /&gt;
       {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Welcome&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38403</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38403"/>
		<updated>2010-10-16T01:40:14Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Blocks=====&lt;br /&gt;
Blocks are often used as an abstraction to resolve naming conflicts. In many languages blocks determine scope of the variables. Hence a variable declared in a particular block has its scope within the block. Hence, we can think of a block as a namespace.&lt;br /&gt;
&lt;br /&gt;
Below is the example that shows how a block resolves naming ambiguities.&lt;br /&gt;
&lt;br /&gt;
 main()&lt;br /&gt;
 {&lt;br /&gt;
       int i=5;&lt;br /&gt;
       ------&lt;br /&gt;
       ------&lt;br /&gt;
       {&lt;br /&gt;
       int i=10;&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               //printing I here gives value equal to 10&lt;br /&gt;
       }&lt;br /&gt;
 //printing I here gives value equal to 5&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Javascript:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Attributes=====&lt;br /&gt;
XML namespaces provide method for qualifying element and attribute names by associating them with namespaces identified by unique URI references.For example,  Id could be in both vocabularies,employee, student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved XML attribute xmlns, the value of which must be an Internationalized Resource Identifier (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot;http://www.w3schools.com/fruits&amp;quot; &lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Explicit Namespaces==== &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules. Hence some languages use keyword &amp;quot;namespaces&amp;quot; for declaring namespaces. For example, C, Cpp, PHP, C#.&lt;br /&gt;
Below is the CPP code which depicts use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace Square{&lt;br /&gt;
   int length = 4;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 namespace Rectangle{&lt;br /&gt;
   int  length = 12;&lt;br /&gt;
   int  breath  = 8;   &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Square::length &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Rectangle::length &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  cout &amp;lt;&amp;lt; length &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Similarly, PHP uses the namespace keyword to distinguish between identifiers.Below is an example of PHP using namespace keyword:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
  Namespace A;&lt;br /&gt;
  Const NAME = ‘this is constant’&lt;br /&gt;
  Function FUN()&lt;br /&gt;
  {&lt;br /&gt;
       -----&lt;br /&gt;
       -----&lt;br /&gt;
       return _MYVARIABLE_;&lt;br /&gt;
  }&lt;br /&gt;
  Class C&lt;br /&gt;
  {&lt;br /&gt;
       function print_this()&lt;br /&gt;
       {&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               return _THIS_METHOD_;&lt;br /&gt;
       }&lt;br /&gt;
  }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, C# also uses namespace keyword to distinguish names. Below is the code of C# showing use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace A&lt;br /&gt;
 {&lt;br /&gt;
   public class A1&lt;br /&gt;
   {&lt;br /&gt;
       static void Main()&lt;br /&gt;
       {&lt;br /&gt;
           B.B1.welcome();&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 namespace B&lt;br /&gt;
 {&lt;br /&gt;
   public class B1&lt;br /&gt;
   {&lt;br /&gt;
       public static void welcome()&lt;br /&gt;
       {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Welcome&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38399</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38399"/>
		<updated>2010-10-16T01:29:10Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Javascript:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
&lt;br /&gt;
=====Attributes=====&lt;br /&gt;
XML namespaces provide method for qualifying element and attribute names by associating them with namespaces identified by unique URI references.For example,  Id could be in both vocabularies,employee, student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved XML attribute xmlns, the value of which must be an Internationalized Resource Identifier (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot;http://www.w3schools.com/fruits&amp;quot; &lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Explicit Namespaces==== &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules. Hence some languages use keyword &amp;quot;namespaces&amp;quot; for declaring namespaces. For example, C, Cpp, PHP, C#.&lt;br /&gt;
Below is the CPP code which depicts use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace Square{&lt;br /&gt;
   int length = 4;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 namespace Rectangle{&lt;br /&gt;
   int  length = 12;&lt;br /&gt;
   int  breath  = 8;   &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Square::length &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Rectangle::length &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  cout &amp;lt;&amp;lt; length &amp;lt;&amp;lt; endl;&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Similarly, PHP uses the namespace keyword to distinguish between identifiers.Below is an example of PHP using namespace keyword:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
  Namespace A;&lt;br /&gt;
  Const NAME = ‘this is constant’&lt;br /&gt;
  Function FUN()&lt;br /&gt;
  {&lt;br /&gt;
       -----&lt;br /&gt;
       -----&lt;br /&gt;
       return _MYVARIABLE_;&lt;br /&gt;
  }&lt;br /&gt;
  Class C&lt;br /&gt;
  {&lt;br /&gt;
       function print_this()&lt;br /&gt;
       {&lt;br /&gt;
               ------&lt;br /&gt;
               ------&lt;br /&gt;
               return _THIS_METHOD_;&lt;br /&gt;
       }&lt;br /&gt;
  }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, C# also uses namespace keyword to distinguish names. Below is the code of C# showing use of namespace keyword.&lt;br /&gt;
&lt;br /&gt;
 namespace A&lt;br /&gt;
 {&lt;br /&gt;
   public class A1&lt;br /&gt;
   {&lt;br /&gt;
       static void Main()&lt;br /&gt;
       {&lt;br /&gt;
           B.B1.welcome();&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 namespace B&lt;br /&gt;
 {&lt;br /&gt;
   public class B1&lt;br /&gt;
   {&lt;br /&gt;
       public static void welcome()&lt;br /&gt;
       {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Welcome&amp;quot;);&lt;br /&gt;
       }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38393</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38393"/>
		<updated>2010-10-16T01:14:43Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Javascript:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
&lt;br /&gt;
=====Attributes=====&lt;br /&gt;
XML namespaces provide method for qualifying element and attribute names by associating them with namespaces identified by unique URI references.For example,  Id could be in both vocabularies,employee, student, hence we can provide uniqueness for each vocabulary using namespaces to avoid conflicts. &lt;br /&gt;
&lt;br /&gt;
A namespace is declared using the reserved XML attribute xmlns, the value of which must be an Internationalized Resource Identifier (IRI), &lt;br /&gt;
usually a Uniform Resource Identifier (URI) reference.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a attributes as a namespace in XML:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;root&lt;br /&gt;
  xmlns:fruits=&amp;quot;http://www.w3schools.com/fruits&amp;quot; &lt;br /&gt;
  xmlns:furniture=&amp;quot;http://www.w3schools.com/furniture&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;fruits:table&amp;gt;&lt;br /&gt;
   &amp;lt;fruits:tr&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Apples&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
     &amp;lt;fruits:td&amp;gt;Bananas&amp;lt;/fruits:td&amp;gt;&lt;br /&gt;
   &amp;lt;/fruits:tr&amp;gt;&lt;br /&gt;
  &amp;lt;/fruits:table&amp;gt;&lt;br /&gt;
  &amp;lt;furniture:table&amp;gt;&lt;br /&gt;
   &amp;lt;furniture:name&amp;gt;Sofa&amp;lt;/f:name&amp;gt;&lt;br /&gt;
  &amp;lt;/furniture:table&amp;gt;&lt;br /&gt;
 &amp;lt;/root&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38360</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38360"/>
		<updated>2010-10-16T00:15:26Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespaces.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Javascript:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Namespaces.jpg&amp;diff=38358</id>
		<title>File:Namespaces.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Namespaces.jpg&amp;diff=38358"/>
		<updated>2010-10-16T00:15:08Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38357</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38357"/>
		<updated>2010-10-16T00:14:28Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: /* Objects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Javascript:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38355</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38355"/>
		<updated>2010-10-16T00:13:27Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38353</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38353"/>
		<updated>2010-10-16T00:12:58Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: /* Objects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces in Javascript.&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38348</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38348"/>
		<updated>2010-10-16T00:09:49Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: /* Objects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces.&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38343</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38343"/>
		<updated>2010-10-16T00:02:40Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
=====Objects=====&lt;br /&gt;
In JavaScript, a namespace is actually an object which is used to references methods, properties and other objects.Objects are all we need to create namespaces.&lt;br /&gt;
&lt;br /&gt;
 var Val = {&lt;br /&gt;
&lt;br /&gt;
    Hello: function() {&lt;br /&gt;
        alert(&amp;quot;Hello...!!!&amp;quot;);&lt;br /&gt;
    },&lt;br /&gt;
&lt;br /&gt;
    Goodbye: function() {&lt;br /&gt;
        alert(&amp;quot;Goodbye...!!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 // In a nearby piece of code...&lt;br /&gt;
&lt;br /&gt;
 Val.Hello();&lt;br /&gt;
 Val.Goodbye();&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38331</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38331"/>
		<updated>2010-10-15T23:48:08Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38330</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38330"/>
		<updated>2010-10-15T23:47:38Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====Modules=====&lt;br /&gt;
&lt;br /&gt;
In some languages, different constructs are used to identify namespaces. Languages like Ruby maintains namespace at higher level of abstraction known as modules which can be thought to be similar to packages in Java.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a modules in Ruby:&lt;br /&gt;
&lt;br /&gt;
 module Trig&lt;br /&gt;
 PI = 3.141592654&lt;br /&gt;
 def Trig.sin(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 def Trig.cos(x)&lt;br /&gt;
 # ..&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 module Moral&lt;br /&gt;
 VERY_BAD = 0&lt;br /&gt;
 BAD = 1&lt;br /&gt;
 def Moral.sin(badness)&lt;br /&gt;
 # ...&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 require 'trig'&lt;br /&gt;
 require 'moral'&lt;br /&gt;
 y = Trig.sin(Trig::PI/4)&lt;br /&gt;
 wrongdoing = Moral.sin(Moral::VERY_BAD)&lt;br /&gt;
&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38327</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38327"/>
		<updated>2010-10-15T23:37:57Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: /* Packages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38326</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38326"/>
		<updated>2010-10-15T23:37:06Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: /* Packages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
&lt;br /&gt;
 class A1  {&lt;br /&gt;
&lt;br /&gt;
   int var = 4;&lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 package B;&lt;br /&gt;
&lt;br /&gt;
 class B1  {&lt;br /&gt;
&lt;br /&gt;
   int var = 12; &lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38324</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38324"/>
		<updated>2010-10-15T23:36:39Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
 package A;&lt;br /&gt;
 class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
 }&lt;br /&gt;
 package B;&lt;br /&gt;
 class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38321</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38321"/>
		<updated>2010-10-15T23:34:24Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a package in Java:&lt;br /&gt;
&lt;br /&gt;
package A;&lt;br /&gt;
class A1  {&lt;br /&gt;
   int var = 4;&lt;br /&gt;
}&lt;br /&gt;
package B;&lt;br /&gt;
class B1  {&lt;br /&gt;
   int var = 12; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38315</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38315"/>
		<updated>2010-10-15T23:32:08Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
Below is an example of a namespace in C++:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
namespace Box1{&lt;br /&gt;
   int boxSide = 4;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
namespace Box2{&lt;br /&gt;
   int boxSide = 12; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main () {&lt;br /&gt;
  cout &amp;lt;&amp;lt; Box1::boxSide &amp;lt;&amp;lt; endl;  //output 4&lt;br /&gt;
  cout &amp;lt;&amp;lt; Box2::boxSide &amp;lt;&amp;lt; endl;  //output 12&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Package.jpg&amp;diff=38312</id>
		<title>File:Package.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Package.jpg&amp;diff=38312"/>
		<updated>2010-10-15T23:30:20Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38311</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38311"/>
		<updated>2010-10-15T23:28:51Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: /* Packages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38308</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38308"/>
		<updated>2010-10-15T23:20:38Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
package A;&lt;br /&gt;
class A1{&lt;br /&gt;
   int var = 4;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
package B;&lt;br /&gt;
class B1{&lt;br /&gt;
   int var = 12; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38305</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38305"/>
		<updated>2010-10-15T23:19:19Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
====Implicit Namespaces====&lt;br /&gt;
&lt;br /&gt;
'''Implicit Namespaces''' are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
=====Packages=====&lt;br /&gt;
&lt;br /&gt;
Packages can be used as a mechanism to organize classes into namespaces which are mapped to file system. A unique namespace is provided by each package which gives flexibility to define same identifier name over different packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
package A;&lt;br /&gt;
class A1{&lt;br /&gt;
   int var = 4;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
package B;&lt;br /&gt;
class B1{&lt;br /&gt;
   int var = 12; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
Namespaces can be explicitly manipulated and composed, making it quite a simple matter to combine, rename and compose packages or modules.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38229</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38229"/>
		<updated>2010-10-15T22:16:51Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces''' is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
A namespace is a way to keep names organized.Lets use an analogy to file system in the computer which uses directories and sub directories.Namespaces in this context could be viewed as the path to a file in the directory/subdirectory which can uniquely identify each file.&lt;br /&gt;
&lt;br /&gt;
                                                  [[Image:Namespace.jpg|frame|center]]&lt;br /&gt;
===Types of Namespaces===&lt;br /&gt;
&lt;br /&gt;
Implicit Namespaces are the abstraction defined by language itself in order to resolve name conflicts.Some of the constructs of implicit namespaces in different languages are records,dictionaries,objects, environments,packages,interface,scope resolution.&lt;br /&gt;
&lt;br /&gt;
Explicit Namespaces &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Namespace.jpg&amp;diff=38228</id>
		<title>File:Namespace.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Namespace.jpg&amp;diff=38228"/>
		<updated>2010-10-15T22:16:15Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38199</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38199"/>
		<updated>2010-10-15T20:52:17Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces'''is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context. [http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
=Overview=&lt;br /&gt;
&lt;br /&gt;
Domain specific languages (DSLs) are the programming languages focused to certain [http://en.wikipedia.org/wiki/Domain domain] used to find the solutions using domain specific representation techniques. Domain can be any field such as Mathematics, Relational Databases, etc or it can even be any specific business/business unit such as Insurance, Billing department of any company, salary calculation, etc. Popular examples of Domain specific languages are  [http://en.wikipedia.org/wiki/R_(programming_language) R], [http://en.wikipedia.org/wiki/S_(programming_language) S] and [http://en.wikipedia.org/wiki/Q_(programming_language) Q] languages for statistics, [http://en.wikipedia.org/wiki/Mathematica Mathematica] and [http://en.wikipedia.org/wiki/Maxima_(software) Maxima] for symbolic mathematics, spreadsheet formulas and macros, [http://en.wikipedia.org/wiki/SQL SQL] for relational database queries&lt;br /&gt;
&lt;br /&gt;
===Domain specific languages vs. General programming languages===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/General-purpose_programming_language General Programming languages] are the ones which can be used for developing solution for any field or any business units. Most popular examples being C, C++ and Java. Domain specific languages provide a high edge over general languages in their application domain.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38198</id>
		<title>CSC/ECE 517 Fall 2010/ch4 4d PR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch4_4d_PR&amp;diff=38198"/>
		<updated>2010-10-15T20:49:21Z</updated>

		<summary type="html">&lt;p&gt;Rsoni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Namespaces'''&lt;br /&gt;
Namespace is a set of names which are bound together to form unique identifier in order to resolve conflict with same names from different context.[http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9e.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7f91 Namespaces ] give you control over the visibility of the properties and methods that you create.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages (DSLs) are the programming languages focused to certain [http://en.wikipedia.org/wiki/Domain domain] used to find the solutions using domain specific representation techniques. Domain can be any field such as Mathematics, Relational Databases, etc or it can even be any specific business/business unit such as Insurance, Billing department of any company, salary calculation, etc. Popular examples of Domain specific languages are  [http://en.wikipedia.org/wiki/R_(programming_language) R], [http://en.wikipedia.org/wiki/S_(programming_language) S] and [http://en.wikipedia.org/wiki/Q_(programming_language) Q] languages for statistics, [http://en.wikipedia.org/wiki/Mathematica Mathematica] and [http://en.wikipedia.org/wiki/Maxima_(software) Maxima] for symbolic mathematics, spreadsheet formulas and macros, [http://en.wikipedia.org/wiki/SQL SQL] for relational database queries&lt;br /&gt;
&lt;br /&gt;
===Domain specific languages vs. General programming languages===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/General-purpose_programming_language General Programming languages] are the ones which can be used for developing solution for any field or any business units. Most popular examples being C, C++ and Java. Domain specific languages provide a high edge over general languages in their application domain.&lt;br /&gt;
&lt;br /&gt;
===Domain Specific Object Oriented Languages===&lt;br /&gt;
&lt;br /&gt;
Domain-specific Object Oriented Languages are usually little languages that are particularly expressive in a certain problem domain and are also task-specific, application-oriented. In addition to that it also encompasses object oriented principles such as [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance], [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] and [http://en.wikipedia.org/wiki/Abstraction_principle_(programming) Abstraction]. They offer substantial gains in expressiveness and ease of use as compared with General object oriented programming languages in their domain of application. Some of the well known object oriented DSLs are,&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Smalltalk Smalltalk] which was developed by Xerox Coorp. for educational use&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Simula Simula] which was developed for simulation of programs. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Scalable_Vector_Graphics Scalable Vector Graphics (SVG)] is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic.&lt;br /&gt;
&lt;br /&gt;
===Typical characteristics of Domain specific languages===&lt;br /&gt;
&lt;br /&gt;
DSLs are usually small, offer only restricted suite of notations and abstractions and are also called as micro/ little languages. Sometimes, however, they are made on top of general purpose language, thus offering domain-specific expressive power in addition to the expressive power of the GPL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
DSLs are declarative. Hence, they can be viewed as specification languages, as well as programming languages. Many DSLs are supported by a DSL compiler which generates applications from DSL programs &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Requirements for a DSL==&lt;br /&gt;
&lt;br /&gt;
Many of the requirements for DSLs are same as ones for the general-purpose programming languages. However, they differ on the level of importance when compared with the general purpose languages.&amp;lt;sup&amp;gt;[6]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core requirements for a DSL are as follows: &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Conformity&amp;lt;/strong&amp;gt;: The language must address to all the important concepts of the target domain. This is the basic requirement for any DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Supportability&amp;lt;/strong&amp;gt;: it is feasible to provide DSL support via domain specific popular tools, for typical model and program management.  It will be of great ease if the DSL support is provided via tools, which are already used by the people of specified domain. The host tool can easily take care of the basic functionalities of the domain.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Integrability&amp;lt;/strong&amp;gt;: The DSL language should be capable of working with other tools and languages of the domain. This is essential for easy adaptation of existing applications to new language. &lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Longevity&amp;lt;/strong&amp;gt;: The DSL should be used for sufficient amount of time by the users to justify the cost of creating DSL and its supporting tools.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Simplicity&amp;lt;/strong&amp;gt;: It should be easy to be adapted by the new and existing users in the domain. This also makes sure that the user focus more on the application development rather than learning the DSL.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quality&amp;lt;/strong&amp;gt;: The language should produce high quality applications which are better in terms of all the related language constructs like reliability, security, safety, etc. &lt;br /&gt;
&lt;br /&gt;
The above mentioned requirements are the general requirements for DSLs. There can be additional requirement depending upon the domain for which they are created.&lt;br /&gt;
&lt;br /&gt;
==Risks and Opportunities==&lt;br /&gt;
&lt;br /&gt;
There are associated risk and opportunities related to any DSL which decides its success. Before deciding on the creation of the new DSL, one should always make sure that the amount of opportunities related to its creation are more than the risk involved. The following are the typical risks and opportunities related to any DSL&amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
===The Opportunities===&lt;br /&gt;
&lt;br /&gt;
* DSLs allows a solution to be expressed more particularly in the domain of the problem, thus development of DSL programs is easy for the domain experts.&lt;br /&gt;
&lt;br /&gt;
* Since DSLs are specific to a domain, programs are concise and self documented to a large extent.&lt;br /&gt;
&lt;br /&gt;
* DSLs enabling the experts to focus more on a problem domain thus enhancing the quality and productivity, making it more reliable, easy to maintain.. &lt;br /&gt;
&lt;br /&gt;
* They embody specific domain knowledge, and thus enabling the conservation and reuse of this knowledge in a way.&lt;br /&gt;
&lt;br /&gt;
* It enables programs to be validated and optimized at the domain level.&lt;br /&gt;
&lt;br /&gt;
* Since it is specific to a language improves its ability to be tested.&lt;br /&gt;
&lt;br /&gt;
* It gives better end user experience.&lt;br /&gt;
&lt;br /&gt;
* They are easy and exciting for the problem domain experts.&lt;br /&gt;
&lt;br /&gt;
===The Risks===&lt;br /&gt;
&lt;br /&gt;
* The cost of designing, implementing and maintaining DSL is high.&lt;br /&gt;
&lt;br /&gt;
* The additional cost of educating the users to learn DSL.&lt;br /&gt;
&lt;br /&gt;
* The domain experts need to have knowledge about language design principles in order to develop it a DSL.&lt;br /&gt;
&lt;br /&gt;
* The scope of DSL is not defined.&lt;br /&gt;
&lt;br /&gt;
* It is difficult to balance between domain-specificity and general-purpose programming constructs.&lt;br /&gt;
&lt;br /&gt;
* It does not have a strong development tool support as compared to other general purpose programming languages. Eg. [http://en.wikipedia.org/wiki/NetBeans NetBeans] and [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse] for Java, C++, etc.&lt;br /&gt;
&lt;br /&gt;
==DSL v/s Object Oriented Frameworks==&lt;br /&gt;
&lt;br /&gt;
Domain Specific object oriented languages can be easily used to develop readable and maintainable applications in a particular domain. Whereas construction of closely related programs in any domain can be achieved easily using object oriented framework.&lt;br /&gt;
&lt;br /&gt;
They can be compared on the basis following criterion:-&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Expressiveness: &amp;lt;/strong&amp;gt;DSL expresses knowledge that is domain-specific whereas using a general purpose programming language as in a framework provides more flexibility in adapting to specific needs.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; The Calling Framework:&amp;lt;/strong&amp;gt; A framework often is an active entity and does not get called but it calls functions provided by the application developer. This can also be easily achieved using a DSL. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Overriding Default Behavior: &amp;lt;/strong&amp;gt; White-box frameworks allow the application developer to override default behavior using inheritance. This can also be achieved by using DSL but it does not seem obvious and intuitive. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt; Language technology:&amp;lt;/strong&amp;gt; DSL requires tools for supporting rapid prototyping of scanners, parsers, type checkers, interpreters, compilers. On the contrary, there is no such need in object oriented frameworks as they are made on the top of high level languages. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Issues or challenges related to DSLs==&lt;br /&gt;
&lt;br /&gt;
The following are the open issues related to DSL that require further investigation. &amp;lt;sup&amp;gt;[7]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How do requirements are refined when a specific domain is considered? Each domain has its own requirements and specification on to the use of the DSL, resulting in higher stress for analyzing the domain.&lt;br /&gt;
&lt;br /&gt;
* How can we measure the cost-versus-benefit of using DSLs as opposed to general-purpose languages?&lt;br /&gt;
&lt;br /&gt;
* What about the side-effects of using DSLs, in particular, the implicit use of a number of (loosely coupled) languages throughout development, the use of a federation of tools versus an integrated development environment, etc.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
Domain specific languages(DSL) are focused towards a specific domain solution enabling easy development for domain experts. DSL are more domain specific than general languages. They are productive, reliable, and maintainable but on the other hand needs expertise, developmental tools and overhead cost involved which should be carefully considered before development. Thus, DSL are providing good solution for domain- specific problems but it has few issues to be considered. Recent development in various high level programming languages has addressed most these issues by development of various domain specific packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[1] Matteo Bordin, Tullio Vardanega &amp;lt;i&amp;gt;&amp;quot;A Domain-specific Metamodel for Reusable Object-Oriented High-Integrity Components&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Van Deursen &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Jan Heering, Marjan Mernik &amp;quot;Domain-Specific Languages for Software Engineering&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Martin Karlsch &amp;lt;i&amp;gt;&amp;quot;A model-driven framework for domain specific languages demonstrated on a test automation language&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Uwe Zdun &amp;lt;i&amp;gt;&amp;quot;Concepts for Model­Driven Design and Evolution of Domain­Specific Languages&amp;quot; &amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] Dimitrios S. Kolovos, Richard F. Paige, Tim Kelly, and Fiona A.C. Polack &amp;lt;i&amp;gt;&amp;quot;Requirements for Domain-Specific Languages&amp;quot;&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Paul Klint, Joost Visser &amp;lt;i&amp;gt;&amp;quot;Domain-Specific Languages: An Annotated Bibliography1 Arie van Deursen&amp;quot;&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rsoni</name></author>
	</entry>
</feed>