Internet Foundation Classes: Difference between revisions
m WP:CHECKWIKI error fixes + general fixes, References after punctuation per WP:REFPUNC and WP:PAIC using AWB (7510) |
|||
Line 2: | Line 2: | ||
==History== |
==History== |
||
On April 2, 1997, [[Sun Microsystems]] and [[Netscape Communications Corporation|Netscape]] announced their intention to combine IFC with other technologies to form the [[Java Foundation Classes]]<ref>{{cite web |
On April 2, 1997, [[Sun Microsystems]] and [[Netscape Communications Corporation|Netscape]] announced their intention to combine IFC with other technologies to form the [[Java Foundation Classes]].<ref>{{cite web |
||
| url=http://wp.netscape.com/newsref/pr/newsrelease378.html |
| url=http://wp.netscape.com/newsref/pr/newsrelease378.html |
||
| title=Sun and Netscape to jointly develop Java Foundation Classes |
| title=Sun and Netscape to jointly develop Java Foundation Classes |
||
| publisher=[[Netscape Communications Corporation]] |
| publisher=[[Netscape Communications Corporation]] |
||
| date=1997-04-02 |
| date=1997-04-02 |
||
| accessdate=2007-07-14}}</ref> |
| accessdate=2007-07-14}}</ref> |
||
Ultimately, Sun merged the IFC with other technologies under the name "Swing", adding the capability for a pluggable [[look and feel]] of the widgets. |
Ultimately, Sun merged the IFC with other technologies under the name "Swing", adding the capability for a pluggable [[look and feel]] of the widgets. |
||
Line 17: | Line 17: | ||
* contrary to [[Abstract Window Toolkit|AWT]], IFC were written in pure [[Java (programming language)|Java]], thus being (at the time) browser-independent. |
* contrary to [[Abstract Window Toolkit|AWT]], IFC were written in pure [[Java (programming language)|Java]], thus being (at the time) browser-independent. |
||
* IFC already provided two [[Layout manager]]s, that would be later included in the standard [[JDK]] |
* IFC already provided two [[Layout manager]]s, that would be later included in the standard [[JDK]] |
||
* some IFC components were able to read [[HTML]] content from [[Uniform Resource Locator|URL]]s, but the implementation was still far from reliable. |
* some IFC components were able to read [[HTML]] content from [[Uniform Resource Locator|URL]]s, but the implementation was still far from reliable. |
||
However, Swing also improved IFC in a lot of ways: |
However, Swing also improved IFC in a lot of ways: |
||
* IFC did not have a [[Model-view-controller|Model-View]] architecture |
* IFC did not have a [[Model-view-controller|Model-View]] architecture |
||
* contrary to Swing, the [[Look and feel]] of IFC components was written in the components themselves, making it impossible to change it easily. |
* contrary to Swing, the [[Look and feel]] of IFC components was written in the components themselves, making it impossible to change it easily. |
||
* IFC components were not [[JavaBean]]s. IFC had a specific persistence mechanism<ref>{{cite web |
* IFC components were not [[JavaBean]]s. IFC had a specific persistence mechanism,<ref>{{cite web |
||
| url=http://infodoc.unicaen.fr/docs/Java/guide.IFC1.1/persist.mak.html#1004819 |
| url=http://infodoc.unicaen.fr/docs/Java/guide.IFC1.1/persist.mak.html#1004819 |
||
| title=IFC 1.1 guide - Persistence |
| title=IFC 1.1 guide - Persistence |
||
| date=2000-06-15 |
| date=2000-06-15 |
||
| accessdate=2007-07-15}}</ref> |
| accessdate=2007-07-15}}</ref> but it was a bit complex, and not compatible with the Java [[Serialization]] API. |
||
* event mechanism was still raw<ref>{{cite web |
* event mechanism was still raw,<ref>{{cite web |
||
| url=http://infodoc.unicaen.fr/docs/Java/guide.IFC1.1/targets.mak.html#100582 |
| url=http://infodoc.unicaen.fr/docs/Java/guide.IFC1.1/targets.mak.html#100582 |
||
| title=IFC 1.1 guide - Targets and commands |
| title=IFC 1.1 guide - Targets and commands |
||
| date=2000-06-15 |
| date=2000-06-15 |
||
| accessdate=2007-07-15}}</ref> |
| accessdate=2007-07-15}}</ref> and the [[Event loop]] sometimes needed to be accessed directly. |
||
==Examples== |
==Examples== |
Revision as of 00:00, 29 December 2010
The Internet Foundation Classes (IFC) were a graphics library for Java originally developed by Netcode Corporation and first released by Netscape Corporation on December 16, 1996.
History
On April 2, 1997, Sun Microsystems and Netscape announced their intention to combine IFC with other technologies to form the Java Foundation Classes.[1]
Ultimately, Sun merged the IFC with other technologies under the name "Swing", adding the capability for a pluggable look and feel of the widgets.
Because its technology has been merged to constitute Swing and Java 2D, IFC is now no longer maintained.
Differences with Swing
Swing draw a lot of features from IFC:
- contrary to AWT, IFC were written in pure Java, thus being (at the time) browser-independent.
- IFC already provided two Layout managers, that would be later included in the standard JDK
- some IFC components were able to read HTML content from URLs, but the implementation was still far from reliable.
However, Swing also improved IFC in a lot of ways:
- IFC did not have a Model-View architecture
- contrary to Swing, the Look and feel of IFC components was written in the components themselves, making it impossible to change it easily.
- IFC components were not JavaBeans. IFC had a specific persistence mechanism,[2] but it was a bit complex, and not compatible with the Java Serialization API.
- event mechanism was still raw,[3] and the Event loop sometimes needed to be accessed directly.
Examples
Hello World
This is the classic Hello world program in IFC:
import netscape.application.*;
import netscape.util.*;
public class HelloWorld extends Application {
public void init() {
super.init();
// Create a text field
TextField textField = new TextField(100, 24, 128, 24);
// Set the string to be displayed in the text field.
textField.setStringValue("Hello World");
// Add the text field to the view hierarchy.
mainRootView().addSubview(textField);
}
// This method allows HelloWorld to run as a stand alone application.
public static void main(String args[]) {
HelloWorld = new HelloWorld ();
ExternalWindow mainWindow = new ExternalWindow();
Size size;
app.setMainRootView(mainWindow.rootView());
size = mainWindow.windowSizeForContentSize(320, 200);
mainWindow.sizeTo(size.width, size.height);
mainWindow.show();
app.run();
}
}
To be compared with the equivalent Java Swing code:
import javax.swing.*;
public class HelloWorld extends JFrame {
public HelloWorld() {
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
add(new JLabel("Hello, World!"));
}
public static void main(String[] args) {
HelloWorld app = new HelloWorld();
app.pack();
app.setVisible(true);
}
}
See also
References
- ^ "Sun and Netscape to jointly develop Java Foundation Classes". Netscape Communications Corporation. 1997-04-02. Retrieved 2007-07-14.
- ^ "IFC 1.1 guide - Persistence". 2000-06-15. Retrieved 2007-07-15.
- ^ "IFC 1.1 guide - Targets and commands". 2000-06-15. Retrieved 2007-07-15.
External links
The last places, where to download the IFC:
- ftp-Server 1 Uni-Potsdam
- ftp-Server 2 Uni-Potsdam
- ftp-Server 3 Uni-Potsdam
- ftp-Server Uni-Bochum
- ftp-Server SunSite
All find from
The web-archive where is the last place to find really all files: