Applications and packages

When you have developed several programs for some related tasks, you will find it convenient to group them together and make them available as a cohesive application that can easily be used and incorporated in your work. Packages and applications are part of the framework in Mathematica that makes t...

Full description

Saved in:
Bibliographic Details
Published in:Programming with Mathematica pp. 533 - 574
Main Author: Wellin, Paul
Format: Book Chapter
Language:English
Published: United Kingdom Cambridge University Press 10.01.2013
Subjects:
ISBN:9781107009462, 1107009464
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:When you have developed several programs for some related tasks, you will find it convenient to group them together and make them available as a cohesive application that can easily be used and incorporated in your work. Packages and applications are part of the framework in Mathematica that makes this possible. A package is simply a text file containing Mathematica code. Typically you put related functions in a package. So there might be a computational geometry package or a random walks package that includes functions in support of those tasks. An application, in Mathematica, is a set of packages together with various user-interface elements such as documentation, palettes, and perhaps stylesheets.When you develop an application, it is important to think about how your functions work with each other as well as how well they integrate with the rest of Mathematica. The user's interface to your programs should be as close as possible to that of the built-in functions in Mathematica so that users can more easily pick up the syntax and usage. Packages provide the framework to do this. In this chapter, features such as options, argument checking, messaging, and documentation are all discussed in the context of a larger application – random walks. We will gather much of the code fragments from earlier chapters and add an options framework, error and usage messages, and some new interactive visualization tools as we develop the RandomWalks package in this chapter.
ISBN:9781107009462
1107009464
DOI:10.1017/CBO9780511972942.014