Redefiner >> |
|||||||||||||
Home | FAQ | Screen-Cast | RoadMap | Download | Contribute | Report A Bug | |
|||||||||||||
FAQ >> | |||||||||||||
What will this tool do? | |||||||||||||
This tool (currently in the experimentational phase), can be used to redefine java classes onto a running JVM, even if the the class has some structure changes, enabling E&C style of development. Why is such a feature required? You probably already know the answer, but if you don't imagine how you would work in java to develop a web application .. You finish coding a module.. now you need to test it.. You fire your browser .. You start from the login screen to reach your module.. while you are testing you module you find a bug.. You fix the bug.. but alas! for the JVM to take this new change that you made in your class file you need to restart you application.. So you restart your server.. Start from the login screen.. reach your module and the cycle goes on.. Wouldn't it be extremely gratifying if you could just refresh the browser screen to see your changes instead of having to restart your application server? | |||||||||||||
What is E&C? | |||||||||||||
E & C (abbreviated for Edit and Continue) means .. just what it says. With true E&C style development, you would never restart your application. When ever you make a change, to any artifact of your application. For eg., if java supported E & C completely, you configure and start your application server once. and then any subsequent changes you make while development, (like adding a new class, addinng methods to the class, adding fields, removing these, implementing new Interfaces ), you wouldn't restart your application. You would just make the changes in the respective files and save it(or probably compile it too) and magically your new changes would be picked up. | |||||||||||||
Why would E & C improve my productivity: | |||||||||||||
If you din't already know the answer here is what you will be saving with E & C: 1. The time taken to restart you JVM (a whole application server in most cases) 2. The time taken to get your thought stream back, because of this unavoidable interruption (you have probably switched to gmail window) 3. The time taken to go to your place of test, from the login screen, after the restart 4. The time taken by your application server/Framework to re-cache server objects after the restart. If you have noticed, in some application servers and frameworks, many parts of your application would be slow the first time you access them after the restart. Once you access it for the first time, later access would be very fast. This is even more true in java because, every class that is loaded is cached after it's first access. These are all the time you can avoid with E & C. |
|||||||||||||
But dosen't Java already support this? | |||||||||||||
Yes and No.. Starting from the Hotspot VM(1.4) all Sun JVMs support this as a part of JPDA. But the current implementation of this featue is exteremly limiting. You cannot add new methods, remove existing methods. Nor can you add or remove instance fields. This tool aims to provide such features on existing JVMs by classworking. | |||||||||||||
So, using this tool, i can have Full E&C development in javA? | |||||||||||||
Hmm.. that's what this project aims to provide. But E&C in a statically typed language like Java is an actively researched topic. As a first phase, I want to implement only adding and removing methods and fields and then once that's stabilized add more complex features like allowing to evolve the class heirarchy during runtime.. | |||||||||||||
What version of JVM does Redefiner currently support? | |||||||||||||
This project is currently only in the experimental phase and only works with Java 1.4. Though java 5 and it's new syntaxes can be supported with a little effort, I want to thoroughly analyze the feasibility of this project with 1.4 before proceeding. | |||||||||||||
Can my IDE support this tool? | |||||||||||||
Not as seamlessly as it does support JPDA. Once the new classes are redefined in the target JVM it would be debuggle by your IDE, But the redefining part itself has to go through a saperate API which your IDE wouln't be aware of. Iam hoping that this problem could be solved the special plugins built for specific IDEs. But since I don't have much experience building plugins I cannot gaurentee. If you have some experience builing plugins, pls mail me and let's discuss this. | |||||||||||||
Home | FAQ | Screen-Cast | RoadMap | Download | Contribute | Report A Bug | |