PartOfTheOhana
PartOfTheOhana

Reputation: 685

how do java frameworks relate to java platform

I can code in Java, and I'm trying to understand the wiki article on frameworks and how they relate to java. I think java = the platform and the frameworks are things like Java EE, jsp, etc. (I've never used any of those)

I'm trying to see the connection here.... Also, does each framework get its own compiler? Do they all use the JVM?

Upvotes: 0

Views: 113

Answers (3)

Stephen C
Stephen C

Reputation: 718718

Strictly speaking Java is a programming language. Just a programming language. It needs an implementation if you are to compile and run programs.

The Java implementation(s) consist of bytecode compilers and related tools, and a runtime platform. The runtime platform consists of an implementation of the Java Virtual Machine (JVM), together with the runtime libraries that contain the standard classes.

There are in three primary Sun/Oracle Java "platform" types ... or Editions as they are called:

  • Java Standard Edition (SE) is the normal general purpose platform. Unless specified otherwise, this is what most people will be using.

  • Java Micro Edition (ME) is designed for embedded devices such as smart phones, set-top boxes and the like. It is a very cut-down version of Java, with some significant differences in some area.

  • Java Enterprise Edition (EE) is an extended platform designed to support enterprise computing. It adds support for web server development, component-based systems (EJB) and other things. (In fact J2EE is a bit more woolly than this, because there are web container distributions out there like Tomcat, Jetty and so on that provide a subset of the Java EE technologies ... on top of a standard Java SE platform.)

A framework is a different idea. Frameworks are typically systems of libraries that support a particular way of designing and implementing software applications. So for instance:

  • The core Spring Framework supports a style of programming where the system is "wired up" from a bunch of components at start up.

  • Spring MVC (and other frameworks) support web servers that are implement according to the Model-View-Controller design pattern.

  • A RESTful web server framework supports web servers that follow the RESTful model.

  • And so on.

These frameworks typically run on one or more kind of Java platform, depending on what they are doing.

Also, you could make a case that some of the technologies that are in Java EE platform are actually framework technologies. Servlets and EJBs are prime examples.

Upvotes: 2

mastrgamr
mastrgamr

Reputation: 631

From my understanding: Java is a programming language (that compiles through the JVM), it is "open source" and can be extended with different APIs. Java EE (Enterprise Edition) is an API of Java SE (Standard Edition), it adds more functionality to the Standard API of Java.

Frameworks are supposed to make programming in languages like Java easier, and decrease development time. For example a framework named "Play" is a pretty popular java framework that helps develop web pages. Frameworks are not seperate from the language, they use the language itself so they don't get their own compiler all it's doing is using the language.

Someone (or a company) just creates their own methods in java and make them available to use for anyone that wants to use it. Anyone can create a framework, you can probably think of a framework as a Lego set where each Lego piece is a method available to build your own program (or website, depending on what the framework was created for), eventually you can build your own program using those methods from the framework. (hope this is making sense, heh)

Upvotes: 3

suenda
suenda

Reputation: 783

If you are familiar with jQuery in javascript, well jQuery is a javascript framework. Same goes for framework for java. It just makes programming easier

Upvotes: 0

Related Questions