blob: 62100d8c3f7f62d684aeef6d342daae1a5cd7f49 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 1.5.7.1">
<title>FAQ</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- ************* Meta ************* -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<!-- ************* OpenGraph ************-->
<meta name="description" content="The Eclipse N4JS language and its IDE enable high-quality JavaScript development for large Node.js projects.">
<meta property="og:site_name" content="Eclipse N4JS"/>
<meta property="og:title" content="Eclipse N4JS Language and IDE"/>
<meta property="og:url" content="https://numberfour.github.io/n4js"/>
<meta property="og:description" content="The Eclipse N4JS language and its IDE enable high-quality JavaScript development for large Node.js projects."/>
<meta property="og:image" content="../images/n4js.png">
<!-- ************* Favicon ************-->
<link rel="icon" href="../images/favicon.ico" />
<link rel="icon" type="image/png" href="../images/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="../images/favicon-16x16.png" sizes="16x16" />
<!-- ************* Back-to-top JQuery ************* -->
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
<!-- ************* Prism.js Syntax Highlighter ******-->
<link href="../styles/prism.min.css" rel="stylesheet"/>
<script src="../scripts/prism.js"></script>
<!-- ************* Styles ************* -->
<link rel="stylesheet" type="text/css" href="../styles/n4js-adoc.css">
<!-- ****************** NavBar ****************** -->
<div id="menubar">
<div class="banner">
<a href="../index.html"><img id="logo" src="../images/n4js-logo.png" alt="N4JS Language and IDE"></a>
</div>
<ul>
<li><a href="../downloads.html"></i>Download</a></li>
<li><a href="../community.html"></i>Community</a></li>
<li><a href="../userguides/index.html">Documentation</a></li>
</ul>
</div>
<button id="tocbutton">TOC</button>
<div id=faq>
<nav>
<h2>FAQ</h2>
<ul>
<li><a href="index.html" >FAQ</a></li>
<li><a href="comparison-java.html" class="is-active">N4JS and Java</a></li>
<li><a href="comparison-typescript.html" >N4JS and Typescript</a></li>
</ul>
</nav>
</div>
</head>
<body class="book">
<div id="header">
</div>
<div id="content">
<h1 id="_faq" class="sect0"><a class="link" href="#_faq">FAQ</a></h1>
<div class="sect1">
<h2 id="_why_did_you_create_n4js"><a class="link" href="#_why_did_you_create_n4js">Why Did You Create N4JS?</a></h2>
<div class="sectionbody">
<div class="paragraph">
<div class="title">FAQ</div>
<p>N4JS is created by <a href="http://www.numberfour.eu">NumberFour AG</a>. Our goal is to create a single
business platform on which apps can be installed and run. These apps are written in N4JS which is based
on JavaScript/ECMAScript.</p>
</div>
<div class="paragraph">
<p>JavaScript is the best language for external developers to contribute to our platform but we needed
important features to build large, reliable systems that are maintainable over time. What we needed was
a sound type system and that&#8217;s why we developed N4JS to provide these missing features.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_why_do_you_open_source_n4js"><a class="link" href="#_why_do_you_open_source_n4js">Why Do You Open-Source N4JS?</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>We stand on the shoulders of open technology and it&#8217;s our turn to give back. We see the strength of N4JS
not only for our own platform but as a foundation for others to build upon. This is why we release N4JS
as open-source. We are excited for feedback and always open for contributions!</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_how_does_n4js_compare_to_javascriptecmascript"><a class="link" href="#_how_does_n4js_compare_to_javascriptecmascript">How does N4JS compare to JavaScript/ECMAScript?</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>N4JS is based on JavaScript/ECMAScript. Feature-wise it is a super set of ECMAScript: It supports all
constructs known from JavaScript and most features from ECMAScript 2015 (missing features are to be
added soon). Since it provides a static type checker, the transpiler may find errors in given n4js
files containing plain JavaScript code. It would then reject the compilation to JavaScript and issue
errors instead. In the N4JS IDE, you can also edit plain JavaScript. In that case, the type checker
won&#8217;t issue any errors but will probably lead to runtime errors.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_how_does_n4js_compare_to_java"><a class="link" href="#_how_does_n4js_compare_to_java">How does N4JS compare to Java?</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>N4JS is an extension of ECMAScript making it is as different from Java as ECMAScript itself. N4JS does
add features which are quite similar to Java and the general idea is to make ECMAScript as type safe as
Java. For that reason, N4JS adds a static type system to ECMAScript, many concepts of which are similar
to Java&#8217;s type system.</p>
</div>
<div class="paragraph">
<p>We explain the <a href="comparison-java.html#comparison_java">differences and similarities between N4JS and Java on an
extra page</a>.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_how_does_n4js_compare_to_typescript"><a class="link" href="#_how_does_n4js_compare_to_typescript">How does N4JS compare to TypeScript?</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>We created N4JS with the goal to enable writing large ECMAScript projects that are as maintainable as
Java. To do this, we took the Java type system and adjusted it to ECMAScript&#8217;s characteristics. The N4JS
type checker is rigorous: type errors are not accepted. Where TypeScript also adds a static type system
on top of ECMAScript, their approach is quite the opposite in that their goal is to enable a smooth
transition from untyped to typed ECMAScript. The type checker in TypeScript makes some compromises in order
to accept more ECMAScript code.</p>
</div>
<div class="paragraph">
<p>Eventually both approaches will lead to similar solutions: The smarter and better the type checker
of N4JS becomes, the more programs it will accept without losing its soundness. The smarter and better
TypeScript&#8217;s type checker becomes, the less gaps there will be for incorrect ECMAScript code.</p>
</div>
<div class="paragraph">
<p>For a thorough explanation of the <a href="comparison-typescript.html#_comparison_typescript">differences and similarities
between N4JS and TypeScript</a> see our comparison page.</p>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
</div>
</div>
<div class="Grid social" style="color:#d5dfea">
<div class="Cell Cell--2-12 m-Cell--withMargin">
<h2>Quick Links</h2>
<ul>
<li><a href="../downloads.html">Download</a></li>
<li><a href="../userguides/index.html">Documentation</a></li>
<li><a href="https://github.com/eclipse/n4js/">Source</a></li>
<li><a href="https://github.com/eclipse/n4js/issues">Issues</a></li>
</ul>
</div>
<div class="Cell Cell--2-12 m-Cell--withMargin">
<br/><br/>
<ul>
<li><a href="https://www.eclipse.org/forums/index.php/f/365/">Forum</a></li>
<li><a href="http://n4js.blogspot.de/">Blog</a></li>
<li><a href="https://dev.eclipse.org/mailman/listinfo/n4js-dev">Mailing List</a></li>
<li><a href="https://projects.eclipse.org/projects/technology.n4js">Eclipse Project Page</a></li>
<li><a href="https://twitter.com/n4jsdev">Tweets by n4jsdev</a></li>
</ul>
</div>
<div class="Cell Cell--2-12 m-Cell--withMargin">
<br/><br/>
<ul>
<li><a href="http://www.eclipse.org/">Eclipse Home</a></li>
<li><a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="http://www.eclipse.org/legal/">Legal</a></li>
</ul>
</div>
<div style="clear: both; height: 0; overflow: hidden;"></div>
</div>
<script>
// Toggle the table of contents
$( "button#tocbutton" ).click(function() {
if ($("#tocbutton").css('right') == '25px') {
$( "#tocbutton" ).animate({right: '215px'},"slow");
$( "#toc.toc2" ).animate({right: '0'},"slow");
}
else {
$( "#tocbutton" ).animate({right: '25px'},"slow");
$( "#toc.toc2" ).animate({right: '-13rem'},"slow");
}
});
</script>
<script type="text/javascript">
// Create a back to top button
$('body').prepend('<a href="#" class="back-to-top">Back to Top</a>');
var amountScrolled = 300;
$(window).scroll(function() {
if ( $(window).scrollTop() > amountScrolled ) {
$('a.back-to-top').fadeIn('slow');
} else {
$('a.back-to-top').fadeOut('slow');
}
});
$('a.back-to-top, a.simple-back-to-top').click(function() {
$('html, body').animate({
scrollTop: 0
}, 700);
return false;
});
</script>
</body>
</html>