我网站上的新闻栏目 [英] A News section on my website

查看:102
本文介绍了我网站上的新闻栏目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我是asp.net和c#的新手,我正在寻找关于在我的网站上创建新闻部分的一些建议。我做过一些研究,但不知道如何做出最终决定。



你可以为此创建一个数据库并在数据库中输入newsid newstitle newsbody等,但这是最好的方法吗?



我在做研究之前的第一个想法是创建一个新闻部分,创建一些asp页面设计模板,将模板编辑为新文章,然后将我的网站管理部分中的页面上传到新闻部分。这意味着每篇新文章都会有一个asp页面。这是一个坏主意吗?



如果特定关键字匹配,我希望我的页面在谷歌搜索结果中,但如果我的新闻在ms sql数据库中,这仍然会发生吗?我怀疑了吗?



请一些建议开始吧!谢谢!

Hi I am new to asp.net and c#, I am looking for some advice on creating a news section on my website. I've done some research but don't know how to make my final decision.

You can create a database for this and enter the newsid newstitle newsbody etc in the database but is this the best way?

My first idea before doing research was to create a news section by creating a few asp page design templates to edit the templates as a new article and then upload that page within my admin section of my website to the news section. Which means there will be an asp page for each new article. Is this a bad idea?

I want my pages to be within google results if specific keywords matched but will this still happen if my news is within a ms sql database? I doubt it??

Please some advice to get started! Thank You!

推荐答案

你的问题没有硬性和快速的答案,你需要找出你需要的东西。

你所描述的当然是*一个*解决方案,作为一个起点是非常明智的。您可能希望在架构中添加元数据/关键字,可以使用它来提高可搜索性,并且一些引擎可能会将这些用于搜索引擎优化。



我会暴露你的新闻提要作为MVC4 Web API,这适用于Entity Framework,因此您也很容易使用DAL。您还可以从Web API生成 RSS Feed [ ^ ]稍作努力,应该改善吸收。然后,您的Web应用程序订阅了web api。如果你想要花哨的东西,通过对webapi的定期JQuery调用来创建新闻自动收报机非常容易,所以这种方法非常灵活,并且不太难实现。
There is no hard and fast answer two your problem, you need to work out what you need.
What you have described is certainly *one* solution and is very sensible as a starting point. You might want to add metadata/keywords to your schema, you can use it to improve searchability, and some engines supposedly use these for SEO.

I'd expose your news feed as an MVC4 Web API, this works well with Entity Framework, so you DAL would be easy too. You can also produce an RSS Feed from the web API[^] with a little extra effort, which should improve take-up. You then have your web app subscribe to the web api. If you want to go fancy-pants it is a pretty easy to create a news ticker via periodic JQuery calls to the webapi, so this method is pretty flexible and not so hard to implement.


这篇关于我网站上的新闻栏目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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