Final delivery of the 4th course: 'Java: consumir API, escribir archivos y manejar errores', from module (a.k.a. 'formación' in spanish) 'Java Orientado a Objetos G9 - ONE', of Alura LATAM. Part of ORACLE Next Education (ONE) education program, in LATAM.
This final delivery consists of 2 projects, each one in it's own folder (using folders structure of Maven's java build automation tool):
- Course exercise; in folder:
course_java_iv. - Course challenge of a shopping app; in folder:
course_java_iv_challenge_app_api_star_wars.
Note
This README is mainly written in english (en), but it might have some sections in spanish (sp), since course content is in spanish.
The course covered topics such as:
- Use of open APIs, such as:
- OMDb API, an Open RESTful web service to obtain movie information: 'https://www.omdbapi.com'.
- SWAPI, an Open API for Star Wars lore and information about it's universe: 'https://swapi.dev/'.
- Connection with APIs (Application Programming Interface) and practicing how to connect to them.
- Use of HTTP protocol.
- Understanding responses in JSON format.
- Getting to know tools for developing and testing APIs, such as:
- Postman: 'https://www.postman.com'.
- Insomnia: 'https://insomnia.rest'.
- Apidog: 'https://apidog.com'.
- Understanding the HTTP (HyperText Transfer Protocol) protocol:
- Communication model of client-server.
- Common methods: GET, POST, PUT, DELETE.
- Statuses: 1xx (informative), 2xx (success), 3xx (redirects), 4xx (client's errors), 5xx (server's errors).
- Getting to know design patterns; a concept from 90's:
- Creation pattern: e.g. 'Factory Method', 'Builder', and 'Singleton'.
- Structure pattern: e.g. 'Adapter', 'Facade', and 'Composite'.
- Behavioural pattern: e.g. 'Observer', 'Command', and 'Strategy'.
- Using Java packages / libraries to manage API connections: HTTP requests, and JSONs responses.
- HTTP requests:
java.netlibrary (HttpClient,HttpRequest,URI,HttpResponse).- Documentation for reference: 'https://docs.oracle.com/en/java/javase/17/docs/api/java.net.http/java/net/http/package-summary.html'.
- JSON conversion (serialization and de-serialization) from and to Java objects:
com.google.gsonlibrary (Gson,GsonBuilder).- Documentation for reference: 'https://github.com/google/gson', 'https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/module-summary.html'.
- HTTP requests:
- Use of Java
Records, as an 'intermediate' class to facilitate managing mapping of JSON fields from responses to project's classes and attributes: 'https://docs.oracle.com/en/java/javase/16/language/records.html'. - Use of
Exceptionsto handle possible errors in code execution.- Use of
try-catchblocks vs.throwskeyword in class definition: 'https://medium.com/@AlexanderObregon/java-exception-handling-throws-vs-try-catch-94b0abe1080d'. - Understanding exceptions hierarchy:
Throwable<Error| (Exception<RuntimeException). This implies to startcatches with more specific exceptions, until you get to the more 'general' (or superclass); e.g.RuntimeExceptionBEFOREException. - Using 'multi-catch' to group catch of several types of exceptions.
- Creating own
Exceptionfor exercise purposes.
- Use of
- Exporting local files in several formats, such as
.txtand.json, using package / libraryjava.io(FileWriter): 'https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/FileWriter.html'.
Available at 'https://app.aluracursos.com/certificate/4f043ea5-83f6-4f85-982d-111c1778ddca'.
- Estimated workload: 8h.
- Activities: 51.
- Topics:
- 'Requests y responses'.
- 'Utilizando una biblioteca externa'.
- 'Lidiando con excepciones'.
- 'Persistiendo datos en archivos'.
- 'Consolidando conocimientos'.
PROGRAM STRUCTURE.
- [Course] 'Java: consumir API, escribir archivos y manejar errores': 'https://app.aluracursos.com/course/java-consumir-api-escribir-archivos-manejar-errores'.
- [Module] 'Java Orientado a Objetos G9 - ONE': 'https://app.aluracursos.com/formacion-java-grupo9-one/'.
- ORACLE Next Education (ONE) education program, in LATAM: 'https://www.oracle.com/co/education/oracle-next-education/'.
- Alura LATAM education platform: 'https://www.aluracursos.com/'.
COURSE RESOURCES.
- GitHub's project repository: 'https://github.com/alura-es-cursos/2047-screenmatch4'.
- Branch for course exercises:
Aula1toAula4. Ref.: 'https://github.com/alura-es-cursos/2047-screenmatch4/tree/Aula1'. - Repo for course challenge. Ref.: 'https://github.com/alura-es-cursos/2047-starwarsapi/tree/master'.
- Branch for course exercises:
Note
This section is only for reference, for documentation purposes in case of re-visiting course notes.
No aditional notes.
Made with contrib.rocks.
a1t0ghb |
|---|
