Meaning of "Runtime Environment" and of "Software framework"? - frameworks

I have heard of several things, quoted from Wikipedia:
"Java Runtime Environment",
A JVM is distributed along with a set
of standard class libraries that
implement the Java application
programming interface (API).
Appropriate APIs bundled together form
the Java Runtime Environment (JRE).
"Adobe Integrated Runtime"
Adobe Integrated Runtime, also known
as Adobe AIR, is a cross-platform
runtime environment developed by Adobe
Systems for building Rich Internet
Applications (RIA) using Adobe Flash,
Adobe Flex, HTML, and Ajax, that can
be run as desktop applications.
".NET Framework"
The .NET Framework (pronounced dot
net) is a software framework for
Microsoft Windows operating systems.
It includes a large library, and it
supports several programming languages
which allows language interoperability
(each language can use code written in
other languages). The .NET library is
available to all the programming
languages that .NET supports.
As described above, if I understand correctly, the first two seem to be related to "runtime environment", but there is no related Wikipedia to explain what "runtime environment" is.
The third is said to be a "Software framework", which has a Wikipedia article as:
a software framework is an abstraction
in which common code providing generic
functionality can be selectively
overridden or specialized by user
code, thus providing specific
functionality. Frameworks are a
special case of software libraries in
that they are reusable abstractions of
code wrapped in a well-defined
Application programming interface
(API), yet they contain some key
distinguishing features that separate
them from normal libraries.
So my questions are:
Are "Runtime Environment" and
"Software framework" the same
thing? If not, how do they differ,
and do they belong to some common
category?
Are they all programming
libraries/APIs that can be used by
programmers to develop their own
software?
The three examples are often
required when installing some
software. Do they belong to the
concept of virtual machine? If
not, what category do they belong
to? How is that category different
from virtual machine?
Thanks and regards!
PS: I don't know if this post is more suitable for superuser or for stackoverflow, as the three examples are often required when installing some software, and they are also seem to be providing API for software developers.

No. A runtime environment basically is a virtual machine that runs on top of a machine - provides machine abstraction. It is generally lower level than a library. A framework can contain a runtime environment, but is generally tied to a library.
Java, AIR and .NET (in this case the Common Language Runtime) has each its own runtime in a certain byte code that runs on top of the operating system. It allows the code to be quite portable without recompilation to do it this way.
Libraries and APIs are used for making new programs. A runtime environment is where the programs run.
A runtime environment does coincide with the concept of a virtual machine, albeit not as complex as VMWare or otherwise. They both share the goal of abstracting the underlying systems to a point that other software can run on it.

Are "Runtime Environment" and "Software framework" the same thing? If not, how do they differ, and do they belong to some common category?
No, not really. The "runtime environment" is typically referring to the core technology that actually executes the code itself. In Java, this would be the JVM - in .NET, the CLR. The "framework" typically refers to the suite of libraries that are distributed by default.
Are they all programming libraries/APIs that can be used by programmers to develop their own software?
This is more of the "framework" - the "Framework" provides the APIs available by default.
The three examples are often required when installing some software. Do they belong to the concept of virtual machine? If not, what category do they belong to? How is that category different from virtual machine?
A Virtual Machine is a form of "runtime environment" - this is what Java and C# uses for their runtime environment.
The confusion arises since you typically install both things together - as a runtime environment is of little use without some basic libraries (the framework), and a framework does nothing without a runtime environment (since the latter is required to execute code based on the framework).

Related

Do interpreted languages need an operating system to work?

