user comprehension
higher-level languages more easily understood by end-users or analysts
flexible execution
interpretive languages offer runtime/production flexibility that static languages don't
new dimension to technical capabilities
look what JavaScript has done for the browser!
driving/scripting (scripts hosting/running your objects)
integrating (building part of the app using script)
embedding (your objects hosting/running script)
configuration (configuration is script)
dynamic evaluation
expose an object model
run-time object model accessible via APIs
static object model accessible via ClassLoaders
scripts connect to running instance to influence and/or query application state/behavior
think "PerfMon" or "JMX" and monitoring
WebLogic provides this (WLShell)
users run scripts to perform actions
think "command-line" actions
prime example being build tools (Ant, MSBuild, etc)
expose an object model
typically domain objects
write the top-level code as a script for easy modification/refactoring
based on the idea that scripting languages are easier/more productive to write
expose an object model
reflects script access to remainder of app
script "sandbox", in a way
domain objects, plus more
host the scripting engine inside the app
see later on how to do this
call scripts at predefined (join)points
validation rules
business rules
workflow execution decision points
think about this: What is Emacs?
it's a text editor + embedded Scheme
common variation on embedding
expose an object model
configuration settings/objects
may or may not include domain model
execute script on application startup
script can be simple (basic value assignment) or complex (driving the startup to load settings from some arbitrary third-party location)
expose an object model
OK, not always necessary, but frequently useful
allow user to enter script or script expressions
permits richer interactivity
permits behavior based on entered data
or, attach script to messages to execute on receipt
particularly powerful when combined with messaging systems; allows for Command messages w/o concerns about code resolution
make sure script sandbox is tightly locked down!
in other words, you're looking at a controlled Command Injection attack!
Who is this guy?
Architect, Engineering Manager/Leader, "force multiplier"
Principal -- Neward & Associates
http://www.newardassociates.com
Educative (http://educative.io) Author
Performance Management for Engineering Managers
Author
Professional F# 2.0 (w/Erickson, et al; Wrox, 2010)
Effective Enterprise Java (Addison-Wesley, 2004)
SSCLI Essentials (w/Stutz, et al; OReilly, 2003)
Server-Based Java Programming (Manning, 2000)