Pragmatic?

In the vision statement for my graduate project, I used the word “pragmatic” to describe the data modeling tool I am building. To me, “pragmatism” means working smarter rather than working harder. I used this word on purpose, and there is a lot of thought behind it. It is a reference to the classic book The Pragmatic Programmer: from journeyman to master by Andrew Hunt and David Thomas. The book is filled with tips, tricks, and expert advice on how to be an effective software developer. The content is heavily influencing my design and implementation.

Specifically, the following chapters are informing my decisions…

12. Domain Languages

Invent a mini-language tailored to the application domain to allow users to easily express what they want.

14. The Power of Plain Text

They say it best:

…we believe that the best format for storing knowledge persistently is plain text. With plain text, we give ourselves the ability to manipulate knowledge, both manually and programmatically, using virtually every tool at our disposal. (page 73)

15. Shell Games

GUI tools limit users to predetermined actions designed into the GUI. With the command shell, different tools and utilities can be combined in any way to get the job done effectively.

16. Power Editing

To maximize your productivity, find a powerful text editor and become proficient at it.

17. Source Code Control

Use source code control systems to manage versioning and concurrent editing of your work.

19. Text Manipulation

A text manipulation language can enable you to quickly do things that would otherwise take too long to try.

20. Code Generators

“Write code that writes code.”

What this means for my project…

I want to build a database modeling tool that embraces these principles in such a way that allows the users to be as effective as possible. I am creating a domain specific language implemented in JavaScript for describing a database model. My application will read these script files as input to create the model. My tool will allow the user to create diagrams (which will also be stored as JavaScript files). It will generate DDL, and I will also expose a Java API that will allow end users to extend the tool (perhaps to write code generators).

Why text? I know I am much faster using a keyboard to pound out text than I am navigating menus, dialogs, etc. with a mouse. Using plain text input allows users to use a text editor that they are already familiar with to create the model. They can also use any version control tool to manage changes to the model.

Why JavaScript? I could have used XML (shudder) or JSON, but these are fairly verbose. Further, they are limited to describing data structures; they have no imperative properties. While execution isn’t strictly needed to define a database model, why limit ourselves? I figured that if I really wanted to empower the end-user, I would give them the full force of a scripting language to use. That way they can define helper functions or shortcuts to tailor the tool to their specific usage. I considered a number of languages supported by the JVM: Python, Clojure, Lua, and JavaScript. In the end, JavaScript has the right combination of power, simplicity, and popularity, not to mention that Oracle’s JVM comes with a JavaScript engine.

More to come…

About these ads


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.