使用HTML5进行CRUD操作 [英] CRUD operation using html5

查看:546
本文介绍了使用HTML5进行CRUD操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用html5创建一个crud应用程序.应用程序在启动时会从SQL Server加载数据并将其显示在网页上.现在,用户可以在脱机模式下对数据执行各种操作.但是,当用户单击提交"按钮时,所有数据都应保存到数据库中.任何人都可以帮助我,因为我是html5的新手.

i want to create a crud application using html5. the application at startup loads the data from SQL Server and display it on web page.now the user can perform various crud operations on the data in offline mode. but when the user clicks on submit button all the data should save into Database. anyone can help me as i am new in html5.

非常感谢, 好糖果.

推荐答案

您需要使用多种技术:

  • JavaScript最好通过JSON格式通过AJAX数据从服务器加载.您应该考虑使用 jQuery 或Sencha ExtJS来简化AJAX和JSON处理.
  • 取决于数据的复杂性,您可以使用webstorages或indexedDB在本地存储数据.越复杂,您对indexedDB的满意度就越高,因为它允许您拥有索引和某种加速的过滤.如果您使用jQuery,请使用 indexedDB插件来简化生活.
  • 要显示,添加,编辑和总体上离线处理数据,请考虑构建表单,表格并使它们可排序. jQuery也可以帮助您构建它.尽管Sencha ExtJS具有非常好的表配置器.
  • 将数据上传到服务器需要某种同步逻辑,最好是服务器端,以保持对数据验证的控制权.您还可以使用JSON,JSON易于在服务器端以任何服务器端语言生成和解析.
  • Javascript loads via AJAX data from your server, best using JSON format. You should consider jQuery or Sencha ExtJS to ease AJAX and JSON handling.
  • Than you can store the data localy using webstorages or indexedDB, depending on the complexity of your data. The more complex, the more happy you might be with indexedDB as it allows you to have indexes and some sort of accelerated filtering. If you use jQuery take a indexedDB plugin to ease your live.
  • To show, add, edit and in general manipulate your data offline, consider to build your forms, tables, make them sortable. jQuery can help you to build this up too. Although Sencha ExtJS has a very nice table configurator.
  • uploading data to your server needs some kind of synchronisation logics, best server side, to keep the control over the validation of data central. You can work with JSON as well, its easy to generate and to parse at server side, in any server-side language.

如果您没有喜欢的Javascript库并且对这一切不熟悉,请看一下jQuery.它还可能会教您基础技术. Sencha只会对您隐藏技术,这在某种程度上是不好的",因为它会使您视而不见,并且很难甚至有时无法完成非常复杂的任务.

If you don't have a favorite Javascript lib and you are new to all this, have a look at jQuery. It also might teach you the underlaying technologies. Sencha will only hide the technology from you, which is somehow "bad", as it keeps you blind and it can be hard or sometimes impossible to accomplish very complex tasks.

实际上,您需要学习Javascript,因为它是人们认为html5的核心.

Actually what you need is to learn Javascript, as its the core of what people think is html5.

到目前为止,该答案不是完整的指南或教程,但希望它为您提供了一些提示!祝你有个好的开始.

This answer is by far not a complete guide or tutorial, but hopefully it contains some hints for you! Wish you good start.

这篇关于使用HTML5进行CRUD操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