Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jordan Maxwell ADVANCED PROGRAMMING. DEFINITIONS PHP: A server side Programming language often used in websites. API: ( Application programming interface.

Similar presentations


Presentation on theme: "Jordan Maxwell ADVANCED PROGRAMMING. DEFINITIONS PHP: A server side Programming language often used in websites. API: ( Application programming interface."— Presentation transcript:

1 Jordan Maxwell ADVANCED PROGRAMMING

2 DEFINITIONS PHP: A server side Programming language often used in websites. API: ( Application programming interface ) is a chunk of code that a developer can hook into and use to communicate with the application.

3 ABOUT MY PROJECT My project has gone through several ideas and phases for a final product. Which ended with the Minecraft, Teamspeak, and web synchronization system. Originally the idea was to develop for a Mobile Ipad app. That was scrapped because I have never done anything with the language required for that. The Second idea was a java based game. This idea started out good but was scrapped because I was outside my range of experience. I later came back to this after everything else was done and nearly completed a game in Java The final idea was the web sync software. It was intended for use on a web site I was creating for a Minecraft Server. The idea was completed but needed to be re-written because it wasn’t very well planned out the first time.

4 ESSENTIAL QUESTIONS Essential questions help us narrow our research for our projects. These were my essential questions for the final idea I ended up using How do I integrate several pieces of software into a web interface? How do I allow PHP to communicate with java? How do I use the TeamSpeak API?

5 PROGRAMMING BASICS Computers don’t understand English. So they have there own languages that they can understand. Each language has its own benefits and disadvantages but all serve a practical purpose for some form of application. There are several types of Programming languages available. Some are for websites while others are for your phone or computer. There are also two sub types of languages: Server and Client. A server is something like a website or email. A client could be anything from your computer to your phone.

6 WEB LANGUAGES There are several Programming languages for using in websites. A few examples are PHP JavaScript Ruby on Rails Python But the core of all websites is HTML And CSS. Without them the page would just be blank. HTML is used to set the layout of the site. CSS is for creating the visual style of your website with it you can change for example how a button would look.

7 WEB TO EXTERNAL SOFTWARE COMMUNICATION What I intended to work on for this project needed to be able to cross communicate from PHP to other software on the same Linux machine. During the project I expanded my knowledge on PHP sockets which what was needed for most of the software. This is also the primary technique for communicating with a java application.

8 PHP SOCKET EXAMPLE This is part of the code I created that used sockets to communicate with software. In this case It gathers information from a Minecraft server if(!$socket = @stream_socket_client('tcp://'.$this->$host.':'.$this->$port, $errno, $errstr, $this- >$timeout)) { return false; } else { stream_set_timeout($socket, $this->$timeout); fwrite($socket, "\xfe"); $read = fread($socket, 2048); $read = str_replace("\x00", '', $read); $read = substr($read, 2); $data = explode("\xa7", $read); Creating a socket connection Read the information received from that connection

9 TEAMSPEAK TeamSpeak is a free to use voice communications software. I use it to help staff members talk to each other when collaborating on a project or for our users to simply talk with one another without typing. To do what I wanted for my project I needed to learn the abilities of the TeamSpeak API. I learned that almost all functionality can be achieved through the api such as The ability to check if a user is online and to pull there rank and change it remotely I also learned that I could get things like the server version so I could have a live check and notify the staff if the server needs to be updated. I also learned that the API is not as easy to use as I had hoped

10 APPLICATION PROGRAMMING INTERFACE I used several APIs throughout this project. APIs are a common thing in everyday software development and they are present in just about everything you do on a computer. Some examples of every day API usage are A Facebook login on a mobile game or anything that uses Facebook Google chrome uses APIs for all its web store apps Things that use your Google drive. These are only a few of the many things that use APIS.

11 TEAMSPEAK APIEXAMPLE I used the API in this example to allow the website to change the users rank on TeamSpeak.


Download ppt "Jordan Maxwell ADVANCED PROGRAMMING. DEFINITIONS PHP: A server side Programming language often used in websites. API: ( Application programming interface."

Similar presentations


Ads by Google