Do interpreted languages such as Java and Python need an operating system to work?
For example, on a bare-metal ARM microcontroller, can an interpreter be installed such that we can have both compiled code such as C, and interpreted code such as Python working together, Or is an OS needed to support this?
Of course you can write an interpreter that runs on bare-metal, it is just that if the platform does not have an OS any run-time support the language needs must be part of the interpreter. To the extent in some cases that such an interpreter might essentially be an OS. That is if it provides the services to operate a system, it could be called an operating system.
It is not perhaps as simple as interpreted vs compiled. Java for example runs on a virtual machine and is "compiled" to bytecode. The bytecode is interpreted (or just-in-time compiled in some cases), rather then the Java source directly. In an embedded system, it is possible that you would deploy cross-compiled bytecode on the target rather then the source. Certainly however JVMs exist for bare-metal. Some support multi-threading through a third party RTOS, others either have that support built-in or do not support threading at all.
There are interpreters for cut-down subsets of JavaScript and Python that run on bare-metal microcontrollers. I am not sure about full implementations, but it is technically possible given sufficient run-time support even if not explicitly implemented. To fully support some of these languages along with all the standard and third-party libraries and frameworks a developer might expect, may require so much run-time support and resource that it is simpler to deploy and OS, so implementations for resource constrained systems are often subsets or have restricted libraries.
Java needs a VM - virtual machine. It isn't interpreted, but executes byte code. Interpreted would mean grabbing the source in run-time as it goes, like BASIC.
When Java was new and exciting around year 2000, everyone thought it would be the next big general-purpose language, replacing C++. The syntax was so clean, it was "pure OO" and not some "filthy hybrid".
It was the major buzz word of the time. Schools stopped teaching C and C++. MCU manufacturers started to make chips with Java VM in hardware. Microsoft made their own Java "standard". Everyone was high on the Java hype.
Then as the Internet hype as whole collapsed in 2002, it took the Java hype with it. In the sober hang-over afterwards, people started to realize that things like byte code, VMs and garbage collection probably don't belong on bare metal systems.
They went back to using compiled C for hardware-related programming. Or in fact they never stopped, since Java never quite made it there, save for some oddball exotic architectures.
Java remained used only in the areas were it was suitable, namely web, desktop and mobile development. And so it got a second golden age when the smart phone hype struck around 2010.
No. See for example picoJava, which is one of several solutions for running Java natively. You can't get closer to bare metal than running bytecode on the CPU.
No. Some 8-bit computers had interpreted languages in ROM despite not having anything reasonably resembling a modern operating system. The Apple 2 is one example. You could boot the system without any disks or tapes, and it would go straight to a BASIC prompt, where you could write basic (no pun intended) programs.
Note that an operating system is somewhat of a vague term when speaking about these days - these 8-bit computers did have some level of firmware, and this firmware did provide some OS-type functionality like access to basic peripherals. In these days, what we now know as an OS was more commonly called a "DOS" - a Disk Operating System. MS-DOS is one of them, as well as Apple's ProDOS. These DOS's evolved into our modern-day operating systems (e.g. Windows 95 was based on top of MS-DOS, while modern Windows versions derive from a separate branch that was largely re-implemented with more modern techniques), so one could claim that their ancestors are the closest they had to what we now call an OS.
But what is an interpreter but a piece of software?
In a more theoretical sense, an interpreter is simply software - a program that takes input and produces output. Suppose you were to implement a custom solid-state Turing Machine. In this case, your "input" would be the program to be interpreted, and the "output" would be the program's behavior. If "software" can run without an operating system, then an interpreter can.
Is this model a little simplified? Of course. The difference is a matter of degree, not nature. Add very basic user input and output capabilities (e.g. a TTY) and you have the foundation to implement all, or nearly all, of the basic functionality of a language such as Java byte code, Python, or BASIC. The main things you would be missing are libraries and whatnot that depend on things like screen manipulation, multiprocessing, and networking, but you could handle them with time too.

What does a "framework" actually mean?

Can anybody tell me in SIMPLE words, what does it mean when we say "I want to build a framework for blah..blah"
From Software Framework on Wikipedia:
In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software. A software framework is a universal, reusable software platform used to develop applications, products and solutions. Software frameworks include support programs, compilers, code libraries, an application programming interface (API) and tool sets that bring together all the different components to enable development of a project or solution.
Thank you

