01.02.2013 Views

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

merging changes<br />

And Bob does the same...<br />

Bob finished up the tasks related to his story and ran a quick test on his end. His task<br />

is working, so he copies his code up to the server. In order to do the final build he<br />

merges his code in with ours, gets everything to compile, and retests sending a picture.<br />

Everything looks good. Tomorrow’s demo is going to rock...<br />

Title:<br />

Completed<br />

Task 1<br />

Implement sender<br />

side Poke button and<br />

sequence.<br />

1<br />

Send a Poke to<br />

other users<br />

Task 2<br />

Implement server side<br />

reception and playing<br />

<strong>of</strong> alert message.<br />

184 Chapter 6<br />

1.5<br />

Once the tasks<br />

are finished move<br />

the stories over<br />

to Completed.<br />

Title:<br />

Task 3<br />

Implement image<br />

selection dialog.<br />

5<br />

Send a picture to<br />

other users<br />

Task 4<br />

Implement sender side<br />

send picture button<br />

and loading code.<br />

1<br />

Task 5<br />

Implement receiver<br />

side image reception<br />

and displaying code.<br />

Q: I’m not familiar with networking code. What’s<br />

happening in that code we just added?<br />

A: On the sending side we represent the sequence settings<br />

as an array <strong>of</strong> checkboxes. We don’t really care what they’re set<br />

to, since we won’t use them on the receiving side. We still need<br />

to send something, though, so the existing code works. We use<br />

Java’s object serialization to stream the array <strong>of</strong> checkboxes<br />

and our secret message that triggers the alert on the other side.<br />

On the receiving side we pull <strong>of</strong>f the secret sequence and the<br />

array <strong>of</strong> checkboxes. All <strong>of</strong> the serialization and deserialization<br />

is handled by Java.<br />

2.5<br />

Bob’s happy with the code so he copies it<br />

up to the demo server. After the build is<br />

done, things are ready for tomorrow.<br />

Download at WoweBook.Com<br />

Here’s Bob’s version <strong>of</strong><br />

BeatBox—the SendPicture<br />

button is implemented.<br />

Q: Why did we make the bin directory before we<br />

compiled the code?<br />

A: We’ll talk more about this in the next chapter, but in<br />

general it’s a good idea to keep your compiled code separate<br />

from the source. It makes it a lot simpler to clean up and rebuild<br />

when you make changes. There’s nothing special about the<br />

name “bin”; it’s just convention and is short for “binaries”—i.e.,<br />

compiled code.<br />

Q: Wait, did Bob just merge code on the demo server?<br />

A: Yup...

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!