允许用户在Web应用程序上创建自己的页面的方法是什么?

huangapple go评论99阅读模式
英文:

How to: allow users to create their on pages on web app?

问题

I'm relatively new to webdev, and essentially I'm trying to create functionality that allows users to create their own event pages (similar to Facebook Events, Meetup etc.).

我相对于Web开发比较新,基本上我正在尝试创建允许用户创建自己的活动页面的功能(类似于Facebook活动、Meetup等)。

My question is to do with the surrounding architecture of this, namely:

我的问题与此相关的是架构,具体来说:

  1. Given each event page will have its own url, do you need a separate file for each event in the backend?

    鉴于每个活动页面都将有自己的URL,您是否需要在后端为每个活动使用单独的文件?

  2. Or is there some clever way of templating and directing traffic? (Sorry if this is vague, I'm trying to probe if there is a better way of doing this?)

    还是有一些巧妙的模板化和流量导向的方法吗?(如果这个问题有点模糊,我正在尝试探讨是否有更好的方法?)

  3. I notice that most of the FB/Meetup events all have their own URLs, does this mean that they all have separate files in the backend?

    我注意到大多数Facebook/Meetup活动都有自己的URL,这是否意味着它们在后端都有单独的文件?

I'm using Nodejs for the backend btw.

顺便说一下,我正在使用Node.js作为后端。

I've been Googling around but haven't been able to figure it out, I think I might be using the wrong wording... so even a point in the direction of the right wording would be much appreciated!

我一直在Google上搜索,但还没有弄清楚,我认为可能是我使用了错误的措辞...所以甚至指导正确措辞的方向都将不胜感激!

Thanks y'all!

谢谢大家!

英文:

I'm relatively new to webdev, and essentially I'm trying to create functionality that allows users to create their own event pages (similar to Facebook Events, Meetup etc.).

My question is to do with the surrounding architecture of this, namely:

  1. Given each event page will have its own url, do you need a separate file for each event in the backend?
  2. Or is there some clever way of templating and directing traffic? (Sorry if this is vague, I'm trying to probe if there is a better way of doing this?)
  3. I notice that most of the FB/Meetup events all have their own URLs, does this mean that they all have separate files in the backend?

I'm using Nodejs for the backend btw.

I've been Googling around but haven't been able to figure it out, I think I might be using the wrong wording... so even a point in the direction of the right wording would be much appreciated!

Thanks y'all

答案1

得分: 1

一般情况下,这是通过数据库驱动的解决方案来处理的。 "页面" 是动态的,URL 是一个参数,参见 @Konrad 的评论,允许在数据库中查找页面,从而允许动态内容加载到单个页面中,处理每个页面似乎是唯一的复杂性。

英文:

Generally this is handled via database-driven solutions. The "pages" are dynamic, and the URL is a parameter see @Konrad's comment that allows the pages to be looked up in a database which allows the dynamic content to be loaded into a single page which handles the complexity of each page seeming unique.

huangapple
  • 本文由 发表于 2023年1月5日 00:06:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/75008156.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定