Yes. And there are drawbacks too, as in everything.
In security issue no, it may be slightly more difficult (but in all cases it is possible to access the source code, only it will not be a code as readable, but still extraordinarily easy for those who know break security.
Just to be clear, the supposed protection is minimal, it’s not something like making a password much harder to break, for those who know how to do it does not even make a difference the way it is "protected", it will lose very few minutes (who knows seconds) It’ll take days to make the most of what you’ve accomplished. And it is possible to obfuscate code on scripts in such a way that it may be as difficult as other means of "protecting" the source (actually it might be more difficult because you can do a personalized way that would make it a little more difficult to do it since she would have to learn how you overshadowed it and not a standardized form.
This technique has a name and can even be used, but can not be the only security, it is extremely weak. Important to read this question about protecting source code.
If you’re worried about someone stealing your code, of course it’s easier on scripts, I mean, everyone in JS is like this and, contrary to what people think, it doesn’t change anything important for her (people have illusions about code theft, this will only happen if the code is very good, which is almost never, and will only be done by someone who won’t even know how to use it properly). Of course if done wrong the fact that everything is closed will help a little bit, if you do it right makes no difference.
If the concern is that you have passwords, tokens or other data that cannot be disclosed, the problem is already there, you cannot have that information in your code. Yeah, a lot of people do it because they don’t care about security, but it’s wrong.
If the language of script is used to make script None of that matters because it’s something that doesn’t produce anything that relevant or has nothing that is secret. If it’s used to make applications there’s so much wrong with it that this is the least of the problems.
Let’s differentiate the languages of script. See the question Using client validation is sufficient?. It’s not just about validation, everything that’s running on one browser cannot be trusted, even if it does not have a JS code. Actually even if it can only be accessed externally and does not have an HTML. So if you put some information in JS that can be leveraged to do something wrong, you already have something extremely insecure. Same goes, just to quote an example, you have an ERP on someone’s desktop full of code .py
. You having PHP code may not be such a big problem. If someone breaks in or naturally accesses your server it will be a problem if they want to get information there, but without this entry there is no big problem. Of course it’s one more exposure.
In terms of privacy I think it has no advantage, nor do I know if you used that word properly (it may be that you used because you put passwords in the code, but this is not about privacy, it seems an unrelated subject. And the other terms used don’t seem to have anything to do with.
Maintenance does not influence, although some people may find it easier to do tricks in languages of script open (there are languages of scripts which are or may be encapsulated in any container And there’s this so-called "protection"). Then you decide whether you can do direct gambiarras in production helps or disrupts maintenance. I have a very clear position, but some people may find that a minimum productivity gain by not having to compile is important (in general the person ignores how much that had to be thought, tested and go through a good evaluation that took much more time and that this gain of not needing to compile is minimal, only provokes perception that was faster).
Have it all in one container, especially if it can be run by OS directly, it makes your application more reliable (not safe) after all it does not have a lot of file that can be lost or manipulated accidentally. There are other advantages that usually this type of language possesses, but it seems that it is not the focus of the question.
a bundled code (with Metadata) would not be a guarantee that a specific version of the source is deployed in production, while with script such as php and js this in practice becomes almost impossible to guarantee?
– danilo
That doesn’t guarantee it, but it decreases the chance of changing the version. who does this needs to have the source code, change, compile and put into production, much more difficult than someone access the code on the server, open in a text editor any and change, but still is not 100% guaranteed. by the way, the access to the server must be well controlled, independent of the code I was there, but yes, an open source script is easier to change because the source is there.
– Ricardo Pontual