views:

72

answers:

5

Hi, I ran into this question many times ago and have seen the terms again and didn't know their real concept in computer engineering.

What do platform and framework refer to?

I see many terms like platform-independent and development platforms, and also same for frameworks, but i can't quietly understand them. Do they refer to libraries? do they refer to different kinds of Operating-System?

+2  A: 

Platform usually means something to do with the environment the software is running in. So it often means the operating system (e.g. windows or Linux), but sometimes the architecture (x86 might be a platform, or the java virtual machine). A framework is usually a collection of functions or classes so often is the same as a library, or can be roughly understood in the same way.

Graham Lee
@Graham: Thanks, helped me very much for better understanding.
Green Code
+3  A: 

Platform is an amorphous term, which can mean:

  • Hardware (usually CPU/Architecture) e.g. x86, Alpha etc..
  • Operating System e.g. Unix, Windows, Linux, Mac OS X etc..
  • Virtual Machine e.g. Java JVM, FlashPlayer AVM

Frameworks on the other hand are usually a collection of tools: which could be software, hardware, methodology/pattern based (although not necessarily all of these in any particular framework) that combine to provide a way of building applications (or specific layers of an application)

A few examples of frameworks are:

Software

  • Java Swing
  • Microsoft WPF
  • Adobe Flex
  • Ruby on Rails
  • Django on Python

Hardware/Software

  • Arduino (arguable)
  • Trusted ILLIAC

Method/Patterns (or Process)

  • SCRUM
  • IBM Rational Unified Process
slomojo
I'd say that Arduino is a platform.
Matteo Italia
Yeah, I couldn't think of a good example of a hardware framework (that people on SO would've generally heard of), but Arduino is (arguably) both a platform and a framework.
slomojo
+1  A: 

You can have a read about Platforms and Software Frameworks here: link text

Ionel Gog
+1  A: 

I'll try the platform part: Platform is used to talk about something that you "build upon" or you can think of as "stand upon" for a literal analogy to get something done. I've used "telephony platforms" - which consist of software and hardware components that enable the development of interactive voice response systems.

Gabriel
@Gabriel: Thank you, the gray area in my mind is lightin up.
Green Code
+1  A: 

The term framework is very well defined: a framework is very similar to a library, except that Control is Inverted. (Inversion Of Control is the defining characteristic of what constitutes a framework.) IOW: you call a library, but a framework calls you.

Another way to think about it, is that you write an application, but leave all the un-interesting details blank and use libraries to fill them. A framework OTOH is an application. It is an application which has all the interesting details left blank for you to fill in. (Of course, in the code you use to fill in the blanks you can in turn call libraries yourself. Also, the framework itself will call libraries to implement its inner workings. And, frameworks usually come bundled with a rich set of libraries which are tightly integrated with the framework. However, the distinction is still clear. Just because the framework and the libraries ship together in one package doesn't mean there is no distinction.)

The term platform, however, is not so well defined. It is also heavily overloaded. In the context of porting native applications, it usually refers to the combination of CPU ISA (e.g. x86, AMD64, IA-64, POWER, MIPS, ARMv9, Sparc), hardware architecture (PC, CHRP, PReP, Mac), kernel (Linux, NT) and base libraries (POSIX, Win32, Core Foundation).

In the broader context of software development, "platform" usually literally means "that which your code stands on". For a native application, that could be basically the same as above, for a JVM application it could be the JVM plus the JRE plus OSGI.

Basically, you can take the metaphor quite literal: a platform allows you (i.e. your code) to stand on higher ground than you could without it.

Jörg W Mittag
@Jörg: I wish i could vote for this answer one more time :D, thank you very much.
Green Code
@Jörg: that definition of framework is too narrow. For example, on Mac OS X and iOS platforms, a framework is a bundle containing a library and a set of supporting resources. No inversion of control is implied.
Graham Lee