开发者

Passing Values to DB and Viewing it w/ 100% JavaScript?

How do JavaScript-heavy web applications route freshly-entered data to a database, and then display it to the client, only using JavaScript/HTML?

Say Acme Social Network user t开发者_如何学JAVAypes profile information into a HTML form and clicks 'submit':

  • How would you save that user's profile data to a database?
  • How would you then display that user's profile data on the profile page?

Can it all be done with JS/HTML?


Well, you could use CouchDB as the backend, or use Node.js with a more traditional DB (or CouchDB), but most people still use a LAMP stack for the backend (often with a framework such as Dancer, Catalyst or Django).


There's always a server-side programming language that interacts directly with the database and generates pages with that data. On a javascript heavy page, there might be an AJAX call that sends the data to a server-side script to store in the database. Information can be pulled from the server with AJAX requests as well. But there's always server-side code that the front end is interacting with.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