douxi3085 2013-07-04 05:52
浏览 37
已采纳

什么应该是博客的结构? [关闭]

It is the first time I'm developing a blog, I want to see if I get this right. Elements:

  1. html page that will display the blog messages
  2. javascript that will sent a get/post request onload to get all the blog posts from DB(MySQL)
  3. PHP page that will get the get/post request to bring/edit/delete a page and will fetch/edit/delete the appropriate item in DB.
  4. MySQL DB that will store all post items in DB

Flow:

html <--onload()--> javascript <--edit(id)/get(all)/delete(id)--> php <--delete/update/insert-->MySQL

Is that the way to do it? is there a better or easier way I'm creating this blog to practice JavaScript/PHP/HTML.

  • 写回答

1条回答 默认 最新

  • duansha8115 2013-07-04 06:21
    关注

    Yes, It's one way to do it and it's fine. Yes, it's good for learning purposes, but if you want to actually run a blog, better use WordPress; If you plan to become a blog-builder, better practice on build WordPress themes; I'm not sure about your relationship with the DBAdmin, but you're going to interact with the DB in using PHP whether you use javascript or not. PHP cannot change an HTML element dynamically, but you can reconstruct the page on the server-side and provide the client with a new page for every action (at some rare scenarios it might actually be faster any it doesn't rely on the client-side capabilities- not everyone have javascript, you know...)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题