Javascript及其生态系统

Javascript is a dynamically typed, interpreted programming language.

Javascript是一种动态类型的解释型编程语言。

In simple words, it is a language where you do not explicitly mention the type of data.

用简单的话来说,这是您没有明确提及数据类型的语言。

For e.g. in a static typed language like Java, you will have

例如,对于像Java这样的静态类型语言,您将拥有

int a = 6; char b = 'c';

int a = 6; char b = 'c';

This clearly tells us that the variable a is of type int(holds integer values and that the variable b is of type char(hold character values).

这清楚地告诉我们,变量a是int类型(持有整数值),变量b是char类型(持有字符值)。

Now if we try to assign a string to variable a in Java

现在,如果我们尝试为Java中的变量a分配一个字符串

a = "Yajur"

a = "Yajur"

It will not be allowed

不允许的

In Javascript, a dynamically typed language, we can have something like this

在Javascript(一种动态类型的语言)中,我们可以像这样

let a = 6; let b = 'c';

let a = 6; let b = 'c';

As you see both of the variables use let(you can also use var or const)

如您所见,两个变量都使用let (也可以使用varconst )

In addition to that if you want to change a to a string variable you can simply do it by

除此之外,如果您想将a更改为字符串变量,则可以通过

a = "Yajur"

a = "Yajur"

An interpreted language is where the code is executed line by line, as opposed to a compiled language where the whole code is converted into machine code by something called as a compiler and then it is executed.

解释语言是一种代码,一行一行地执行,而编译语言则是将整个代码通过称为编译器的东西转换为机器代码,然后执行。

The advantage of interpreted languages being that it can run anywhere.

解释语言的优点是它可以在任何地方运行。

Javascript (1995)When Javascript was initially created in the ’90s, it was created to be run on the web browser called Netscape. So when a webpage contained Javascript, the browser would executed it. It is with the help of Javascript that we were able to make web pages interactive. For e.g. perform this action when user clicks on a button, route the user to the next page when he clicks on “Submit” button, etc.

Javascript(1995) Java最初是在90年代创建的,其创建目的是在名为Netscape的Web浏览器上运行。 因此,当网页包含Javascript时,浏览器将执行它。 借助于Javascript,我们能够使网页具有交互性。 例如,当用户单击按钮时执行此操作,在用户单击“提交”按钮时将用户路由到下一页,等等。

Often times, people get confused with Java, however it is to be noted that both of them are totally different programming languages. There are some syntactical similarities but apart from that, Javascript is a dynamically typed language and Java is a statically typed language. Javascript is an interpreted language and Java is a compiled language. Javascript was created for the client-side(web-browser) and Java was created to run on appliances, server-side.

通常,人们对Java感到困惑,但是要注意的是,它们都是完全不同的编程语言。 在语法上有一些相似之处,但除此之外,Javascript是一种动态类型的语言,而Java是一种静态类型的语言。 Javascript是一种解释语言,而Java是一种编译语言。 Javascript是为客户端(web-browser)创建的,而Java是为在服务器端的设备上运行而创建的。

JQuery (2006)The use of javascript on the client side was growing however the syntax was verbose and hence a library called JQuery was created in 2006. Developers loved JQuery and within no time, JQuery was ubiquitous on the web. This link to w3techs will tell you how popular JQuery still is.

JQuery(2006)客户端上使用javascript的情况在增长,但是语法过于冗长,因此在2006年创建了一个名为JQuery的库。开发人员喜欢JQuery,并且在任何时候,JQuery在网络上无处不在。 w3techs的此链接将告诉您JQuery仍然很流行。

NodeJs (2009)Up until 2009, Javascript was always executed on the web browser, until a Javascript runtime environment called Node.js was created that could run Javascript outside the web browser. Prior to NodeJS, the standard architecture of most of the web applications was that there used to be a server side written in Java, C# or Python and then there used to be a client side which consisted of Javascript, HTML and CSS. However with the advent of NodeJS, you can now actually write an entire web application in one programming language i.e. Javascript.

NodeJs(2009)直到2009年,Javascript始终在Web浏览器上执行,直到创建了一个称为Node.js的Javascript运行时环境,该环境可以在Web浏览器之外运行Javascript。 在NodeJS之前,大多数Web应用程序的标准体系结构是曾经有一个用Java,C#或Python编写的服务器端,然后是一个包含Javascript,HTML和CSS的客户端。 但是,随着NodeJS的出现,您现在实际上可以使用一种编程语言(即Javascript)编写整个Web应用程序。

Node Package Manager — NPM (2010)The following year in 2010, the node package manager(npm) was created that allowed developers to share code and re-use existing code components(analogous to libraries in .NET, jar files in Java, packages in R, modules in Python)

节点软件包管理器— NPM(2010)在第二年,2010年,创建了节点软件包管理器(npm),使开发人员可以共享代码并重用现有的代码组件(类似于.NET中的库,Java中的jar文件,软件包在R中,在Python中是模块)

AngularJS (2010)Angular is one of the most popular front end framework maintained by Google that was build to develop single page applications(SPA). Although when it was first created it was in javascript, starting from Angular 2(called just Angular), it uses typescript(which eventually transpiles into javascript). Angular is backed by google and is a highly opinionated framework. It has a steep learning curve but once you learn it, you can build robust and great web applications.

AngularJS(2010) Angular是Google维护的最流行的前端框架之一,该框架旨在开发单页应用程序(SPA)。 尽管最初创建它时是在javascript中,但从Angular 2(简称Angular)开始,它使用的是typescript(最终会转换为javascript)。 Angular由Google支持,是一个高度自以为是的框架。 它具有陡峭的学习曲线,但是一旦学习,就可以构建健壮且出色的Web应用程序。

React (2013)React is a javascript library but is also used to develop SPA’s as well. React was developed at Facebook and is the most popular of the three technologies(namely Angular, React and Vue) used to develop web applications in today’s day and age. The advantage with React(and also Vue) is that it is a library. So you can just include this library in any web application and use only the parts that you need as opposed to Angular, where you need to play by Angular rules. The learning curve is relatively simple when compared to angular and once you learn it, there is a huge community on stack overflow that will help you build amazing web applications

React(2013) React是一个javascript库,但也用于开发SPA。 React是在Facebook上开发的,是当今时代用于开发Web应用程序的三种技术(即Angular,React和Vue)中最受欢迎的技术。 React(还有Vue)的优点是它是一个库。 因此,您可以仅将此库包含在任何Web应用程序中,并仅使用所需的部分,而不是需要按Angular规则进行操作的Angular。 与角度学习相比,学习曲线相对简单,一旦学习,堆栈上就会有一个庞大的社区,可以帮助您构建出色的Web应用程序。

VueJS (2014)VueJS is another javascript library developed by Evan You. It is quickly rising in popularity and the reason for that is its simplicity and customizability. Like React, Vue is a library so you can build a whole web application in Vue or use parts of Vue in a web application. Of the three technologies(Angular, React and Vue) Vue has a gentle learning curve and is quickly growing its community.

VueJS(2014) VueJS是Evan You开发的另一个JavaScript库。 它正在Swift普及,其原因是其简单性和可定制性。 与React一样,Vue是一个库,因此您可以在Vue中构建整个Web应用程序,也可以在Web应用程序中使用Vue的一部分。 在三种技术(Angular,React和Vue)中,Vue拥有缓慢的学习曲线,并且正在Swift发展其社区。

React Native (2015)React Native is a javascript framework to develop mobile applications. It uses the javascript engine on the developers machine to help you build mobile applications. React Native uses the same JSX syntax just like react and the best part is you can just use one language to develop a mobile app as opposed to using Objective-C or Swift for iOS and Java for Android.

React Native(2015) React Native是一个用于开发移动应用程序JavaScript框架。 它使用开发人员计算机上的javascript引擎来帮助您构建移动应用程序。 React Native和react一样使用相同的JSX语法,最好的部分是您可以只使用一种语言来开发移动应用程序,而不是使用iOS的Objective-C或Swift和Android的Java。

We hope that this article gave you a good background on Javascript and the various other technologies associated with it. If you have any questions about which libraries to choose or how to architect your next application, feel free to reach out to me at nikhidas@gmail.com

我们希望本文能为您提供有关Javascript及其相关各种其他技术的良好背景。 如果您对选择哪个库或如何构建下一个应用程序有任何疑问,请随时通过nikhidas@gmail.com与我联系。

翻译自: https://medium.com/swlh/javascript-and-its-ecosystem-8e42af213ba2

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值