简体   繁体   中英

Scala, Spring or Hadoop as an Api service?

I am starting a new Java application - and the current code base I am taking over - appears to have been built with Jetty and its writing out HTML markup directly from the servlet itself.

package root.web;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

    public class HTML { 
        public static String getHead(int pin,boolean due,
                String fname, String lname){
         String HEAD = "";
    HEAD += "<!DOCTYPE html>";
    HEAD += " <html>";

    HEAD += " <head>";

I am interested in re-building the application using Scala, Spring or Hadoop - very keen to discuss this with links, tutorials to help develop a quick and secure api. It will be primarily be a "login system" with the user filling in forms - and having the data from these forms stored in a MySQL table and displayed as charts/tables/lists.

So I am keen to build the frontend using reactjs - and to have the Java application provide an API service.

-- Login service essentially -- forgot password, session handling, account changes - so a CRUD of sorts

-- Then the user will fill in set of forms -- and so a GETDATA of results specific to the logged in user

please advise, code samples, tutorials, links. I predict it would be easier/quicker and more secure to start a fresh Scala, Spring or Hadoop project and use query builders - to secure the db -- if a mysql or mongodb should be used and if it makes much of a difference in this case, creating a JSON api service, CRUD application for a login handling?

Hadoop is completely unsuitable for this task. It's a distributed storage / compute platform, similar to Google's MapReduce or Amazon's EMR -- it has nothing to do with web development, even for an API.

If you want to write a web application, you need a web application framework. Hadoop is not that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM