What's the difference between a “script” and an “application”?

前端 未结 20 2022
南旧
南旧 2020-12-04 14:53

I\'m referring to distinctions such as in this answer:

...bash isn\'t for writing applications it\'s for, well, scripting. So sure, your application m

相关标签:
20条回答
  • 2020-12-04 15:16

    What about:

    Script:

    A script is text file (or collection of text files) of programming statements written in a language which allows individual statements written in it to be interpreted to machine executable code directly before each is executed and with the intention of this occurring.

    Application:

    An application is any computer program whose primary functionality involves providing service to a human Actor.

    A script-based program written in a scripting language can therefore, theoretically, have its textual statements altered while the script is being executed (at great risk of , of course). The analogous situation for compiled programs is flipping bits in memory.

    Any takers? :)

    0 讨论(0)
  • 2020-12-04 15:17

    Script to me implies line-by-line interpretation of the code. You can open a script and view its programmer-readable contents. An application implies a stand-alone compiled executable.

    0 讨论(0)
  • 2020-12-04 15:19

    I would say that an application tends to be used interactively, where a script would run its course, suitable for batch work. I don't think it's a concrete distinction.

    0 讨论(0)
  • 2020-12-04 15:19

    This is an interesting topic, and I don't think there are very good guidelines for the differentiating a "script" and a "application."

    Let's take a look at some Wikipedia articles to get a feel of the distinction.

    Script (Wikipedia -> Scripting language):

    A scripting language, script language or extension language, is a programming language that controls a software application. "Scripts" are often treated as distinct from "programs", which execute independently from any other application. At the same time they are distinct from the core code of the application, which is usually written in a different language, and by being accessible to the end user they enable the behavior of the application to be adapted to the user's needs.

    Application (Wikipedia -> Application software -> Terminology)

    In computer science, an application is a computer program designed to help people perform a certain type of work. An application thus differs from an operating system (which runs a computer), a utility (which performs maintenance or general-purpose chores), and a programming language (with which computer programs are created). Depending on the work for which it was designed, an application can manipulate text, numbers, graphics, or a combination of these elements.

    Reading the above entries seems to suggest that the distinction is that a script is "hosted" by another piece of software, while an application is not. I suppose that can be argued, such as shell scripts controlling the behavior of the shell, and perl scripts controlling the behavior of the interpreter to perform desired operations. (I feel this may be a little bit of a stretch, so I may not completely agree with it.)

    When it comes down to it, it is in my opinion that the colloquial distinction can be made in terms of the scale of the program. Scripts are generally smaller in scale when compared to applications.

    Also, in terms of the purpose, a script generally performs tasks that needs taken care of, say for example, build scripts that produce multiple release versions for a certain piece of software. On the otherhand, applications are geared toward providing functionality that is more refined and geared toward an end user. For example, Notepad or Firefox.

    0 讨论(0)
  • 2020-12-04 15:19

    I would say a script is usually a set of commands or instructions written in plain text that are executed by a hosting application (browser, command interpreter or shell,...).

    It does not mean it's not powerfull or not compiled in some way when it's actually executed. But a script cannot do anything by itself, it's just plain text.
    By nature it can be a fragment only, needing to be combined to build a program or an application, but extended and fully developed scripts or set of scripts can be considered programs or applications when executed by the host, just like a bunch of source files can become an application once compiled.

    0 讨论(0)
  • 2020-12-04 15:21

    I think that there is no matter at all whether code is compiled or interpreted.

    The true difference is in core logic of code:

    • If code makes new functionality that is not implemented in other programs in system - it's a program. It even can be manipulated by a script.

    • If code is MAINLY manipulates by actions of other programs and total result is MAINLY the results of work of manipulated programs - it's a script. Literally a script of actions for some programs.

    0 讨论(0)
提交回复
热议问题