Development Tips and Tricks#
Please add your tips to the list!
Launching the client#During development, launching the client from within netbeans is much faster than going to localhost:8080 and downloading it from there. Just right click on the project wonderland-core and choose run or debug from the contextual menu.
Debugging client code#To debug client code with netbeans, you can set breakpoints in the code and then launch the client by right clicking on the project wonderland-core and choosing debug from the contextual menu.
No changes in core#If you make any changes in core, you should type ant run-server to make the system aware of the latest changes. Do this only if you've made changes in core. If you haven't touched core, it is much faster to simply run the jar file from the dist folder:
java -jar dist/Wonderland.jarThe point of this tip is that you do not have to compile core every time you want to start up the server, so if you haven't changed the core, do not user ant run-server.
Stepping over the login screen#You can use the file at wonderland/core/run-client.properties to set a username and some other login properties. This can gain you a lot of time during development.
Running multiple clients in one machine#The file at wonderland/core/run-client.properties can also be used to run multiple clients in your machine. This is an extract from the bottom of the file:
# Set the user directory for the client, useful for running multiple clients on one machine # An easy way to use this setting is to copy this file to create a number of # users and use ant -Drun-client.properties.file=<property file> run to launch # clients for each property file #wonderland.user.dir=/tmp/.wltest
Working outside of the world#
Deploying your module every time you need to test the most minimal functionality will drive you INSANE especially if you have a not so powerful machine, so working as much as you can outside the world is advised.
Mock as much as you can#Use testing techniques such as test doubles to avoid having to deploy your module
Separate your code#Writing most of your code in Wonderland independent classes will not only yield a cleaner design but will also allow you to instantiate your independent classes in a test harness to exercise them out of the world.
Create your Swing apps first#If you are creating a Swing app or a HUD, there is no need to create it within a Wonderland dependent class. Get your UI together first and then add it to your module (make sure you use compatible widgets. Check the Swing apps tutorial for advice.
Next tip here, please!#text of the tip
Add new attachment
Only authorized users are allowed to upload new attachments.