JRebel is a tool for Java that can automatically swap in new versions of classes to a running JVM. Not only can method implementations be changed, it's also possible to change their signatures, to add new or remove existing methods, and also add/remove fields. About the only thing that cannot do is allow the class hierarchy to be altered on-the-fly. It's a real boon for web app development in particular.
JRebel是一款Java工具,它可以将新版本的类自动切换到正在运行的JVM中。不仅可以更改方法实现,还可以更改它们的签名、添加或删除现有方法,以及添加/删除字段。惟一不能做的事情是允许动态修改类层次结构。这对web应用程序开发尤其有利。
Could I find anything similar for .NET?
我能在。net上找到类似的东西吗?
6 个解决方案
#1
2
There is no such thing in the .net world.. not so powerful.. there are some thing like Edit and Continue but this is like "Hot replace" in Java and nothing more. The problem is in .net you have the whole model of .dll(s) with their versions and dependencies between dlls pointing to specific version so it is not possible to replace dll without replacing all.
在。net世界中没有这样的东西。不那么强大的. .有一些东西像编辑和继续,但这就像Java中的“热替换”,仅此而已。问题是在。net中,你有整个。dll的模型,它们的版本和依赖关系指向特定的版本,所以如果不替换所有的dll,就不可能替换dll。
An workaround will be something like compiling the classes, adding tons of assembly redirects, somehow unloads and loads the old dll but it is hell of a hard.
一个解决方案就像编译类,添加大量的程序集重定向,以某种方式卸载和加载旧的dll,但是这很难。
Keep in mind that in java after the "module" JSR is implemented maybe in java 9 we will not have JRebel as well.
请记住,在java中,在“模块”JSR实现之后,也许在java 9中我们也不会有JRebel。
#2
2
There is not such thing for .Net yet. In the meantime, you can try NCrunch (http://www.ncrunch.net/), which is running your tests in the background and the moment you break or make a test pass it is reported in the test results, so you don't need to wait for rebuild and test execution as it is happening in real time.
对于。net还没有这样的东西。同时,你可以试试NCrunch(http://www.ncrunch.net/),这是在后台运行您的测试,当你休息或者做测试通过报告的测试结果,所以你不需要等待重建和测试执行是实时发生的。
#3
0
Well there is a build in feature since VS 2005 that is called "Edit and Continue". You might take a look... http://msdn.microsoft.com/en-us/library/ms379578(VS.80).aspx.
从VS 2005年开始,就有了一个内置功能,叫做“编辑和继续”。你可以看看……http://msdn.microsoft.com/en-us/library/ms379578(VS.80). aspx。
I think it is not that sofisticated as JRebel.
我认为它不像杰里弗那样死板。
#4
0
Reflection is built into .NET and should be able to do most of those things (writing/altering things at runtime).
反射是内建在。net中的,应该能够完成其中的大部分工作(在运行时编写/修改内容)。
It's not going to be as polished and task ready as JRebel, but then again the two frameworks have different structures to begin with. It may not be realistic to think of them as equivalents.
它不会像JRebel那样完美地完成任务,但是这两个框架首先会有不同的结构。将它们视为等价物可能是不现实的。
IMHO, runtime substitution as a standard practice sounds like a good way to corrupt the runtime to me. If you need this hot swapping functionality, perhaps you are better off choosing an interpreted language instead of a compiled one.
在我看来,运行时替代作为一种标准实践听起来是破坏运行时的好方法。如果您需要这个热交换功能,那么最好选择解释语言而不是编译语言。
Also, session is usually something to avoid. If you have to use it for ASP.NET, you can use a few different out-of-the box providers instead of the in process one, or even use profiles instead. MSDN page for state manangement
而且,会话通常是要避免的。如果你必须使用它作为ASP。NET中,您可以使用一些开箱即用的提供程序而不是进程一,甚至可以使用概要文件。用于状态管理的MSDN页面
#5
0
How about
如何
Re-JIT
Re-JIT
https://channel9.msdn.com/Shows/Going+Deep/CLR-45-David-Broman-Inside-Re-JIT
https://channel9.msdn.com/Shows/Going +深/ CLR-45-David-Broman-Inside-Re-JIT
Oh well that was not it but maybe useful anyways:
哦,好吧,那不是它,但也许无论如何有用:
Resilient NGen with Targeted Patching
有针对性的修补具有弹性的NGen
see https://channel9.msdn.com/Blogs/Charles/Surupa-Biswas-CLR-4-Resilient-NGen-and-Targeted-Patching
参见https://channel9.msdn.com/Blogs/Charles/Surupa-Biswas-CLR-4-Resilient-NGen-and-Targeted-Patching
#6
-1
There's Rebel.NET which is similar but this requires rebuilding the binaries and can't change code during execution.
有反抗。NET类似,但这需要重新构建二进制文件,并且不能在执行期间更改代码。
#1
2
There is no such thing in the .net world.. not so powerful.. there are some thing like Edit and Continue but this is like "Hot replace" in Java and nothing more. The problem is in .net you have the whole model of .dll(s) with their versions and dependencies between dlls pointing to specific version so it is not possible to replace dll without replacing all.
在。net世界中没有这样的东西。不那么强大的. .有一些东西像编辑和继续,但这就像Java中的“热替换”,仅此而已。问题是在。net中,你有整个。dll的模型,它们的版本和依赖关系指向特定的版本,所以如果不替换所有的dll,就不可能替换dll。
An workaround will be something like compiling the classes, adding tons of assembly redirects, somehow unloads and loads the old dll but it is hell of a hard.
一个解决方案就像编译类,添加大量的程序集重定向,以某种方式卸载和加载旧的dll,但是这很难。
Keep in mind that in java after the "module" JSR is implemented maybe in java 9 we will not have JRebel as well.
请记住,在java中,在“模块”JSR实现之后,也许在java 9中我们也不会有JRebel。
#2
2
There is not such thing for .Net yet. In the meantime, you can try NCrunch (http://www.ncrunch.net/), which is running your tests in the background and the moment you break or make a test pass it is reported in the test results, so you don't need to wait for rebuild and test execution as it is happening in real time.
对于。net还没有这样的东西。同时,你可以试试NCrunch(http://www.ncrunch.net/),这是在后台运行您的测试,当你休息或者做测试通过报告的测试结果,所以你不需要等待重建和测试执行是实时发生的。
#3
0
Well there is a build in feature since VS 2005 that is called "Edit and Continue". You might take a look... http://msdn.microsoft.com/en-us/library/ms379578(VS.80).aspx.
从VS 2005年开始,就有了一个内置功能,叫做“编辑和继续”。你可以看看……http://msdn.microsoft.com/en-us/library/ms379578(VS.80). aspx。
I think it is not that sofisticated as JRebel.
我认为它不像杰里弗那样死板。
#4
0
Reflection is built into .NET and should be able to do most of those things (writing/altering things at runtime).
反射是内建在。net中的,应该能够完成其中的大部分工作(在运行时编写/修改内容)。
It's not going to be as polished and task ready as JRebel, but then again the two frameworks have different structures to begin with. It may not be realistic to think of them as equivalents.
它不会像JRebel那样完美地完成任务,但是这两个框架首先会有不同的结构。将它们视为等价物可能是不现实的。
IMHO, runtime substitution as a standard practice sounds like a good way to corrupt the runtime to me. If you need this hot swapping functionality, perhaps you are better off choosing an interpreted language instead of a compiled one.
在我看来,运行时替代作为一种标准实践听起来是破坏运行时的好方法。如果您需要这个热交换功能,那么最好选择解释语言而不是编译语言。
Also, session is usually something to avoid. If you have to use it for ASP.NET, you can use a few different out-of-the box providers instead of the in process one, or even use profiles instead. MSDN page for state manangement
而且,会话通常是要避免的。如果你必须使用它作为ASP。NET中,您可以使用一些开箱即用的提供程序而不是进程一,甚至可以使用概要文件。用于状态管理的MSDN页面
#5
0
How about
如何
Re-JIT
Re-JIT
https://channel9.msdn.com/Shows/Going+Deep/CLR-45-David-Broman-Inside-Re-JIT
https://channel9.msdn.com/Shows/Going +深/ CLR-45-David-Broman-Inside-Re-JIT
Oh well that was not it but maybe useful anyways:
哦,好吧,那不是它,但也许无论如何有用:
Resilient NGen with Targeted Patching
有针对性的修补具有弹性的NGen
see https://channel9.msdn.com/Blogs/Charles/Surupa-Biswas-CLR-4-Resilient-NGen-and-Targeted-Patching
参见https://channel9.msdn.com/Blogs/Charles/Surupa-Biswas-CLR-4-Resilient-NGen-and-Targeted-Patching
#6
-1
There's Rebel.NET which is similar but this requires rebuilding the binaries and can't change code during execution.
有反抗。NET类似,但这需要重新构建二进制文件,并且不能在执行期间更改代码。