spark-a Tiny Sinatra inspired framework for creating Web applications in Java 8 with minimal effort Quick start
Import StaticSpark.Spark.*; Public class HelloWorld { Public Static void main( String[]Args) { get( "/hello", (Req,Res) -> "Hello World"); }}
Run and view
http://localhost:4567/hello
Built for productivity
Spark is a simple and lightweight the 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 pro Vide a pure Java alternative for developers this want to, or is required to, develop in Java.
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 the other web frameworks, for example, JAX-RS implementations.
Why use Spark?
If you ' re a Java developer with neither the urge nor time to learn a new programming language, and you ' re not planning to Build a super large Web application that scales in all directions and then Spark might is a great web framework for you. It'll have a running in minutes, and you won ' t has to think too much about configuration and boilerplate code (like you often has to and other Java web frameworks, like Spring or Vaadin).
Why isn't use Sinatra?
If you ' re an experienced Ruby developer, or has experience with languages with similar syntax, you should definitely use Sinatra. However, if you ' re a Java developer and want to get the benefits you get from Sinatra without have to learn a new Langua GE, Spark is a really good alternative. Spark is a simple and lightweight Java web framework This doesn ' t get in your way!
Why isn't go with jax-rs?
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 goin G on. For people who is new to web frameworks and REST, Spark'll has you up and running much faster than using one of the JA X-RS implementations.
Spark is created and maintained by Per Wendel. Logo and website by David SE
Spark-a Tiny Sinatra inspired framework for creating Web applications in Java 8 with minimal effor