
A look at the application you will have at the end of the course and a chance to see it in action.
A look at what exactly what the Trivial File Transfer Process is so that we know what we are trying to build.
How information is exchanged between the server and the client.
A look at how to request a conversation from a TFTP server.
How TFTP manages the transfer of the file data. The video looks at the roles of the client and the server when sending or receiving information from the client. The types of message that are supported by TFTP as well as how to structure the packets of data ready for transmission.
In the previous section we learnt about what TFTP is and how it works. With this understanding we now look at what information we will need to provide in order to communicate with a server. From this we can sketch out what information we need to collect using our application interface. Once we understand this we are able to sketch out how we want our application to look.
Now we know what we want our application to look like, we need to take a look at what else our application needs and how we are going to link all these bits together. The video covers the structure of JavaFX as well as the class structure for the various components of the application. The application makes use of Model-View-Control (MVC) approach as well as a custom message event which is fired from the TFTP engine. All of these classes will be hand build as part of the course so this video introduces the student to the function of each class and how they relate to one another.
This video covers the software and tools required to complete the coding side of the course. The student is shown where to find the software and how to install. There is some configuration of Eclipse so that it can locate SceneBuilder which is explained. Also, Eclipse requires either a plugin for JavaFX or a version of Eclipse with JavaFX already installed. Both of these options are covered, allowing the Student to adopt the approach that best suits their situation.
Creating a JavaFX project in Eclipse ready for building the application.
A review of what our application user interface needs to have and do ready to actually start building.
Creating the FXML document within Eclipse ready to use with SceneBuilder.
Open SceneBuilder from the FXML file in Eclipse. The video walks through SceneBuilder so you can find your way around. Finally we use SceneBuilder to build our application interface to match our mock up.
Creating the main entry point for our application and running the application to see our user interface.
Adding a controller class for our user interface. The controller is used to set the options for the drop down lists, set tool-tips for fields, set a default value for the drop down lists and place the cursor in the top field ready to capture input.
Linking our buttons on our user interface with to our controller class. Getting the 'Clear' button to clear the values in the fields and the 'Go' button to simply print a console message until we have built the engine.
Checking that the required fields are completed correctly otherwise highlight the issue to the user and allow them to correct the issue before proceeding with the requested action.
Creating the Message Event class which we will use to notify our client of events generated from our TFTP engine. Also creating the message listener interface which our user interface controller class will need to implement.
Explains how we will manage the conversation with the server. Starting with the initial call to the engine and going all the way through to completion of the transfer including how the process will tidy up after itself so we avoid leaving open file connections or network socket connections. Creates the engine class which we will go on to extend to manage all the server conversations.
Adding the generic features to allow the engine class to fire off events and notify any objects which have listened as a listener.
Creating the entry point method for starting a file transfer with a TFTP server. Receives the field values from the user interface, sorting them in class properties and then calls the next method in the chain.
Creates a temporary file to use with the file transfer.
Explains how we are going to initiate a call to the TFTP server informing the server of the ip number and port to use when sending messages back to us.
Builds up the Initiate method which is responsible for making the initial call to the TFTP server passing it the client ip number and port which the server should use when responding. Covers building the byte array containing the request,wrapping the byte array in a Datagram packet and sending the packet to the server using the UDP socket.
This video looks at how we will manage the conversation with the TFTP server when we are sending a file to the server. This looks at the key actions we take which includes the code for the method which manages the transfer. Here we cover the exchange of information between the client and the server when send a file.
We introduce a new class which allows us to break down a data packet of information into its individual parts and easily access the component parts. This is used by other methods when examining the data packet send from the server.
We introduce yet one more class the allows us to easily convert end of line markers for text files between NETASCII and those ine terminators used by Windows, Mac and Linux.
The methods covered in this video are part of the engine class. They deal with accessing the source file we wish to send, handle the conversion between the text formats supported and make use of the DataParser class. Creates a temporary file with the data we wish to send, converted if required.
In this video we read the data from the server and providing there is no error, we build the data we wish to send to the server. As this section is all about send a file to the server we are building a data packet and receiving acknowledgement messages. This video pulls together the all the previous parts of send a file to the server.
This video looks at how we will manage the conversation with the TFTP server when receiving a file from the server. This looks at the key actions we take which includes the code for the method which manages the transfer. Here we cover the exchange of information between the client and the server when receiving a file. This method makes use of many of the components used in sending a file to the server as well as using a similar approach so it will be familiar to the student.
Earlier on we created a method to build data packets to send to the server. In this video we look at how we build acknowledgement packets to let the server know we have received the data packet sent to us. This completes the code for our engine class to send and receive files with a TFTP server.
In order to test our application we need a TFTP server to call. In this video we will install a freely available TFTP server that we can then use to test our TFTP client.
Here in the last video we use our TFTP client to download an ascii file from the server and upload a binary file to the server. We can see from the file locations used by the server and client that the files have been transferred as well as the commentary within the server and eclipse consoles, not to mention our status field in our application.
I wanted to do a tutorial on JavaFX. The idea, as always with me, was to show how to build a real application in JavaFX. I wanted it to be a real solution not a series of examples of what you can do. I wanted to build something that could be used, something that served a purpose.
So, I searched around and found a specification document. This specification describes how to implement what is known as a Trivial File Transfer Protocol (TFTP). This is described as a simplified version of the File Transfer Protocol specification, used to move files between machines, so is ideal to use as an example. There are two parts to this, a client and a server so, for our JavaFX tutorial we will build a TFTP client. There are also TFTP servers freely available so we have a server that we can test our client against.
How the course is structured:
The course is split into 5 sections from setting up through to packaging it all up. Along the way we look at designing and building the front end, pulling together the logic for the backend and linking the parts together.
Delivery of course content is primarily through the use of video sessions demonstrating a specific point. As you go through the sections you can run the application and see how it develops and builds on the previous sections.
At the end of the course you will be able to take the techniques covered in the course and apply these to your own development projects