-1

I am wondering if it is reasonable to write closed source, paid web apps in Javascript (JS MVC Frameworks like AngularJS, Backbone, Knockout, ...)? I'm concerned because in this type of frameworks you use typically a REST backend for CRUD operations and the majority of business and application logic happens in Javascript which can be looked up by anyone using my app. He can see how i do things.

When I use for example PHP or Java (Wicket) most of the logic is happening on the server and so a lot less of my source code is exposed. This seems to me a lot safer if I want to have an edge over my competitors, so potentially I earn more money.

So is it reasonable to use JavaScript MVC Frameworks for paid applications? Does it depend on something and if yes on what?

closed as primarily opinion-based by user40980, user22815, durron597, Kilian Foth, GlenH7 Oct 7 '15 at 20:41

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Just minimize. Barring some spectacular algorithm that performs miracles, nobody likes anybody else's code enough to bother reverse engineering minimized code. – Erik Reppen Dec 5 '13 at 8:32
6

There is at least one major error in your question: In an REST backend the business logic still is on the server. It has to and having business logic in the browser would be pure madness.

From there we can go on and see that the most complex part of any serious web app rests on the server anyway. The browser can only take the View part of the MVC, maybe a few elements from Controllers. Main Controller functionality and especially Model are just to security relevant.

Beyond that: What do you want to write as web apps? If I want to do something smart, I don't look at my competitors, I use Google and StackExchange to find that it was done before a hundred times or at least something similar. There are libraries for mostly everything. The times when keeping your code a trade secret are gone, at least when we are talking about the user interface.

0

If you are only using REST as your entire backend to communicate with the database, that maybe your problem. Using EJB and JPA, the business logic is abstracted away from the user, and handled by the server and its database.

If your application logic is happening in your java code, well then I would suggest that it is not clean code. A servers job is to respond to the questions asked by the client. If the business application logic happens in javascript, then the client is essentially answering their own questions. Essentially, your questions makes no sense.

Not the answer you're looking for? Browse other questions tagged or ask your own question.