# Coursera
:::spoiler
1. Familiarize yourself with the course content
Browse the module overviews and objectives to get a feel for the topics presented and the assets associated with the topic of each module. Get accustomed to the order of the content that will be presented. Knowing upcoming topics helps you connect the ideas together to form a cohesive whole. An outline of the modules is presented below.
2. Plan and make a rough timeline for completion
Now that you are familiar with the topics in each module look at the overall completion time estimates for the assets in the modules. Set a reasonable goal for yourself to complete each module. Determine when you would like to finish the course and schedule time each day to study.
3.Actively consume each asset
Dedicate time and a place to study without distractions.
Take notes while watching the instructional videos or download the transcripts and highlight the parts of the narration that you think are most important.
Complete all of the practice quizzes. Read all of the feedback for correct and incorrect responses. Retake the practice quizzes until you get all of the answers correct.
Complete all of the graded quizzes. The incorrect responses will direct you to the video addressing that information. Review the video or the transcript to identify the correct response and ascertain why that answer is correct. Retake graded quizzes until you pass.
Use the cheat sheets to review the terms and code found in each module.
Complete all labs to gain hands-on experience with the ideas taught in the videos.
4.Talk to your friends and family about the course
Keep yourself accountable and commit to the course by talking to your friends and family. Engage them in conversation when you find a topic that piques your interest or where you think another perspective may be beneficial.
5. Follow your plan
Now that you have a plan, keep yourself motivated by rewarding yourself as you achieve your goals.
:::
## Application development lifecycle overview:
The application development lifecycle
:::spoiler
regardless of the application type, every application will go through different phases: requirement gathering, analysis, design, code and test, user and system test, production, and maintenance.
:::
## Module 1:
The application development lifecycle has seven phases, including:
Requirement Gathering: You collect user, business, and technical requirements for the app
Analysis: You analyze the requirements
Design: You design the complete solution
Code and test: You build and test the different components of the app
User and system test: Users test the app for usability, and you perform system integration testing and performance testing
Production: The application is available to all end users
Maintenance: You upgrade or fix any user or system issues
All web apps are APIs, but not all APIs are web apps. Both share data between apps, but not all APIs require networks like web apps do.
The PEP8 guidelines for code readability include the following:
Four spaces for indentation
Blank lines to separate functions and classes
Spaces around operators and after commas
The PEP8 coding conventions for consistency and manageability include:
Add larger blocks of code inside functions
Name functions and files using lowercase with underscores
Name classes using CamelCase
Name constants in capital letters with underscores separating words
To ensure that your code adheres to the predefined style and standard without executing the code, you can use the Static code analysis method.
Unit testing is a method to validate if code units are operating as designed. You must test every unit before integration with the final codebase.
To create a package:
Create a folder with the package name
Create an empty __init__.py file
Create the required modules
In the __init__.py file, add code to reference the modules needed in the package
You can verify the package via the bash terminal in a Python shell.
## Module 2 Lesson Summary: Web App Deployment using Flask
Python libraries are like toolkits. Each library has specific tools to simplify and expedite certain programming tasks. Frameworks are predefined structures for application development. Framework enables you to build the complete application, while libraries aid with specific functionality.
Flask is a microframework that ships with minimal dependencies. To build websites, Flask has features like debugging servers, routing, templates, and error handling. Flask can be installed as a python package. Django is a full-stack framework compared to Flask. You can create a server by instantiating the Flask class.
Flask provides a Request and a Response object for each client call. You can get additional information from the Flask Request, like headers. You can parse the Request Object to get query parameters, body, and other arguments. You can even set status on Response objects before sending a response back to the client.
You can use dynamic routes to create RESTful endpoints.
There are multiple classes of HTTP status codes showing success, user error, or server error. Flask implicitly returns a success code of 200 with the response. You can also provide status codes explicitly. Flask also provides application-level error handlers.
Flask is a microframework for creating web applications and supports CRUD.
Install the Flask package using pip.
To create a web application using Flask:
Import Flask
Instantiate Flask
Run the app
You can render both static and dynamic templates with Flask
## Module 3 Summary: Creating AI Application and Deploy using Flask
Watson AI libraries are embeddable libraries that are preinstalled in the Cloud IDE framework. These embeddable AI libraries provide a variety of NLP and speech-based functions based on popular AI models.
In the projects, you developed web apps with incorporated AI functionality using IBM Watson libraries.
Both projects followed the same application creation steps including:
Create a function for the application
Package the application function
Run unit testing of the function by calling it as a package
Deploy the application over the web using Flask
Incorporate Error handling to the application
Run static code analysis on the codes created