Clarity needed on various terms Application, libraries, framework, tool

I have recently moved from Java to Erlang. I see some of the terms mentioned in the subject line, are used in a confusing way. I need clarity on these terms.

My understanding is as follows. Please correct me if I am wrong.

  1. An application can be started and stopped as a node.
  2. A library provides a set of functions to implement a specific functionality say SSH, FTP, String manipulation, etc.
  3. A Framework provides only the guidelines without any implementation. Applications or libraries are implemented based on a Framework.

Some of the usage examples:
I have highlighted the usage as preformatted text.

  1. As per STDLIB User’s Guide, “The Standard Erlang Libraries application, STDLIB, is mandatory…”.
  2. As per Kernel User’s Guide, “The Kernel application has all the code necessary to run the Erlang runtime system…”
  3. As per Common Test User’s Guide, “Common Test is a portable application for automated testing…”
  4. As per Common Test Reference Manual, “A framework for automated testing of any target nodes…”
2 Likes

You are pretty close so I think all replies will be pedantic differences.

I like to think of applications as libraries + state. This isn’t a rigorous definition, but I find the mental model helpful.

I had a question about why app.src is included in Erlang libraries and got insightful responses. So basically libraries are applications without processes being started.

Framework isn’t an erlang specific term, and I believe that common test is using it in the same way other ecosystem’s might.

3 Likes

See the application module manual page. Applications may be loaded, unloaded, started and stopped on a node or a cluster. Applications have environment variables which may be used by it’s modules to configure behaviour.

A library application may be loaded and unloaded but not started, or at least start doesn’t have the effect of creating processes.

4 Likes

good move :wink:

Some of my thoughts below.

Yes, but instead of using a term library we might also say about for example FTP module which is an exposed API module towards FTP functionality.

  1. such API module is documented on man page Erlang -- ftp)
  2. and relates to source code found in a file ftp.erl

Yes, because you can use ct (Common Test application) “as is”: start it and run tests without any more modifications.

Yes, because ct together with Erlang is a nice base for extending it into much more complex test environments addressing more specific needs (e.g. controlling some test hardware).

3 Likes

I found the following definition in the book “Erlang and OTP in Action”.

Active versus library applications
Both active applications and library applications use the same directory layout and metadata files, and both fit into the overall OTP application framework. The main difference is that active applications have a life cycle and must be started in order to be useful. By contrast, library applications are a passive collection of modules to be used by other applications, and they don’t need to be started or stopped.

2 Likes