I am trying to get into web development, specially interested building the front-end, UI part of websites while learning JavaScript maybe with AJAX technology. (I have a UI, HCI background.)
我正在尝试进入Web开发,特别感兴趣的是构建网站的前端UI部分,同时使用AJAX技术学习JavaScript。 (我有UI,HCI背景。)
However, I have absolutely no previous knowledge about server-end web development either. To my understanding, frameworks like Django seem to pretty good at this (correct me if I am misunderstanding).
但是,我完全没有关于服务器端Web开发的知识。根据我的理解,像Django这样的框架似乎相当不错(如果我误解,请纠正我)。
So the question is: how much Django, or Rails do I need to know, if my interest is primarily the user interface part of web development. Can I just let somebody else do the back-end stuff?
所以问题是:如果我的兴趣主要是Web开发的用户界面部分,我需要知道多少Django或Rails。我可以让其他人做后端的东西吗?
Pardon me for my imprecise choice of terminologies.
请原谅我不精确的术语选择。
6 个解决方案
#1
You can make a career of front-end user interface development without know a ton about server code. You would do well though to have at least a rudimentary understanding of what happens on the server when you send it a request, where your data comes from, and what the life-cycle of a web page is. This assumes that you have the support of back-end developers. As you mentioned Ajax in your question that implies that you want your web sites to actually do something, which will require things to happen on the back-end (such as storage, manipulation of data, logging in a user, etc.).
您可以在不了解服务器代码的情况下开展前端用户界面开发的职业生涯。虽然至少可以对发送请求时服务器上发生的事情,数据来源以及网页的生命周期有所了解。这假设您得到了后端开发人员的支持。正如您在问题中提到的Ajax意味着您希望您的网站实际执行某些操作,这需要在后端进行操作(例如存储,数据操作,登录用户等)。
As with all things, the more you know, the easier it will be to get what you want from the dedicated professionals. I would suggest that you learn about programming in general, not try an learn a language and framework. In particular, try to understand datatypes, server settings (like timeouts, post versus get, etc.), security and database interactions as they exist beyond JavaScript/ECMAScript. That way when a developer is explaining why they cannot do something you have requested or are offering alternatives, you are speaking the same language.
与所有事情一样,您知道的越多,从专业的专业人士那里获得您想要的东西就越容易。我建议您一般学习编程,而不是尝试学习语言和框架。特别是,尝试理解除JavaScript / ECMAScript之外的数据类型,服务器设置(如超时,发布与获取等),安全性和数据库交互。这样,当开发人员解释为什么他们不能做你已经请求的事情或提供替代品时,你说的是同一种语言。
#2
You need to know a bit about the server side. Here's what you need to know.
您需要了解一下服务器端。这是你需要知道的。
If you have a heavy JavaScript website, you're likely going to want to pass information from the server to clients with JSON (JavaScript Object Notation). This is just a way to format data into strings that JavaScript knows how to convert to objects.
如果您有一个繁重的JavaScript网站,您可能希望使用JSON(JavaScript Object Notation)将信息从服务器传递给客户端。这只是一种将数据格式化为JavaScript知道如何转换为对象的字符串的方法。
So, each of your server-side functions that send data to the client will return JSON. If you have someone writing the server-side for you, that's all you should have to know. You're JS functions will receive JSON, and then you deal with it.
因此,将数据发送到客户端的每个服务器端函数都将返回JSON。如果你有人为你编写服务器端,那就是你应该知道的全部内容。你的JS函数会收到JSON,然后你处理它。
If you have to write the server-side yourself, then that involves 1) getting data from database 2) formatting the data 3) converting to JSON.
如果你必须自己编写服务器端,则涉及1)从数据库获取数据2)格式化数据3)转换为JSON。
I have open-sourced a commenting widget that accepts JSON messages, and gives examples of how you would set up the Django server code. Maybe it will help you: http://www.trailbehind.com/comment_widget/
我开源了一个接受JSON消息的评论小部件,并给出了如何设置Django服务器代码的示例。也许它会对你有所帮助:http://www.trailbehind.com/comment_widget/
#3
Yes and no. Typically what people think of AJAX, such as posting a comment on YouTube and seeing the comment appear instantly with a thank you message, for example, requires a server side language handling the requests, looking up data and returning results as html snippets, JSON data, or XML.
是的,不是。通常人们对AJAX的看法,例如在YouTube上发表评论以及看到评论立即显示感谢消息,例如,需要服务器端语言处理请求,查找数据并将结果作为html片段返回,JSON数据或XML。
However, an AJAX call can be made to static resources as well. You could have an XML file or html snippet stored statically on your web server and have it loaded. The uses for this sort of static loading are generally fewer because if you already have the static html or data in file next to your regular page, why not just put that data directly into the page?
但是,也可以对静态资源进行AJAX调用。您可以在Web服务器上静态存储XML文件或html代码段并加载它。这种静态加载的用途通常较少,因为如果您已经在常规页面旁边的文件中有静态html或数据,为什么不直接将这些数据放入页面?
#4
It helps to set up a local server and write a few lines of code to service your AJAX calls. You can do a lot of JavaScript learning with just a little back-end learning.
它有助于设置本地服务器并编写几行代码来为您的AJAX调用提供服务。只需一点后端学习,您就可以进行大量的JavaScript学习。
#5
If you're new in web development you'd rather wait with Ajax and server-side languages until you've learnt the basics with HTML, CSS and JavaScript, especially if you want to mostly work with the user interface and not the funcionality.
如果您是Web开发的新手,您宁愿等待Ajax和服务器端语言,直到您学习了HTML,CSS和JavaScript的基础知识,特别是如果您希望主要使用用户界面而不是功能。
#6
As you said you can let somebody else do the back-end and focus on front-end (JavaScript, HTML, CSS).
正如你所说,你可以让其他人做后端并专注于前端(JavaScript,HTML,CSS)。
You would need to communicate with the back-end developer when storing or processing data from the server.
在存储或处理来自服务器的数据时,您需要与后端开发人员进行通信。
As mentioned before back-end development knowledge would be useful but if you have someone doing it, it's not essential for beginning.
如前所述,后端开发知识会很有用,但如果你有人这样做,那么开始时并不重要。
#1
You can make a career of front-end user interface development without know a ton about server code. You would do well though to have at least a rudimentary understanding of what happens on the server when you send it a request, where your data comes from, and what the life-cycle of a web page is. This assumes that you have the support of back-end developers. As you mentioned Ajax in your question that implies that you want your web sites to actually do something, which will require things to happen on the back-end (such as storage, manipulation of data, logging in a user, etc.).
您可以在不了解服务器代码的情况下开展前端用户界面开发的职业生涯。虽然至少可以对发送请求时服务器上发生的事情,数据来源以及网页的生命周期有所了解。这假设您得到了后端开发人员的支持。正如您在问题中提到的Ajax意味着您希望您的网站实际执行某些操作,这需要在后端进行操作(例如存储,数据操作,登录用户等)。
As with all things, the more you know, the easier it will be to get what you want from the dedicated professionals. I would suggest that you learn about programming in general, not try an learn a language and framework. In particular, try to understand datatypes, server settings (like timeouts, post versus get, etc.), security and database interactions as they exist beyond JavaScript/ECMAScript. That way when a developer is explaining why they cannot do something you have requested or are offering alternatives, you are speaking the same language.
与所有事情一样,您知道的越多,从专业的专业人士那里获得您想要的东西就越容易。我建议您一般学习编程,而不是尝试学习语言和框架。特别是,尝试理解除JavaScript / ECMAScript之外的数据类型,服务器设置(如超时,发布与获取等),安全性和数据库交互。这样,当开发人员解释为什么他们不能做你已经请求的事情或提供替代品时,你说的是同一种语言。
#2
You need to know a bit about the server side. Here's what you need to know.
您需要了解一下服务器端。这是你需要知道的。
If you have a heavy JavaScript website, you're likely going to want to pass information from the server to clients with JSON (JavaScript Object Notation). This is just a way to format data into strings that JavaScript knows how to convert to objects.
如果您有一个繁重的JavaScript网站,您可能希望使用JSON(JavaScript Object Notation)将信息从服务器传递给客户端。这只是一种将数据格式化为JavaScript知道如何转换为对象的字符串的方法。
So, each of your server-side functions that send data to the client will return JSON. If you have someone writing the server-side for you, that's all you should have to know. You're JS functions will receive JSON, and then you deal with it.
因此,将数据发送到客户端的每个服务器端函数都将返回JSON。如果你有人为你编写服务器端,那就是你应该知道的全部内容。你的JS函数会收到JSON,然后你处理它。
If you have to write the server-side yourself, then that involves 1) getting data from database 2) formatting the data 3) converting to JSON.
如果你必须自己编写服务器端,则涉及1)从数据库获取数据2)格式化数据3)转换为JSON。
I have open-sourced a commenting widget that accepts JSON messages, and gives examples of how you would set up the Django server code. Maybe it will help you: http://www.trailbehind.com/comment_widget/
我开源了一个接受JSON消息的评论小部件,并给出了如何设置Django服务器代码的示例。也许它会对你有所帮助:http://www.trailbehind.com/comment_widget/
#3
Yes and no. Typically what people think of AJAX, such as posting a comment on YouTube and seeing the comment appear instantly with a thank you message, for example, requires a server side language handling the requests, looking up data and returning results as html snippets, JSON data, or XML.
是的,不是。通常人们对AJAX的看法,例如在YouTube上发表评论以及看到评论立即显示感谢消息,例如,需要服务器端语言处理请求,查找数据并将结果作为html片段返回,JSON数据或XML。
However, an AJAX call can be made to static resources as well. You could have an XML file or html snippet stored statically on your web server and have it loaded. The uses for this sort of static loading are generally fewer because if you already have the static html or data in file next to your regular page, why not just put that data directly into the page?
但是,也可以对静态资源进行AJAX调用。您可以在Web服务器上静态存储XML文件或html代码段并加载它。这种静态加载的用途通常较少,因为如果您已经在常规页面旁边的文件中有静态html或数据,为什么不直接将这些数据放入页面?
#4
It helps to set up a local server and write a few lines of code to service your AJAX calls. You can do a lot of JavaScript learning with just a little back-end learning.
它有助于设置本地服务器并编写几行代码来为您的AJAX调用提供服务。只需一点后端学习,您就可以进行大量的JavaScript学习。
#5
If you're new in web development you'd rather wait with Ajax and server-side languages until you've learnt the basics with HTML, CSS and JavaScript, especially if you want to mostly work with the user interface and not the funcionality.
如果您是Web开发的新手,您宁愿等待Ajax和服务器端语言,直到您学习了HTML,CSS和JavaScript的基础知识,特别是如果您希望主要使用用户界面而不是功能。
#6
As you said you can let somebody else do the back-end and focus on front-end (JavaScript, HTML, CSS).
正如你所说,你可以让其他人做后端并专注于前端(JavaScript,HTML,CSS)。
You would need to communicate with the back-end developer when storing or processing data from the server.
在存储或处理来自服务器的数据时,您需要与后端开发人员进行通信。
As mentioned before back-end development knowledge would be useful but if you have someone doing it, it's not essential for beginning.
如前所述,后端开发知识会很有用,但如果你有人这样做,那么开始时并不重要。