CSC/ECE 517 Fall 2012/ch2b 2w48 aa
Interpreter Pattern - Directory of sites
Introduction
This page provides a directory of sites that can be used as reference to learn about the Interpreter Design Pattern that is used in Object Oriented Programming.
Directory of sites
Interpreter Pattern (Wikipedia)
http://en.wikipedia.org/wiki/Interpreter_pattern
Wikipedia page is the first place one would go to get an introduction about a new topic. The page provides a good introduction to Interpreter Pattern and explains where it can be used. The page also gives a few common examples where the pattern is used, and also gives a programming example by explaining how Reverse Polish Notation can be implemented using Java.
Drawbacks
Although the page provides a good introduction to the Interpreter, it is by no means comprehensive. It does not discuss the advantages and disadvantages of the pattern, nor does it compare it with other patterns.
Interpreter (vincehuston.org)
http://www.vincehuston.org/dp/interpreter.html
This website describes the interpreter pattern in simple terms with a real world example. It begins with a two step approach to be followed in order to identify the need for and to implement an interpreter pattern in any problem.Following this is a real world example of the interpreter pattern where it is compared with Musicians represent the musical notation on a staff. The site also provide a checklist that consists of a few simple rules that begin with identifying the need for an interpreter pattern for a given problem and then specify the key steps involved in it’s implementation.
Drawbacks
The example code that is provided attempts to contrast the interpreter pattern design with an older pattern, but it’s not straightforward which makes it difficult to understand the differences between the two approaches.It also doesn't provide the disadvantages of using the pattern.
Interpreter - (oodesign.com)
http://www.oodesign.com/interpreter-pattern.html
This site provides a brief explanation of the pattern and straightaway dives into it's implementation. The code samples that are provided are simple and clear. They help us understand the basic structure of the interpreter pattern.
Drawbacks
While the site is a good resource for the implementation of the pattern, there's very little information on the actual concept of the interpreter pattern and the motivation for using it.
Interpreter Design Pattern (CodeProject)
http://www.codeproject.com/Articles/186183/Interpreter-Design-Pattern
This website provides more information on how to build expression trees and parse them using the Depth First Search Pattern.
Interpreter(Silversoft.net)
http://www.silversoft.net/docs/dp/hires/pat5cfso.htm
This website is one of the most comprehensive references for the interpreter pattern. It provides detailed information about the classes and all the collaborators in the pattern. It also lists out the advantages of using this pattern and also some of the issues one may face when using this pattern.There are two example programs, that are clearly explained in full detail.
Drawbacks
The order in which the examples appear can discourage further reading since, the simpler C++ code appears after the slightly complicated example in SmallTalk (which is lesser known when compared to C++)
Interpreter - Java Developer Tool (Google Developers)
https://developers.google.com/java-dev-tools/codepro/doc/features/patterns/interpreter_pattern
This site gives detailed instructions on how to use the Java developer tool to create a new project using the interpreter pattern.It walks through the wizard that is used to create an interpreter pattern.
Drawbacks
This is not a good reference for understanding the basic concepts of the interpreter pattern. With the basic knowledge of the pattern, one can use this site as a reference to go about implementing it. Also, this site is useful only if the implementation language is Java.
Comparison
klk
koj