Danh mục

PHP and script.aculo.us Web 2.0 Application Interfaces- P7

Số trang: 30      Loại file: pdf      Dung lượng: 882.37 KB      Lượt xem: 11      Lượt tải: 0    
10.10.2023

Hỗ trợ phí lưu trữ khi tải xuống: 9,000 VND Tải xuống file đầy đủ (30 trang) 0

Báo xấu

Xem trước 3 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

PHP and script.aculo.us Web 2.0 Application Interfaces- P7: script.aculo.us là một thư viện JavaScript cung cấp các hiệu ứng thị giác năng động, điều khiển giao diện người dùng, và các tính năng mạnh mẽ AJAX. Đó là những gì phụ-client PHP là phía máy chủ - mạnh mẽ, đơn giản, vui vẻ hoàn tất, và trên tất cả, PHẢI một! Theo các nhà phát triển, chúng tôi tất cả ước mơ xây dựng các ứng dụng mà người sử dụng ngay lập tức có thể rơi vào tình yêu với và nhận được hiệu quả. Đơn giản và các...
Nội dung trích xuất từ tài liệu:
PHP and script.aculo.us Web 2.0 Application Interfaces- P7 Todonow: A Tadalist CloneI have a lot of things on my mind before leaving my house such as visiting thebank, buying vegetables, or office work. But whatever is on my mind is there onmy tadalist.com application too.Tadalist is a simple web application for making lists and managing items. It comesin handy all the time. So after learning script.aculo.us, why dont we try to create ourown Tadalist clone? Hang on. Before we proceed and create an application, lets giveit a Web 2.0-ish name—say todonow. Get, set, and code!Some of the key points we will be covering in this chapter are: • The BIG picture of the application • Features and functionalities • Creating a database for the project • Implementing all the features of the applicationThe BIG pictureLets quickly get a complete picture of what the application is and what it should do.In simple words, we are trying to create a to-do list manager. As a user, we shouldbe able to sign up, log in, and log out as mentioned in Chapter 3 in the User loginmanagement system module. • The user should be able to create lists and add items to a list • The user can mark items as completed, when done • The user will see completed items as well as incomplete tasksAll these operations will be performed when the user is logged in. And, finally, theuser can log out.Todonow: A Tadalist CloneFeatures and functionalityNow that we are clear about what our application will do, lets quickly get anoverview of the features and functionality that our application will have. • User signup • User login • View all my lists • Show a summary of items for lists (in complete status) • Create new lists • Add new items • Mark items as completed • Mark complete items as incomplete • Delete lists • LogoutThese features and functionalities are the fundamental requirements for anyto-do list manager. You may think there are too many features and functionalitiesto code. Nope! We have already implemented some of them in our User loginmanagement system.Creating a database playgroundHaving a clear picture of todonow gives us clarity about the kind of data we will bedealing with. In our application, users will create lists, add items, update the statusof the items, and so on.We explored and used the phpMyAdmin application to work with the MySQLdatabase in Chapter 3. We will be using phpMyAdmin again for creating ourdatabase tables.We will need three tables for user information, lists, and items, to store thecorresponding data in our application. So, lets quickly create the tables for users,lists, and items.We have already created the schema for the user table in our login managementsystem in Chapter 3. [ 170 ] Chapter 10The fields for the database table lists are as follows: • listID: This is the primary key to identify the lists individually. It is defined as auto_increment, which means our system will automatically increase the value of this field every time we add entries. In Oracle SQL, we call these fields a sequence. • ListName: This is the name of the list provided by the user. • ownerID: This tracks the user of the list. • Date: This is the time when the list was created.The database schema for storing lists is as follows: CREATE TABLE `lists` ( `listID` int(11) NOT NULL auto_increment, `ListName` varchar(50) NOT NULL, `ownerID` int(11) NOT NULL, `Date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, PRIMARY KEY (`listID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;Similarly, fields for the database table items are as follows: • ItemID: It is the primary key to identify the items individually. This is defined as auto_increment, which means that the system will automatically increase the value of this field every time we add entries. In Oracle SQL, we call these fields a sequence. • ListID: This helps in identifying the parent of items. • ItemName: This is the name of the item provided by the user. • Status: This shows whether the item is complete or incomplete. • ownerID: This tracks the user of the list. • Date: This is the time when the list was created.The database schema for storing the items is as follows:. CREATE TABLE `items` ( `ItemID` int(11) NOT NULL auto_increment, `ListID` int(11) NOT NULL, `ownerID` int(11) NOT NULL, `itemName` varchar(40) NOT NULL, `status` enum(Incomplete,Completed) NOT NULL, `Date` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIM ...

Tài liệu được xem nhiều: