定制 mohiwalla/dtquick 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

mohiwalla/dtquick

Composer 安装命令:

composer require mohiwalla/dtquick

包简介

DataTables Quick is a lightweight and fast JavaScript library that simplifies the process of displaying data from databases. With minimal server-side code required, DataTables Quick generates queries automatically and saves time.

README 文档

README

dtquick is a lightweight and fast JavaScript library that simplifies the process of displaying data from databases. With minimal code, dtquick generates queries automatically and saves time. Check out the Live Demo to see it in action!

Usage

There are several ways to use dtquick:

  • Using CDN

Include the following script tag in the <head> section of your HTML document to use dtquick via CDN:

<script src="https://cdn.jsdelivr.net/gh/mohiwalla/dtquick@mohiwalla/index.js" defer></script>
  • Cloning the Repository

If you have Git installed on your machine, you can clone the repository using the following command:

git clone https://github.com/mohiwalla/dtquick.git
  • Installing via npm

If you have Node.js installed on your machine, you can use the following command to install the module:

npm install dtquick
  • Downloading the Script

You can also download the index.js file and include it in your HTML document using the following script tag:

<script src="path/to/index.js" defer></script>

Alternatively, you can copy the code from index.js and paste it into a <script> tag in your HTML document.

Initialization

To initialize dtquick, add a <div> element with id="dtquick".

Attributes

The following attributes must be added to the <div> element:

  • db-table

Specifies the name of the table to be used in the MySQL query to fetch data from the database.

  • cols

Specifies the names of the columns to be displayed in the table as a comma-separated list. Each column name should contain two parts: one for the client-side to display in the table's <th> and another for the server-side (which is the name used to create the column in the database). For example:

cols="S. no. = S, name = Name, E-mail = Email, Pass = Password"
  • file-name

Specifies the name of the server-side file to which dtquick will send an AJAX request for data.

Example

<div id="dtquick" db-table="dtquick" file-name="fetch.php" cols="User_name = name,......"></div>

<script src="https://cdn.jsdelivr.net/gh/mohiwalla/dtquick@mohiwalla/index.js" defer></script>

Server-Side File

The server-side file should fetch the query, the total number of rows available in the table, and the total found results as per the query. You can use any server-side language with it as per your comfort. Code samples for server-side scripts have been provided for reference in the following languages:

Note

Before using dtquick in production, please note that this library sends a query from the client-side to the server-side, which is not traditional. Therefore, anyone from the client-side can modify the query to fetch data from your table, which is a potential risk to your data. If you want to prioritize safety, consider using DataTables as it creates queries at the server end and reduces the risk. The purpose of creating queries at the client-end was to keep the structure of both client and server-side files simple and easy to use for newbies. If you find any bugs in the code or any possible improvements without compromising the simplicity of usage, you can send a pull request or modified code to hindustanjindabad5911@gmail.com. The existing code will be replaced by the code provided by you as soon as the examination is finished, and your name will be in the list of Contributors as well. So, don't hesitate to give it a try. Lastly, if you appreciate the effort, consider giving a star to this repository.

Inspired by

DataTables

License

dtquick is distributed under the MIT License.

Made with ❤️ by mohiwalla

mohiwalla/dtquick 适用场景与选型建议

mohiwalla/dtquick 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 11, 最近一次更新时间为 2023 年 06 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「datatables」 「datatable」 「dtquick」 「mohiwalla」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 mohiwalla/dtquick 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mohiwalla/dtquick 我们能提供哪些服务?
定制开发 / 二次开发

基于 mohiwalla/dtquick 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 11
  • Watchers: 4
  • Forks: 4
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-26