分页还是单页 [英] separate page vs single page

查看:67
本文介绍了分页还是单页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看过很多电影站点,每个电影站点都有单独的页面.例如,"Pirates Bay"电影的"Pirates-bay.html","Live Free Die Hard"的"Live-free-die-hard.html"移动等.
另一方面,也可以通过仅创建一个页面(通过POST方法将movieid发送至该页面)来显示该电影,从而实现此目的.例如,我们创建一个页面名称"movie.php",该名称将传递给movieid"movie.php?movieid = 112",并且该页面将显示电影.

但我想知道
1.哪种方法更好,为什么?
2.如何动态创建单独的电影页面.

I have seen so many movies sites that have a separate page for each movie. For Example "Pirates-bay.html" for "Pirates Bay" Movie, "Live-free-die-hard.html" for "Live Free Die Hard" Move etc.
On the other hand this purpose can also be achieved by creating only one page to which we send the movieid by POST Method and that Page shows the concerned movie. For Example We Create a page name "movie.php" that is passed the movieid "movie.php?movieid=112" and this page shows the movie.

But I want to know that
1. which one of the method is better, and why.
2. How can I Create a separate movie page dynamically.

has Some one the answers of my question?

推荐答案

1.哪种方法更好,为什么?
我肯定会选择第二个选项,即所有电影都使用单页显示,并根据MovieID填充内容.
原因-可重用性,维护性.考虑这一点-每次发行新电影时,您都将浪费时间创建另一个页面.如果单页可以完成工作,那有什么意义呢?您只需要更新数据库,用户就可以查看新的电影详细信息,而无需添加额外的页面.

2.如何动态创建单独的电影页面.
在ASP.NET中,有许多控件集,您可以使用它们轻松地创建动态页面.我对PHP不太了解.但是我认为也必须有办法在PHP中创建动态页面.您可以通过搜索Google的动态页面PHP"来开始研究.

祝您好运,并祝您编程愉快!
1. which one of the method is better, and why.
I will choose the 2nd option definitely i.e. single page for all movies and filling the content based on the MovieID.
Reason - re-usability, maintenance. Consider this - every time a new movie is released, you will waste time creating another page. What''s the point if single page can do the work. You will just need to update your database and users will be able to see the new movie details without you needing to add an extra page.

2. How can I Create a separate movie page dynamically.
In ASP.NET there are rich set of controls using which you can create dynamic pages very easily. I do not know much about PHP though. But I think there must be ways to create dynamic pages in PHP as well. You can start researching by searching Google for "dynamic pages PHP".

Good luck and happy coding!


您好,使用单页功能可以提高可用性.那些变形页面具有真正的优势.如果网址本身具有电影名称,那么当用户使用电影名称搜索网络时,网络爬虫就可以很好地解决这个问题,使其专注于此链接.但是我想知道每个电影可能都没有页面,但是幕后发生的事情仅仅是使用.htaccess文件或自定义处理程序的重定向.所有这些链接都直接指向同一页面,以标识电影名称并显示它.线索是页面布局的外观.如果页面的框架发生变化,那么当然可能会有很多页面.但是主要的想法是与爬行者保持友好.
Hi using single page gives you usability. Those morphic pages has a real advantage. When the url has the movie name to itself it makes good trick with web crawlers to focus on this link when user search the net with the movie name. But I wonder there may not be a page for each movie, what will be happen under the hood is just a redirection using a .htaccess file or a custom handler. All those links direct to a same page wher it identifies the movie name and display it. The clue is how the layout of the page looks like. If the framework of the page changes then of course there may be many pages. But the main idea is to shake friendly with the crawlers.


这篇关于分页还是单页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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