Loading video player…

Planning Functionality

00:00 Let’s talk about the features of the command-line application that you’re going to be building by the end of this course. Your command-line application will have features to: initialize a new to-do database to store the to-do items, add to-do items with priority, value and completion status, list and view all to-do items,

00:21 update a to-do item’s completion status, remove a single to-do item from the database, and finally, remove all to-do items from the database.

00:33 To achieve these features, you’ll be able to pass certain commands to your command-line application to execute set operations. First is the init command to initialize your to-do application database.

00:45 Next is the add command. When run and passed the DESCRIPTION value and optionally a priority value, adds a new to-do item to the database, and then the list command.

00:57 This command will fetch and list all the to-do items in your database. Next, the complete command. This command when run and passed a TODO_ID, sets a to-do item as completed.

01:09 And then the remove command. If run and passed an ID, removes a single to-do item from the database using its ID. And finally, the clear command.

01:19 This command removes all the to-do items and clears the database. To achieve all these as the developer, it’s important that you understand the architectural design that your program or software follows.

01:33 For building this command-line application, you will be following a model-view-controller architecture, also known as the MVC architecture. This is a design or architectural pattern used to separate an application into three main, logical, interconnected components or layers: the model, the view, and the controller.

01:54 The model component in your application will be in charge of managing the application’s data and business logic. This model component is also in charge of communicating back and forth with the database used to store your application’s data.

02:10 Next, the view component. This component is responsible for displaying the data to the user. This is usually the point of interaction between the application and the client or final user.

02:23 Also, it’s in charge of updating the interface based on changes that occur in the model. And then the controller. This acts as an intermediary between the model and the view.

02:35 It takes inputs from the user and based on those inputs updates the model. Now that you know what architectural design your application is going to follow, next is to look at tools you would be using to build your final application.

Become a Member to join the conversation.