使用字节码生成的框架是否会产生漏洞抽象?(Are frameworks using byte-code generation creating leaky abstractions?)
我的观点是,如果你不理解框架的抽象,你仍然可以反编译并理解它,因为你知道Java这样的语言。 但是,当字节码生成发生时,您必须了解甚至较低级别的JVM级别字节码。 我真的很害怕使用任何这样的框架,这很多。 大多数时候我认为字节码生成的原因是缺乏元编程等语言功能。 你同意吗? 你的意见和论点是什么? 你如何接管这些框架中抽象漏洞的问题?
My point is, if you don't understand the abstraction of a framework, you can still decompile it and understand it, because you know the language e.g. Java. However, when byte-code generation happens, you have to understand even a lower level - JVM level byte-codes. I am really affraid of using any of such frameworks, which are many. Most of the time I think the reason for byte-code generation is simply lack of language features such as metaprogramming. Do you agree? What is your opinion and argument? How do you take over the problem with leaky abstractions in those frameworks?
原文:https://stackoverflow.com/questions/2604737
最满意答案
问题中的代码现在按预期工作。 我错过了jquery lib声明,我在网上看到很多关于这个问题的问题,完全写了Javascript,但由于某些原因代码失败了。 如果有这样的人浏览这篇文章,修复程序是:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
在之前的HTML页面的底部
<script src="myScript.js"></script> </body> </html>
The code in the question now works as expected. I was missing the jquery lib declaration, I've seen many questions online relating to this problem, having perfectly written Javascript but the code for some reason fails. If any such people browse this post, the fix is:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
At the bottom of the HTML page before
<script src="myScript.js"></script> </body> </html>
相关问答
更多-
通过本地客户端程序获取服务器mysql数据库信息[2023-04-27]
ajax -
必须打开的文件的URL - 服务器端脚本的位置。 这可以是绝对URL,如(http://www.foo.com/bar.php)或相对URL(/bar.php)。 注意事项 - 此URL应与脚本位于同一域中。 您无法通过yahoo.com中运行的脚本在google.com中调用脚本。 这是在大多数浏览器中实施的安全措施,以防止XSS。 此致,西里尔 The URL of the file that must be opened - the location of the server side script ...
-
songURL中没有任何内容,因为当您的Ajax函数返回时,它将重定向到您刚刚发布到的同一页面。 它正在为该PHP文件创建一个新的HTTP请求,但没有数据发送给它。 删除控制台消息上的注释,您将看到正确的回显消息。 $.ajax({ type: "POST", url: "loadSketch.php", data: content, success: function (data, text) { alert("success"); console.log(data); }, error ...
-
PHP文件未收到JavaScript Ajax URL“post”数据(JavaScript Ajax URL 'post' data not received by PHP file)[2022-04-22]
那是因为你加倍了url字符串。 看一看: 你叫它 ajax("doit.php?preparedOutput=" + prepare); 你在open中使用的url是"doit.php" 所以你基本上打电话给http://whatever/doit/?doit.php?preparedOutput=" + prepare 。 改成: ajax("preparedOutput=" + prepare); That's because you doubled the url string. Take a l ... -
我只是想知道将表单数据通过ajax发布到PHP脚本的最佳方法是什么。 完全停止。 jQuery解决了这个特殊问题。 使用serialize或serializeArray继续进行更重要的事情。 我想问一下在安全性和性能方面最好的方法是什么。 你的方法都不是“最好”的方法。 它们都比简单地使用jQuery已经提供给你的东西更糟糕,并且它们在安全性和性能方面都是空的 。 安全性和性能与您发布的代码无关 ,这些概念完全在您尝试做的外部,在完全独立的层上实现。 安全在这里完全无关紧要。 您使用的是SSL并且安全,或者 ...
-
如何使用Javascript(Ajax)将表单数据发布到外部PHP文件?(How to POST form data to external PHP file using Javascript (Ajax)?)[2021-12-17]
问题中的代码现在按预期工作。 我错过了jquery lib声明,我在网上看到很多关于这个问题的问题,完全写了Javascript,但由于某些原因代码失败了。 如果有这样的人浏览这篇文章,修复程序是: 在之前的HTML页面的底部