
What this book covers
In Chapter 1, Overview, you will see a brief history of the Core Data and a small introduction to EOF and Xcode.
In Chapter 2, Understanding Core Data, you will have an introduction to the Core Data framework and its features. You will learn about the data model and how it defines the structure of data in terms of entities, properties, and their relationships. Also, you will get a brief idea of Model View Controller (MVC), the Core Data API and its main components. Besides this, the chapter includes an overview of the application (Sales Record System for a Store), which we will be building in the book along with its different views and the tasks performed when different controls in these views are selected.
Chapter 3, Understanding Objective-C Protocol and Table View, explains how an object collaborates with other objects through the delegation pattern. We will learn about the working of a protocol, that is, how a protocol and its methods are defined. We will also learn how an object adopts a protocol to act as a delegate and how a protocol establishes a contract for communication between two objects.
Chapter 4, Designing a Data Model and Building Data Objects for Customers, introduces the working of UITableView
and explains step-by-step how information is displayed via the table view. The chapter explains the different methods used in displaying information through table view and also how to add more information to the existing information being displayed via table view. For instance, if four names are already being displayed in a table, this chapter will show how to add the newly entered name to the existing list of names in the table.
In Chapter 5, Creating, Listing, and Deleting Names of Customers, we will be learning how to design a data model for storing any customer's information, that is, we will define the Customer
entity and its attributes. Also, we will learn to build the data object (classes) associated with the Customer
entity.
Chapter 6, Creating, Listing, Displaying, and Deleting Records of Customers, focuses on explaining how a customer's information, which is stored in the Customer
entity, is maintained. The chapter gives a step-by-step explanation of how to save, display, and delete the customer information that comprises customer's name, e-mail address, and contact number.
In Chapter 7, Updating and Searching Records of Customers, we will see how to modify the customer information, which is, unlike the "editing" feature in Chapter 6 that was limited to the deletion of a record; we will see how to update (modify) the information of the existing customers. The chapter explains the procedure to add an Edit button to the view, which when selected will allow us to edit the information of the selected customer. This chapter also covers how to save the modified information back to the persistent store. In this chapter, we will also learn the application of NSPredicate
to apply query facility to locate the desired customer quickly.
Chapter 8, Entering, Saving, Listing, and Deleting the Records of the Products Sold to the Customers, explains how to store the information of the products purchased by different customers, we will learn to add the Product
entity to our existing data model and we will see how the relationship is established from the Customer
entity to the Product
entity. The chapter also explains how the inverse relationship is set from the Product
entity to the Customer
entity and finally, the procedure of building data objects for the modified data model. Also, we will learn how to maintain the product's information, that is, how to enter, save, display, and edit the information of the products that are sold to different customers. We will learn how to develop a view to enter the product's information, develop a product's menu to add, edit, and display the products sold to the selected customer and finally, to connect the product's menu to the rest of the application.
Chapter 9, Entering, Displaying, and Deleting the Stock, covers the creation of a Master Product entity, which will be used for storing the information of products that the vendor is dealing with. All the products available for sale are stored in this table. In order to store the image of the product, the chapter explains the concept of transformable data type that is used for creating custom data types. The chapter also explains how to enter, save, display, delete, and modify the information of the master products that the vendor deals with. It also covers the working of the Image Picker control—how it is used in selecting images of the products and the different methods to define the size of the image of the product. In all, the chapter explains how to develop a view to enter master product's information, develop a menu to add, delete, and display information of master products for the MasterProduct
.
Note
The information of the products entered in the MasterProduct
entity is very different from the information of the product entered in the Product
entity. The Product
entity stores the information of the products that are sold to the customers, whereas the MasterProduct
entity refers to the products that are available for sale.
Chapter 10, Editing the Stock Information, explains how to connect the menu meant for adding, deleting, and displaying the Master Product information to the rest of the application. Also, the chapter covers the step-by-step approach to develop a view to display and modify the selected master product's information.
In Chapter 11, Displaying the Products for Sale and Updating the Stock, we will learn how to implement query facility while entering the information of the products sold to the selected customer. Also, we will see how the quantity of the master product gets automatically reduced by the amount of quantity sold to the selected customer.
Appendix, Appendix, will give you a brief idea about the topics covered in this book.