We are planning to shift our web application from php framework to angular.js, but I am worried if my code will be stolen? because javascript frameworks source are open to everyone, does it makes sense to worry about it? Are there any popular applications that use javascript frameworks?
Asked
Active
Viewed 3,344 times
-3
-
1possible duplicate -- http://stackoverflow.com/questions/194397/how-can-i-obfuscateprotect-javascript – StateLess Jul 07 '14 at 09:34
-
Not really, the obfuscate dont really protect enough, btw my question is not about how I should save my code, I know I cant. Its about will someone steal my code and be a competitor? I just wanted to increase my confidence by knowing few popular applciations that use js frameworks. – Kapil Jul 07 '14 at 10:06
-
i'd like to see a person who could read obfuscated code and could support it in future. – Evgeniy Jul 07 '14 at 10:24
-
Maybe there can de-obfuscated techniques, you know you can pretify a code and then its only about naming the variables and functions properly – Kapil Jul 07 '14 at 10:41
-
2Yeap) try to clarify what this one of thousands functions do, no comments, cool name, like P(a,d,q,w,e){...} . Just imagine how many time and how much money you will loose on this activity. About what competition you are talking) I'm really doubt wrote something so special than anyone will stare in you uglified code trying to copy. – Evgeniy Jul 07 '14 at 10:51
2 Answers
5
- For protecting your javascript code you can use UglifyJS https://github.com/mishoo/UglifyJS
- For protecting your request to the API you can use server side authentications
- If you want to build a one-page application you must use some JS framework, more about frameworks you can see http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks
In any case, you can't 100% protect your code, but you can make it 99% unreadable, for example, look at this resource http://javascriptobfuscator.com/.

tofro
- 5,640
- 14
- 31

Narek Mamikonyan
- 4,601
- 2
- 24
- 30
-
thanks, but my question is not about how I should save my code. Its about will someone steal my code and be a competitor? I just wanted to increase my confidence by knowing few popular applciations that use js frameworks. – Kapil Jul 07 '14 at 10:09
-
2No, in any case you cant in 100% protect you code , but you can make it 99% not readable , for example look at this resource http://www.javascriptobfuscator.com/ – Narek Mamikonyan Jul 07 '14 at 10:53
1
You can't
AngularJS is client-side frameworks and PHP is server side language, so no you can't completely migrate your application to AngularJS.
Probably what you want is Node.js

Shiva
- 6,677
- 4
- 36
- 61
-
-
@kapil: then do learn how write the question properly and explain how is your web application architectured , apart from that I am completly correct that you just can't move directly from PHP to AngularJS – Shiva Jul 07 '14 at 09:59
-
Javascript frameworks are dependant on REST API which provide the server side functionality. Thats the main purpose of them, all the php framework apps can be migrated to javascript frameworks. – Kapil Jul 07 '14 at 10:03
-
@Kapil: LOL, Representational state transfer (REST) is a software system for distributing the data to different kind of applications.So you can use REST on top of PHP(or any other server side language) and provide data to an application whose front end is designed in Angular(Or Ember or Jquery or even plain HTML). But as per the language of your question `We are planning to shift our web application from php framework to angular.js`, you have really missed the point there – Shiva Jul 07 '14 at 10:11