-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.html
executable file
·143 lines (118 loc) · 13.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<html>
<head>
<title>Spark Framework - A tiny Java web framework</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="description" content="Spark Framework - Create web applications in Java rapidly. Spark is a micro web framework that lets you focus on writing your code, not boilerplate code.">
<script>for(var a="nav section footer".split(" "),b=0;b<a.length;b++){document.createElement(a[b])}</script>
<link rel="stylesheet" media="screen" href="/assets/stylesheets/main.min.css">
<link rel="shortcut icon" type="image/png" href="/assets/images/favicon.png">
</head>
<body>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-W4XBCK" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-W4XBCK');</script>
<!-- End Google Tag Manager -->
<!-- Fork me on GitHub -->
<a id="fork-me" href="https://github.com/perwendel/spark" target="_blank">
<img style="position:fixed;top:0;right:0;border:0;z-index:99999"
src='data:image/png;base64,iVBORw0KGgoAAAANSUhEU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k5wDVWg1woAq4IkcqEKeyIAq4Ik7BlSBMZADVWgMZEAV8EQOVCFPZEAV8EQOVAFP5EAV8kQGVIHVCAeqt5LfSAZUAU/kQBX6JiUDqtBqhAFVwBM5UIU8kQHVW8krDlShcwEDqoAncqAaYqEncqAaYpEnMqD6D2v15QnHQA5Ufaz71eqJxsAFg/BY35HriXbIHMJhEdftM+6QWUSHRVw3+L+VLXhEh4VcGM8LJnHGQjCKBZcgLOKysWATiEXBjAqxiMvGglEsMfhRWS4bC3bBk+ojPuIjPiIc/wAQkAE6ZqHsywAAAABJRU5ErkJggg=='
alt="Fork me on GitHub">
</a>
<!-- End Fork me on GitHub -->
<div id="some-buttons">
<a id="some-twitter" href="https://twitter.com/sparkjava" target="_blank">
<img src='data:image/svg+xml;base64,PHN2ZyB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHg9IjAiIHk9IjAiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIiB2aWV3Qm94PSI0MCAtNjAgMjAwIDIwMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyA0MCAtNTkuOCAyMDAgMjAwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjMkFBOUUwIiBkPSJNMTQwLTUwYzUwIDAgOTAgNDAgOTAgOTBzLTQwIDkwLTkwIDkwYy01MCAwLTkwLTQwLTkwLTkwUzkwLTUwIDE0MC01ME0xNDAtNjBDODUtNjAgNDAtMTUgNDAgNDBzNDUgMTAwIDEwMCAxMDBjNTUgMCAxMDAtNDUgMTAwLTEwMFMxOTUtNjAgMTQwLTYwTDE0MC02MHpNMTk5IDljLTQgMi05IDMtMTQgNCA1LTMgOS04IDExLTEzIC01IDMtMTAgNS0xNSA2IC00LTUtMTEtOC0xOC04IC0xMyAwLTI0IDExLTI0IDI0IDAgMiAwIDQgMSA2IC0yMC0xLTM4LTExLTUwLTI1IC0yIDQtMyA4LTMgMTIgMCA4IDQgMTYgMTEgMjAgLTQgMC04LTEtMTEtMyAwIDAgMCAwIDAgMCAwIDEyIDggMjIgMTkgMjQgLTIgMS00IDEtNiAxIC0yIDAtMyAwLTUgMCAzIDEwIDEyIDE3IDIzIDE3IC04IDctMTkgMTAtMzAgMTAgLTIgMC00IDAtNiAwIDExIDcgMjQgMTEgMzcgMTEgNDUgMCA2OS0zNyA2OS02OSAwLTEgMC0yIDAtM0MxOTIgMTggMTk2IDE0IDE5OSA5TDE5OSA5eiIvPjwvc3ZnPg=='
title="Follow Spark on Twitter"
alt="Follow Spark on Twitter">
</a>
<a id="some-gplus" href="https://plus.google.com/+Sparkjavaplus" target="_blank">
<img src='data:image/svg+xml;base64,PHN2ZyB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHg9IjAiIHk9IjAiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIiB2aWV3Qm94PSItOSAtOSAyMDAgMjAwIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IC05LjUgLTkuMiAyMDAgMjAwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjREM0QTM4IiBkPSJNOTEtOWMtNTUgMC0xMDAgNDUtMTAwIDEwMCAwIDU1IDQ1IDEwMCAxMDAgMTAwczEwMC00NSAxMDAtMTAwQzE5MSAzNiAxNDYtOSA5MS05TDkxLTl6TTkxIDFjNTAgMCA5MCA0MCA5MCA5MCAwIDUwLTQwIDkwLTkwIDkwIC01MCAwLTkwLTQwLTkwLTkwQzEgNDEgNDEgMSA5MSAxTTEwNCAxMDVsLTUtNGMtMi0xLTQtMy00LTYgMC0zIDItNSA0LTcgNi01IDEzLTEwIDEzLTIxIDAtMTEtNy0xNy0xMS0yMGg5bDEwLTZIOTBjLTggMC0yMCAyLTI4IDkgLTYgNi05IDEzLTkgMjAgMCAxMiA5IDIzIDI1IDIzIDIgMCAzIDAgNSAwIC0xIDItMSAzLTEgNiAwIDUgMiA4IDUgMTAgLTcgMS0xOSAxLTI4IDcgLTkgNS0xMSAxMy0xMSAxOCAwIDExIDEwIDIxIDMyIDIxIDI2IDAgMzktMTQgMzktMjhDMTE2IDExNiAxMTAgMTEwIDEwNCAxMDV6TTg0IDg4Yy0xMyAwLTE5LTE3LTE5LTI3IDAtNCAxLTggMy0xMSAyLTMgNy01IDEwLTVDOTIgNDUgOTggNjIgOTggNzNjMCAzIDAgOC00IDExQzkyIDg2IDg4IDg4IDg0IDg4ek04NCAxNDhjLTE2IDAtMjYtOC0yNi0xOCAwLTExIDEwLTE0IDEzLTE1IDYtMiAxNC0yIDE2LTIgMiAwIDIgMCAzIDAgMTEgOCAxNiAxMiAxNiAyMEMxMDYgMTQxIDk5IDE0OCA4NCAxNDh6Ii8+PHBvbHlnb24gZmlsbD0iI0RDNEEzOCIgcG9pbnRzPSIxNDEgODggMTQxIDczIDEzNCA3MyAxMzQgODggMTE5IDg4IDExOSA5NSAxMzQgOTUgMTM0IDExMCAxNDEgMTEwIDE0MSA5NSAxNTYgOTUgMTU2IDg4ICIvPjwvc3ZnPg=='
title="Follow Spark on Google Plus"
alt="Follow Spark on Google Plus">
</a>
<a id="some-facebook" href="https://www.facebook.com/sparkjava" target="_blank">
<img src='data:image/svg+xml;base64,PHN2ZyB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMCIgeT0iMCIgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIHZpZXdCb3g9IjQwIC01OS44IDIwMCAyMDAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgNDAgLTU5LjggMjAwIDIwMCIgeG1sOnNwYWNlPSJwc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y4zLTExLjMtNS42LTE2LjcgLTIuMS0xLjgtNi40LTIuNS05LjUgMC4ydjE4LjhjLTUuMyAxMS4yLTExLjMgMjItMTguNyAzMS45bC03IDUuMnY0My42aDQuOGMwIDAgNi40IDQuMiA2LjggNCAwLjYgMC4zIDQ5LjkgMC4xIDQ5LjkgMC4xIDIuNiAwLjEgMTIuMy03LjYgNi4yLTEzLjQgLTAuOC0wLjUtMC43LTIuMSAwLjEtMi43IDMuOC0wLjcgOC41LTguNSAzLjYtMTIuNiAtMC44LTEtMC4yLTIuNSAwLjctMi42IDIuOC0xLjUgNy44LTYuNSAzLjMtMTIuNSAtMC45LTAuNS0wLjktMS44LTAuMS0yLjUgNC4zLTAuNiA5LjgtMTEuMiAwLjctMTMuOEwxNTkuNyAyMC4yeiIvPjwvc3ZnPg=='
title="Like Spark on Facebook" alt="Like us on facebook">
</a>
</div>
<nav>
<ul>
<li id="logo"><a href="/"><img src="/assets/images/logo.svg" alt="Spark framework logo"></a></li>
<li id="news-li"><a href="/news.html">News</a></li>
<li id="contact-li"><a href="/contact.html">Contact</a></li>
<li id="tutorial-li"><a href="https://sparktutorials.github.io/" target="_blank">Tutorials</a></li>
<li id="documentation-li"><a href="/documentation.html">Documentation</a></li>
<li id="download-li"><a href="/download.html">Download</a></li>
</ul>
</nav>
<div class="padding-hack"></div>
<div class="spark-banner-background">
<section id="spark-banner">
<img src="/assets/images/logo_just_spark.svg" alt="Spark framework logo">
<h1 class="intro-text">Spark - A tiny <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> inspired framework for creating web applications in Java 8 with minimal effort</h1>
</section>
</div>
<section id="intro">
<h1>Quick Start</h1>
<div class="code-snippet"><pre><code class="language-java">import static spark.Spark.*;
public class HelloWorld {
public static void main(String[] args) {
get("/hello", (req, res) -> "Hello World");
}
}</code></pre></div>
<h1>Run and View</h1>
<div class="code-snippet"><pre><code class="language-markup">http://localhost:4567/hello</code></pre></div>
<h1>Built for Productivity</h1>
<p>
Spark Framework is a simple and lightweight Java web framework built for rapid development.
Spark's intention isn't to compete with Sinatra, or the dozen of similar web frameworks in different
languages, but to provide a pure Java alternative for developers that want to, or are required to,
develop their web application in Java.
</p>
<p>
Spark focuses on being as simple and straight-forward as possible, without the need for cumbersome
(XML) configuration, to enable very fast web application development in pure Java with minimal effort.
It’s a totally different paradigm when compared to the overuse of annotations for accomplishing pretty
trivial stuff seen in other web frameworks, for example, JAX-RS implementations.
</p>
<h2>Typical Usage</h2>
<p>
Our <a href="/news.html#sparksurvey">2015 survey</a>
tells us that over 50% of Spark users use Spark to create REST APIs, while about 25% use Spark to create webpages.
About 15% of deployed Spark applications each serve more than 10.000 users a day.
Click <a href="/news.html#sparksurvey">here</a> to read the full survey.
</p>
<h2>Why Use Spark?</h2>
<p>
If you're a Java developer with neither the urge nor time to learn a new programming language,
then Spark might be a great web framework for you. It will have you up and running in minutes,
and you won't have to think too much about configuration and boilerplate code (like you often have to
in other Java web frameworks, like Spring or Vaadin).
</p>
<h2>Why Not Use Sinatra?</h2>
<p>
If you're an experienced Ruby developer, or have experience with languages with similar syntax,
you should probably use Sinatra. However, if you're a Java developer and want to get the benefits you get
from Sinatra without having to learn a new language, Spark is a very good alternative. Spark is a simple
and lightweight Java web framework that doesn't get in your way!
</p>
<h2>Why Not Go with JAX-RS?</h2>
<p>
JAX-RS made life easier for Java web developers when it arrived. However, it's a bit messy due to the
overuse of annotations for accomplishing pretty trivial things. The annotation magic also makes things more
implicit, and it's not always easy to get a clear understanding of what's going on.
For people who are new to web frameworks and REST, Spark will have you up and running much faster
than using one of the JAX-RS implementations.
</p>
</section>
<wbr id="-li"> <!-- Guess why..! x) -->
<script type="text/javascript" src="/assets/javascripts/prism.js"></script>
<footer>
Spark Framework is a free and open source Java Web Framework, released under the <a href="https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)" target="_blank">Apache 2 License</a>
| <a href="/contact.html">Contact</a>
| <a href="/contact.html#team">Team</a>
</footer>
<script>document.getElementById(document.URL.split("#")[0].slice(document.URL.lastIndexOf('/')+1, -5)+"-li").className = "active";</script>
</body>
</html>