Chat Tutorial in NetBeans: Difference between revisions

From Arianne
Jump to navigation Jump to search
Content deleted Content added
imported>SimonSmall
The Chat Tutorial: added explanation link to Text Client
imported>SimonSmall
The Chat Tutorial steps: Added web deployment step
Line 46: Line 46:
* Create the files required for the [[Chat Tutorial in NetBeans/GUI Client|GUI Client]],
* Create the files required for the [[Chat Tutorial in NetBeans/GUI Client|GUI Client]],
* [[Chat Tutorial in NetBeans/Deploy GUI Client|Deploy GUI Client]] code, test it and play with it.
* [[Chat Tutorial in NetBeans/Deploy GUI Client|Deploy GUI Client]] code, test it and play with it.
* [[Chat Tutorial in NetBeans/Completion|Create a web deployment]] to complete the tutorial.


If this is now working as expected, it can be extended.
If this is now working as expected, it can be extended.

Revision as of 18:06, 5 February 2012

Introduction

NetBeans is a free, open-source Integrated Development Environment (IDE) for software developers that runs on Windows, Linux, Mac OS X and Solaris. Using an IDE for development, instead of the manual editing technique, provides an instant highlighting of syntax and other errors and the ability to run and debug the application within the IDE.

Many developers on Stendhal / Marauroa use Eclipse, but use NetBeans if you prefer; be aware that if you need help it may be limited.

These instructions assume that you will install the minimum required to use the Marauroa engine. Additional features and functions are covered in separate pages.

These instructions have been checked using Windows XP, Java SE Development Kit 7 update 2 and NetBeans 7.0.1 and may not be complete (January 2012). Please discuss in the Discussion pages.

The Chat Tutorial

Design

This tutorial will create a simple Chat utility based on the Marauroa engine. Users will be able to register, then login to the Chat Client. Text entered into the client is passed to the Chat Server and echoed to all users that are currently logged in. The development is done in stages, where each stage can be verified. The full functionality will not be complete until the completion of the last stage.

Requirements

Java

The Marauroa engine is written using Java. You will need to install the Java Development Kit (JDK) from [1].

NetBeans

NetBeans is downloaded from [2]. It can be extended by installing a large number of plugins; if you are not sure, just use the default installation.

Directory structures

It is usual to develop your code / game in one location (environment) and copy (deploy) the code to another location. The code would be tested, then copied (installed) to a third location where it can be used by the intended audience. This example might be considered trivial enough to skip some of this. More complexity will be covered later.

The following directory structure is one suggestion and is used in the instructions. Choose a different one if you wish.

You will need a location where you can save the files needed for development. The top level location is referred to as DEVPATH. Replace this with whatever you have chosen as that location. Do not create any sub-directories yet. You will copy files from the DEVPATH locations into deployment locations later.

You will need a location for the destination of your developed code. This is referred to as PLAYPATH. Replace this with whatever you have chosen as that location. Do not create any sub-directories yet.

The Chat Tutorial steps

The following steps are required to complete the Chat Tutorial.

If this is now working as expected, it can be extended.