前端的定义
维基百科中关于前端 (Front-end web development )的定义是
Front-end web development is the development of the graphical user interface of a website, through the use of HTML, CSS, and JavaScript, so that users can view and interact with that website.
“前端开发”就是使用 HTML, CSS, 和 JavaScript,技术给一个网站或 Web 应用开发图形用户界面(graphical user interface)。
所以前端开发本质上是一个GUI应用程序,当前前端时间GUI应用程序主要有3中典型的形态:
Web : 以浏览器为运行环境,基于浏览器内核支持的编程语言、API 来实现,被浏览器解释执行
Native : 以操作系统为运行环境,基于操作系统原生支持的编程语言、API 接口实现,以二进制包的形式运行
Hybird: 基于 Native 应用提供的一个支持 HTML、CSS、JS 的容器(外壳)开发的应用,相当与用开发 Web 的方式开发 Native 应用
Hybrid :apps are essentially web apps that have been put in a native app shell. Once they are downloaded from an app store and installed locally, the shell is able to connect to whatever capabilities the mobile platform provides through a browser that's embedded in the app.
当前3中形态主要分歧在量大GUI的技术流派 web 和 Native。他们的差异在于:
运行环境的不同,web运行在浏览器中,给前端带来了很多优势,比如:实时更新、跨平台、跨终端、开发成本低等;但也带来了很多不便,比如:无法最大程度利用设备的特性和能力、无