未加星标

Installing Oracle JET for JavaScript Web Development

字体大小 | |
[前端(javascript) 所属分类 前端(javascript) | 发布者 店小二04 | 时间 2016 | 作者 红领巾 ] 0人收藏点击收藏

One of the fun parts of my job as a mobile and development tools product manager, is I'm often given the chance to learn new technologies, without necessarily the pressure of rushing to deliver a project and therefore also rushing learning the technology superficially.

Up untilrecently, I've had the chance to focus on Android, iOS, and NodeJS thanks to Oracle Mobile Cloud Service and its various SDKs for each platform. But finally, a little late given how popular it has been since public release in 2015, I've finally had a chance to kick the, ah, wings of Oracle's javascript Extension Toolkit, commonly known as Oracle JET .

Rather than keep all these useful "learnings" in my head, this time, I thought I'd take pen to virtual paper and describe what I learned along the way, with the goal of sharing this with communities like DZone to help others get started.

So in starting out, in this article I'll focus on the basics of installing Oracle JET for web development which is where everyone, including myself, has to start. Assuming the editors appreciate my efforts and Australian grammer isn't too horrible, I hope to expand this into a series of articles for others to learn from.

What is Oracle JET?

Before discussing how to install the Oracle JET tooling, for anyone not familiar with Oracle JET let's take a quick recap.


Installing Oracle JET for JavaScript Web Development

At its simplest: Oracle JET is a JavaScript toolkit designed to allow you to build client-side applications for both web and hybrid mobile applications too, using a combination of html5, CSS3 and JavaScript. It harnesses a number of modern open-source libraries and frameworks including RequireJS , Knockout , jQuery , and Cordova to build apps. In addition, JET extends upon these by providing a rich UI component set including data visualization components, with built-in accessibility and support for internationalization, web and mobile app templates, and command line tooling.

While Oracle JET is still relatively new to the world of JavaScript developers, it has been used inside Oracle to build out a considerable amount of its new cloud offering websites, latest estimates are approximately 70% of all services. I made the mistake of subscribing to one of our internal JET forums the other dayand had to quickly turn it off, the amount of posts and activity was like drinking from a fire hose!


Installing Oracle JET for JavaScript Web Development

If you'd like to learn more about Oracle JET before continuing on take the chance to visit oraclejet.org for more information. If you'd like to see a JET app in action, check out the demo Work Better app.

How to Install Oracle JET for Web Development

From a developer's perspective looking to start out with Oracle JET by simply installing it, it's useful to explain that Oracle JET is logically split into tooling, that is the code libraries, command line scripts & utilities you will use to build your JET app, and the actual Oracle JET runtime which is the HTML, JavaScript and CSS that runs in the browser or mobile app.

In developing pure web applications (I hope to cover hybrid-mobile apps in another article) using Oracle JET, JET uses several well-known & popular Open Source packages:


Installing Oracle JET for JavaScript Web Development
NodeJS's Node Package Manager used to install the other developer packages Git in conjunction with Github provides access to the source for the other packages Yeoman a web application scaffold tool for creating the shell of each JET app Grunt a'kin to make files of old, used to run tasks to build & run JET apps Bower separate to npm designed to download front-end runtime artefacts Oracle JET the JET tooling and runtime that uses ND extends the other tooling

I'd like to say it's nearly possible to install all of these in 1 command line, but, Git and npm (contained in NodeJS) which must be installed first require a few more steps. Depending if your development machine is running windows, MacOS or linux, you need to download & install a specific installation package for your operating system for both of these. Luckily both Git and NodeJS/npm's website and install instructions are fairly straightforward. It's worth noting for developers not familiar with npm it is installed as part of NodeJS.

Tip: For anyone using Linux, be careful in installing NodeJS/npm using sudo. I'm no Linux expert but this did cause me a world of privilege-grief when I made this mistake. Consider using Node Version Manager (nvm) to manage your NodeJS installs instead.

Having installed Git ANDnpm, via the command line you can then install the rest of the packages in one line using npm. For reference 'yo' refers to Yeoman.npm

At conclusion to check what was installed and what versions, you can issue the following npm command:

npm list -g --depth=0

An example result from my Mac:

/usr/local/lib ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected]

(Note the generator-oraclejet version 1.1.0 does currently not relate to the Oracle JET version (the latest being v2.1), but the version of the template generator & associated Yeoman templates for JET. This will be resolved in a future version of Oracle JET)

In concluding the install you can test the setup by creating a JET application from a supplied Yeoman template and running it. Oracle JET comes with several templates, that essentially create a preconfigured shell for your web application. We'll use the 'navbar' template which will create a Single Page Application (SPA) with several tabs accessing modules such as a dashboard, incidents and customers which is designed to give you a footprint for building your own apps:

yo oraclejet MyWebProject --template=navbar

Tip: If you're on a slow internet connection ensure to be patient and check the process finishes successfully without timing out.

Once the process completes successfully we can then build and serve the application on our development machine via Grunt:

cd MyWebProject grunt build grunt serve And after a second or so you should see

本文前端(javascript)相关术语:javascript是什么意思 javascript下载 javascript权威指南 javascript基础教程 javascript 正则表达式 javascript设计模式 javascript高级程序设计 精通javascript javascript教程

主题: JavaJavaScriptGitLinuxGruntCSSHTMLCSS3HTML5Windows
分页:12
转载请注明
本文标题:Installing Oracle JET for JavaScript Web Development
本站链接:http://www.codesec.net/view/483147.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 前端(javascript) | 评论(0) | 阅读(47)