What is meant by "application framework"? [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicates:
What is a framework? What does it do? Why do we need a framework
What is the difference between a class library and a framework
Although I referred to various sources, I still can't understand the proper definition. What is meant by "application framework"?
Here's a simpler answer:
Application frameworks make writing applications easier.
Creating applications is hard. Applications have to provide input and output which they get through operating system semantics. Modern applications are usually GUI based and a GUI app is orders of magnitude more complex than a non-GUI app.
It's that simple. The framework takes all the complexities of interfacing with the operating system and simplifies them for you. It handles all the nitty-gritty details for you. Obviously certain frameworks do a better job at it than others.
There is one drawback to using an application framework that rarely seems to be discussed (presumably because we are all smiling about the amount of work we didn't have to do). In order to provide a simplified view of the operating environment, a framework has to box you into a certain 'style'. If your app is sufficiently different from the usual form of app, you are likely to end up frustrated in the framework as it will make doing what you want very difficult. This is partly because you now have to do all the things that the framework was hiding from you and partly because the framework is probably a closed system.
Frameworks are a special case of software libraries in that they are
reusable abstractions of code wrapped
in a well-defined Application
programming interface (API), yet they
contain some key distinguishing
features that separate them from
normal libraries.
An application framework consists of a framework used by software developers to implement the standard structure of an application for a specific development environment
Wikipedia answers, as you might expect, that an application framework is a framework for developing applications.
An application typically provides a user interface. "Application framework" can be used loosely to refer to user-interface frameworks that provide little more than a collection of low-level user-interface controls -- like MFC, Swing, Qt and the like.
However, it is useful to distinguish these from more powerful frameworks like the Eclipse Rich-Client Platform and the Netbeans Platform, which provide a higher-level framework -- built atop those low-level toolkits -- on which to develop applications.
I personally use "application platform" only for these latter platforms, and refer to the low-level APIs as "user-interface toolkits."

What is the difference between a language and a framework?

Can someone give me a clear, concise definition of the difference between a programming language and a framework? I have scoured the web and been unable to find an adequate definition.
For extra credit, is it possible for a language and a framework to become so inextricably linked that there IS no difference, or is there such a clear line between them that this isn't possible?
A language is syntax, grammar, semantics (and perhaps a core library) that implementers are required to support. A framework is a cohesive set of library code that together simplifies programming in any given language.
An application framework is the organizational structure of any application's code, including choices for conventions in files/folders, classes/functions, etc.
An application framework product is any tool that helps generate the framework for an application.
An application design pattern is any conceptual approach for organizing code at the application level.
An software language is a language-based tool that can be used to build applications, utilities, libraries, frameworks, etc.
A library is any extension in functionality to the native compiled functionality of a language.
A standard library is a library packaged with the language product itself.
An external library is a library outside of the language product itself and is either called remotely or installed locally.
A code-generator is any tool that dynamically generates permanent runtime code based on the developer's input.
Regarding the clear line between language and framework, i suppose you can count DSLs (Domain Specific Languages) as constructs that are both a Language and a Framework ( as it is a Framework in the original Language it is build upon).
Lisp is the only language i can think of now that may blur such distinction:
"The name LISP derives from "LISt Processing". Linked lists are one of Lisp languages' major data structures, and Lisp source code is itself made up of lists. As a result, Lisp programs can manipulate source code as a data structure, giving rise to the macro systems that allow programmers to create new syntax or even new domain-specific languages embedded in Lisp."
http://en.wikipedia.org/wiki/Lisp_(programming_language)
I hope i can explain using an example.
Dot net is a framework which consists of large libraries and supports many
programming languages.. C# is a programming language through which you can give
instruction to a machine mainly computer.. Now if your source code is in C#
you can use Dot net framework libraries and the source code which is written in other
languages..
At my point, a programming language looks like bunch of stuff (syntax,grammar, semantics etc.) which people are already combine them into one more convenient, more useful, easier to use, and more enjoyable - a framework, and I love to have a framework before start making a program.
I know some programming languages like C, PHP, ASP, Python, Java, and some frameworks like Yii, Zend, Pygame, Struts. All I see is there can be many frameworks built from a programming language, but a framework is built from only on programming language.
A programming language is a specified, standardized method of communication between the programmer and computer (in modern languages, technically it's between programmer and compiler, which "interprets" your code into simpler instructions the computer can work with). It is a pure abstraction that specifies its structure, syntax and semantics; implementations of the language are generally considered part of the environment in which the programmer develops, and incorporate the compiler and any virtual machine implementation.
A framework is a standardized set of pre-written code libraries designed to be used and reused by developers, and is again tied more to the environment. An environment is the intersection of the language, framework, virtual machine or runtime (an abstraction layer in which managed or interpreted code is translated from a machine-independent form into native code) and machine (the hardware layer on which native instructions are executed).

What is the difference between an OS and a Framework?

I recently posted a question about Azure... is it really an OS? I understand the technical details, and I got a lot of fuzzy answers... I really want to know... what do you think is the difference between an OS and a Framework?
Just for reference, Azure will be built on top of Hyper-V servers and the virtual machines will be running vanilla Windows Server 2008. It will run services that creates a cloud on top of the many virtual machines which is called Azure. Windows is calling Azure an OS.
I am trying to understand how to define the difference between an OS and a framework.
Operating System: The infrastructure software component of a computer system
Framework: A re-usable design for a software system (or subsystem).
By these definitions it seems to me, that an operating system can be built using a framework, and a framework can be built to interact with an operating system.
Singularity is an example of an experimental OS that is built using managed code.
Framework is a very broad term, it can be used to describe many types of subsystems. It could even describe an operating system.
Operating System is more specific, it implies facilitation of interaction with a computers or group of computers hardware layer, through the use of human user interfaces. I think Azure fits this description.
It's up to marketing - I don't think the terms have a definite meaning any more.
Is a JVM a framework?
What if it's running on a raw uC or even an FPGA - is it an OS?
An OS is the thing that directly interfaces with the machine, be it virtual or real. It has to expose syscalls that handle input devices, output devices, sound, networking, and all the other things that we take for granted these days. It also often provides some kind of UI which uses these services to make it easy to use/useful for an end-user. It needs to have device drivers to work with video cards, sound cards, etc. (Once again, these can be virtualized).
A framework is... something built on top of the OS. It, too, exposes an API, but they are often not so low-level as the one the OS exposes.
frameworks provide api contracts that oses usually don't - meaning they sit atop the os, hide and manage the differences, and consequently give you that platform independence goodness that can broaden our target audience
A framework thought to be as a development environment,a helping platform for further developments and you can work additively to create some other application using components of framework, while OS is system software is an environment to operate a system.