{"id":18137946,"url":"https://github.com/shaobeichen/mvc-to-ssr","last_synced_at":"2025-08-19T00:04:50.276Z","repository":{"id":143908580,"uuid":"459916482","full_name":"shaobeichen/mvc-to-ssr","owner":"shaobeichen","description":"一个依次从 MVC、SPA、SSR 进程演变的案例","archived":false,"fork":false,"pushed_at":"2025-03-10T09:15:08.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-10T10:25:38.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shaobeichen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-16T08:32:54.000Z","updated_at":"2025-03-10T09:15:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8931d95-9d5f-4baf-8c90-5229e993ee99","html_url":"https://github.com/shaobeichen/mvc-to-ssr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaobeichen%2Fmvc-to-ssr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaobeichen%2Fmvc-to-ssr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaobeichen%2Fmvc-to-ssr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaobeichen%2Fmvc-to-ssr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaobeichen","download_url":"https://codeload.github.com/shaobeichen/mvc-to-ssr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247518579,"owners_count":20951829,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-01T15:07:46.663Z","updated_at":"2025-04-06T17:22:32.563Z","avatar_url":"https://github.com/shaobeichen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mvc-to-ssr\n\n\u003e 一个依次从 MVC、SPA、SSR 进程演变的案例\n\n## 版本\n\n### mvc 版本\n\n- mvc 版本是 MVC 的渲染逻辑，\n- 主要逻辑：简单来说 html 负责样式，后端负责数据逻辑。例如 PHP 模板渲染\n- 部署：非静态页面部署\n- 缺点：前后端不分离，开发效率低。\n\n### spa 版本\n\n- spa 版本是 MMVM 客户端渲染逻辑，\n- 主要逻辑：html 负责样式、数据逻辑，后端负责给数据。例如 Vue 单页面\n- 部署：静态页面部署\n- 缺点：单页面，seo 不友好，渲染速度有待优化。\n\n### ssr 版本\n\n- ssr 版本是 MVVM 服务端渲染逻辑，\n- 主要逻辑：html 负责样式、数据逻辑，后端负责给数据。例如 Nuxt 服务端渲染\n- 部署：非静态页面部署\n- **优点**：前后端分离，seo 友好，渲染速度快。\n\n## 使用\n\n### mvc 使用\n\n`npm i \u0026 npm run dev`\n\n### spa 使用\n\nvscode 打开 index.html，右键 Open In Default Brower\n\n### ssr 使用\n\n`npm i \u0026 npm run dev`\n\n## 参考内容\n\nhttps://github.com/wmui/vue-ssr-demo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaobeichen%2Fmvc-to-ssr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaobeichen%2Fmvc-to-ssr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaobeichen%2Fmvc-to-ssr/lists"}