What are REST APIs?

Something I’ve done before:

I created a Java Application using Swing to read and write XML data into the program.

Things I’ve learned recently:

  • What is an API?
  • What is REST? RESTful APIs?
  • SOAP v. REST?
  • What is Maven?
  • What is a Servlet?
  • What is OAuth?
  • What is JSP?
  • What is Polymer?
  • How to write a Java Servlet on Tomcat?
  • How to use Maven?
  • Discoveries
    • I can’t host Java applications on my website.
    • Java is not efficient for small web projects.
    • Java is good for multi-threading.
    • Angular 2.0 is very different from Angular 1.0.
    • When I write documentations, screenshots are very important.
    • There are two ways to call Javascript properties
    • I need to break things more to know that they actually work.
    • Always have a backup
    • There’s something called Angular Material

I guess I’m learning a lot more than I thought!

  • What is an API?
    • API stands for Application Programming Interface. It is used for different software applications to communicate with each other.
  • What is REST? RESTful APIs?
    • REST  stands for Representational State Transfer. REST is an architectural style, which means you can break it. RESTful APIs use HTTP request and response to make calls. I learned that most of the information is from HTTP header (in the URL).
    • Postman and curl are two ways that you can easily make API calls.
    • There are “resources” (objects) and request “methods” (verb)
    • There are four main HTTP methods:
      1. GET – When you need to read a resource
      2. POST – Create a resource
      3. PUT – Update a resource
      4. DELETE – delete a resource

Sometimes I get a little confused between POST and PUT because I have seen people use PUT to add a resource, but essentially updating a list.

  • SOAP v. REST?
    • SOAP is heavier because of the way they use XML. It is a much more strict protocol. REST can be broken, SOAP cannot. In REST, responses can come in various formats (HTML, CSS, JSON, XML). According to interwebs, SOAP is less often used for APIs nowadays.
  • What is Maven?
    • Maven is used to import jars into a java project. Instead of downloading and moving jars around, you can take jars deployed in maven or in the cloud and include them as dependencies in your Java web project.
  • What is a Servlet?
    • A servlet in Java is a class that takes requests and returns a response. From my tutorials I have extended the
  • What is OAuth?
    • OAuth is an authentication that allows access through a third-party site. A typical application is commenting on a website with your Facebook account. The website will not have access to your facebook credentials.
  • What is JSP?
    • JSPs are script files written in Java. It stands for JavaServer Pages. It is used for Java front-end development. I can write HTML in JSPs.
  • What is Polymer?
    • Developed by Google, it allows users to write in HTML and CSS in place of libraries. Instead of a bunch of div tags, the tags “have meaning again.” It is based on the web component idea, very similar to Angular JS.
  • How to write a Java Servlet on Tomcat?
    • A Java Servlet on Tomcat
  • How to use Maven?
    • The most important file is the pom.xml file in Maven. In the pom.xml file, you will be able to list the dependencies and plugins that you would like to import. POM stands for Project Object Model.
  • Discoveries
    • I can’t host Java applications on my website.
    • Java is not efficient for small web projects.
    • Java is good for multi-threading.
    • Angular 2.0 is very different from Angular 1.0.
    • When I write documentations, screenshots are very important.
    • There are two ways to call Javascript properties
    • I need to break things more to know that they actually work.
    • Always have a backup
    • There’s something called Angular Material
    • Super Useful Eclipse shortcut of the week:  Place your cursor on a variable (that needs it’s class imported), then click Ctrl + Shift + O

Sorry for the mess, but I had to get it down somehow. Now that I’m learning more about writing cool programs, I also need to work on my writing. This is a process and it will take time.

Something I’ve done in the past: I wrote a mock scheduling patient app that updates XML code everytime I run it. I used Java Swing to create a Graphical User Interface (GUI) for it.

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s