承接 webengine-blueprints/todo-list 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webengine-blueprints/todo-list

Composer 安装命令:

composer require webengine-blueprints/todo-list

包简介

Database-driven CRUD application.

README 文档

README

Screenshot of a to-do list app made in WebEngine

A basic database-driven to-do list with CSS styling and no JavaScript.

This blueprint will help you get on the way with introducing a database and page interaction, and acts as a good learning tool.

To run: composer install to set up the project, gt migrate to create the database, gt run to start the server, then visit http://localhost:8080

The database

This project uses an SQLite to persist its state, storing a todo-list.sqlite file in the project root. It is not built to be multi-user, so hosting this code online would mean that anyone can update the to-do list. Not too much work is required to add multi-user concurrency, but that's outside the scope of this blueprint.

There's only a single table todo, created in the query/_migration/001-schema.sql file (which can be executed using gt migrate).

The CRUD queries are stored in query/todo - there are only 4 query files: create.sql, retrieve.sql, update.sql, delete.sql.

The model

Each record in the database is represented by an instance of TodoItem. This is handled by the TodoList class, which acts as a Repository, being constructed by the ServiceLoader with a reference to the database.

The page view and logic

There is only one page: index. The index.html stores the view, which is mainly static, apart from the <li> element that has the data-list attribute, indicating that it should be repeated for every item in the list.

The logic is stored in index.php. The go() function is executed every page view. Within the page there are <button> elements that have their name attribute set to do. Clicking these buttons executes the corresponding do_*() functions in index.php.

Any classes that are required for the go and do functions to do their job are passed as parameters to the functions, and their construction is handled once in the ServiceLoader.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: CSS

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-07-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固