Spark-a Tiny Sinatra inspired framework for creating Web applications in Java 8 with minimal effor

Source: Internet
Author: User
Tags fast web



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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.