0

I have created a Project in Java which helps generate HTML's from an Excel Sheet & a template file. I am trying to understand, if I want external users to use this facility from an external service, then what should be the thought process to choose an infrastructure for setting up this service. By infrastructure I mean that, which one of the below things should I do:

  • Setup a Server (Apache). Expose service as an API using POST request & Servlets.
  • Convert this into a Java Script Based library and use client side processing power to generate the HTML's from the browser. (This will save the hassle of maintaining my own server)

In short, just trying to understand if its right to choose a frontend technology for doing stuff which would primitively have been done in the background.

Thanks...

asked Aug 29, 2016 at 9:52
3

2 Answers 2

1

Maybe the java solution is easily adaptable for Vaadin, which under the hood does a java-to-javascript conversion.

However if you have a well-defined and working Java project, a conversion to JavaScript is feasible, and could be nicer. I would try to do the entire thing in the client and restrict the server communication, say using AJAX calls. That will be difficult enough.

JavaScript and HTML DOM is cumbersome, so develop using small prototypes, and then integrate things in an entire application. Version control is life-saving.

You did not give us any idea to the complexity of your application, or whether it lends itself to JavaScript.

Personally I would go for java hosting, to ascertain delivering in time without sudden problems. In a second stage a pure JavaScript solution can be considered. Pluses for JS (=arguments you then need): less server load, better responsiveness, better GUI.

answered Aug 29, 2016 at 12:00
1
  • Hey, thanks for the advice. Yes, I think translating it to javascript would not be a huge challenge. The application is pretty simple, I have shared it on github github.com/gavarava/convertify.IO . Asked this question as I wanted to avoid setting up a server model for hosting this as a service. Commented Sep 1, 2016 at 11:22
0

You don't have to maintain a server to create a web service - you could host it on a cloud service like Microsoft'S Azure or Amazon'S AWS. I don't know if it would be free or not.

You could also choose to make it a java library and share it via something like github.

answered Aug 31, 2016 at 18:30

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.