简体   繁体   English

如何建立自适应网站的“添加内容”页面

[英]How do I build the “To add content” page of a responsive website

Context: Ok so I am building a website for a friend. 上下文:好的,所以我正在为一个朋友建立一个网站。 Hes a designer with a high need to daily include his projects (images and text). 他是一位非常需要每天包括其项目(图像和文本)的设计师。

Problem: Ok so I know pretty much how to code in html/css/javascript a front end responsive website, that is the easy part for me, the hard one is the content page. 问题:好的,所以我很了解如何在html / css / javascript一个前端响应网站中进行编码,这对我来说很容易,难的是内容页面。 I've never done it so I don't know the best way. 我从来没有做过,所以我不知道最好的方法。 A page that he goes daily put a new project, new images, formatted text (A like a blog). 他每天浏览的页面上放置了一个新项目,新图像,带格式的文本(例如博客)。 But since he doesn't know anything about coding and front end, it has to be simple enough for him to understand. 但是由于他对编码和前端一无所知,所以它必须足够简单才能让他理解。

Resources: I made several searches and found some websites that allow custom templates with content, one of them standing is wordPress (haven't used it for years). 资源:我进行了几次搜索,发现一些网站允许使用带有内容的自定义模板,其中一个站是wordPress(多年来没有使用它)。 I am currently abusing tumblr for that matter, but their support is quite bad. 我目前在这方面滥用tumblr,但他们的支持相当糟糕。 Should I use one, should I buy a host like bluehost and create my self one, what you guys recommend? 我应该使用一个,我应该购买像bluehost这样的主机并创建自己的一个吗,你们推荐什么? I tried google it but perhaps I am not doing it the right way since I am not finding any answer to my problem. 我尝试了谷歌它,但也许我没有以正确的方式,因为我没有找到我的问题的任何答案。

Look, you've come to a programming website, so the most common suggestion you'll get here, and the option I myself recommend is: 看,您已经来到了编程网站,所以您会在这里找到最常见的建议,我自己推荐的选择是:

MAKE IT YOURSELF! 自己动手!

It really is a fun and very educational experience. 这确实是一个有趣且非常有教育意义的体验。

There are many, many ways to do this. 有很多很多方法可以做到这一点。 In general you'll want to have a front end that communicates with a back end API. 通常,您需要一个与后端API通信的前端。

For the front end, there are a lot of options. 对于前端,有很多选择。 From templating engines like Jekyll , to MVC frameworks like Laravel , to full fledged high level abstractions like Angular and React , which are admitedly harder to learn but so, so robust, and useful once you've figured them out. 从像Jekyll这样的模板引擎,到像Laravel这样的MVC框架,再到像AngularReact这样的成熟的高级抽象,它们都很难学习,但是,一旦找到它们,它就变得如此强大和有用。

The selection of tools you can use to make the API that supports the website is just as rich. 您可以用来制作支持网站的API的工具种类也很多。 There is ASP.NET for C# (which some people use for the front end as well but I wouldn't), there is Node.JS for JavaScript, with a myriad of libraries and packages to get you started. 有用于C#的ASP.NET (有些人也用在前端,但我不会用),有用于JavaScript的Node.JS ,其中包含无数的库和程序包来帮助您入门。 Flask is a popular option for Python. Flask是Python的流行选项。 The list goes on and on. 清单一直在继续。

Oh and dont forget about Ruby on Rails . 哦,别忘了Ruby on Rails

As for the interface which your friend will use to add their work, turning all that complicated back end into a simple, easy to use interface is a fundamental part of UX design and, IMHO, quite satisfying once you get it right. 至于您的朋友将用来添加其作品的界面,将所有复杂的后端变成一个简单易用的界面是UX设计的基本组成部分,恕我直言,一旦您设置正确,就会感到非常满意。 Make it sleek and, most of all, intuitive . 使它光滑,最重要的是,使其直观 One shouldn't have to be taught how to use it. 不必教别人如何使用它。 It should be apparent from the first time they open the page. 从他们第一次打开页面应该可以明显看出。 You should always ask for their feedback as you are developing it. 在开发过程中,应始终征求他们的反馈。 Some even opt to create mock ups of the interface, in order to get feedback on both its aesthetics and its intuitiveness before a single line of code has been written. 有些人甚至选择创建接口的模型,以便在编写一行代码之前就其美观性和直观性获得反馈。

Now, regarding how you'll actually do it, the answer really depends on the tools you opt to use. 现在,关于你将如何真正做到这一点,答案真的取决于你选择使用的工具。 In general, you'll want to read up on things like the MVC pattern , or React's component architecture . 通常,您将需要阅读MVC模式或React的组件架构之类的内容 The former is something you'll come across on a wide variety of platforms. 前者是您会在各种平台上遇到的东西。 The latter is mostly React specific, but in my opinion, understanding how to properly build a website using component architecture means you're in the right mindset, something that will help you no matter how you choose to build it. 后者主要是特定于React的,但是我认为,了解如何使用组件架构正确地构建网站意味着您处于正确的思维定势,无论您选择如何构建它都可以为您提供帮助。

All that being said ... 话说回来 ...

Web development is complicated. Web开发很复杂。 Creating dynamic websites is a much larger undertaking that designing a static page, or even making an SPA . 创建动态网站要比设计静态页面甚至制作SPA都要大得多。 Though I do wholeheartedly recommend you do it at some point , starting with your friend's website might not be the best idea. 尽管我会全力建议您在某个时候这样做,但从您朋友的网站开始可能不是最好的主意。 Or, you may simply not have the time to sift through all your options, figure out which is best for you, begin the learning process etc. 或者,您可能根本没有时间来筛选所有选项,找出最适合您的选项,开始学习过程等。

In that case, there are plenty of publishing frameworks and tool sets to choose from. 在这种情况下,有很多发布框架和工具集可供选择。 Wordpress has become very popular in the recent years, and templates and plugins for it are abundant. 近年来, WordPress变得非常流行,并且模板和插件非常丰富。 Alternatives like Medium and Ghost have also gained some traction. 诸如MediumGhost之类的替代方案也获得了一些关注。

There are plenty of commercial CMS type frameworks. 有很多商业CMS类型的框架。 One I have heard good things about is ExpressionEngine . 我听说过的一件好事是ExpressionEngine However, I cannot speak for it with certainty. 但是,我不能肯定地说。

If you are looking for a website builder, there are also plenty of options out there such as Weebly , Wix , as well as Squarespace . 如果您正在寻找一个网站建设者,那么还有很多选择,例如WeeblyWix以及Squarespace Google sites is a relative newcomer in that department, but seems promising. Google网站是该部门的一个相对较新的人,但看起来很有希望。

So, in summary, 所以总而言之

I wholeheartedly recommend building it from scratch. 我全力推荐从头开始构建它。 There are many, many languages, frameworks, and tools out there you can choose from, each with its own patterns, best practices and idiosyncrasies. 您可以从许多语言,框架和工具中进行选择,每种语言,框架和工具都有其自己的模式,最佳实践和特质。 If you lack the time, or simply don't feel like going through that process of building a dynamic website from scratch, you can use one of many tools available. 如果您没有时间,或者只是不想经历从头开始构建动态网站的过程,则可以使用许多可用工具之一。 However, that wouldn't be nearly as much fun, and would likely produce an inferior result. 但是,这并没有那么有趣,而且可能会产生较差的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM