Best solution for Web service Rest [closed]

0

I wanted to implement a Web Service that would provide data to mobile platforms (Android and iOS), does anyone know the best service I can use for this?

I was doing some research and found RESTEasy and JBoss, but as I do not know anything I would like to start with a good solution (great growth potential).

    
asked by anonymous 07.08.2015 / 17:25

2 answers

2

Pedro Simões, technically the ASP.NET Web Api is Open Source. In this case you can use the VS Code or the VS 2015 Community , As for tutorials for ASP.NET Web Api, you find them very easy on Google.

If you have enjoyed the above tools and want to use something that has its origins in the Open Source world, you can think of NodeJS with ExpressJS , but to do so, you may need the NodeJS Tools to VS

Here's a quick guide on RESTful API using ExpressJS: link

And if you've enjoyed what you've seen, you can even think about reading EdgeJS and join the two worlds together

    
07.08.2015 / 17:48
2

Spark
Very simple to use

public static void main(String...args) {
   get("/umPath", (req, res) -> {
       //Regra de negocio
       return "resultado"
   });
}

SpringBoot
Also very simple, but different from spark, a controller should be created and annotated with @RestController

@ResController
@EnableAutoConfiguration
public class UmaClasseController {

    @RequestMapping("/umPath")
    @ResponseBody
    String ola() {
        //Regra de negocio
        return "Resultado";
    }

    public static void main(String[] args) throws Exception {
        SpringApplication.run(UmaClasseController.class, args);
    }
}

The good thing about Spring is that if you put the return type as an object or an object collection it already serializes to JSON.

Jersey
It's also good, but requires some configuration, and can be used in conjunction with SpringBoot, annotated with @Component.

    
07.08.2015 / 17:37