In the examples I have shown in class, I have consistently shown CompUnit components running in "raw form", that is, just being run within a Java application. I now have the framework in place to enable all component groups to begin to envision how their own components are to be placed into the architecture.
Each group should consider doing all coding on your group project within a new package that you add to the Development project. Doing so will enable you to immediately begin working on the coding. If you choose to put your code in a separate project, make sure you set up the Build Path and other dependencies exactly as I have done.
Note that when I make any changes you can immediately retrieve them by simply selecting Team -> Update on the Development project, but ONLY if you do your work in a separate package within the project. Don't make changes to the existing classes that I am writing -- make changes in your own project area.
Within the Development project you will find an application folder. Inside there you will see two files:
Now you should launch FoundationSWT (help? see these instructions). If you have properly updated your CompUnitEnvironment project you will see two windows appear:
Somewhere in the explored tree in the panel on the left you should find the two CA files that you have just copied.
Select "KS_2008_server.ca" and click on Execute. You should immediately begin to see a large number of messages on the Eclipse console (these are debugging messages) and you should see in the Downloader window a bunch of messages, together with progress as reported in the progress task bar.
Once the application has properly launched, you will see "ks_server" under the "Active Applications" and the final line on the console output window should say something like:
Accepting calls on 7878
This confirms you are running the stripped-down version of the KombatSolitaire server on your computer.
Select "KS_2008_client.ca" and click on Execute. Once again, you will see a large number of messages on the Eclipse console and in the Downloader window. If you had previously closed the downloader window, it will pop back up again.
Success will happen when you see the following window:
Click on "Connect" to connect. Note you can type at the bottom chat message commands that are sent to the server before returning to be output into the lobby output area.
You can click on the "Press Me" in the User Manager GUI to see the message "heineman: HELLO FROM USER MANAGER"
To show the direction we are now going, type the word "idiot" inside the text input area in the lobby where you had been chatting. Note that this will launch the Idiot solitaire plugin. Let's explain how this happened. To do so, we describe the system architecture.
TBA
The best way to learn about the individual components is to run FoundationSWT in the debugger.
Once you have been able to run the example above, close down foundation. The simplest way to do this is to simply terminated the FoundationSWT application as it runs. To do this, look near the console window at the bottom and see the red square? Press it to terminate the running process (which should be FoundationSWT).
Instead of saying "Run -> Run as..." and selecting FoundationSWT, this time choose "Debug -> Debug as..." and select FoundationSWT.
We want to track the behavior of the system when the user types the word "idiot" and presses return in the main lobby.