Marauroa Chat Tutorial/Text Client: Difference between revisions

Content deleted Content added
imported>Hendrik Brummermann
imported>Hendrik Brummermann
m header and footer
Line 1:
{{Navigation for Marauroa Top|Using}}
{{Navigation for Marauroa Users}}
{{Marauroa Tutorial}}
 
 
== Text client ==
 
=== Code ===
In order to create a client using Marauroa frameword you should extend the marauroa.client.ClientFramework class with your logic. Here is the source code for the chat client
<source lang="java">
Line 209 ⟶ 213:
 
A heart-beat loop is started afterwards. At each step we invoke loop(0), where floating point parameter means nothing at this point. Once in 100 steps we send a message to server. There is no interactive way to control messages, still it is amazing to see chat created by your own client.
 
=== Deployment ===
Running a client is very simple, all you need is a bunch of jars (database is not required on the client side) and compiled client code. I use following line for compilation
<pre>
Line 221 ⟶ 226:
 
Don't forget to replace login and password with the actual ones. To create a new account just add a third command-line parameter (that should be an email, but no validation at the moment).
 
=== Output ===
Ideally you should see something like
<pre>
Line 235 ⟶ 241:
 
Note the message about log4j.properties: you can create that file in order to configure the Log4J usage inside Marauroa framework.
 
== TextNext clientSteps ==
 
In the next section of this tutorial, we will write a '''[[Marauroa Tutorial/Swing Client|Swing client]]''' with a graphical user interface.
 
 
[[Category:Marauroa]]
{{#breadcrumbs: [[Marauroa]] | [[Navigation for Marauroa Users|Using]] | [[Marauroa Tutorial|Tutorial]] | [[Marauroa Tutorial/Text Client|Text Client]]}}