Introducing Dart

An exciting and immersive introduction to learning client side Dart programming
2.5 (1 rating)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
30 students enrolled
$19
$50
62% off
Take This Course
  • Lectures 21
  • Length 1 hour
  • Skill Level Beginner Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 8/2015 English

Course Description

As the internet becomes more of an application platform, the need to develop more feature-rich and immersive applications grows! Dart is a fantastic class-based, object-oriented language that pushes back on the idea that JavaScript should have a monopoly on web application development. It can be used both server side (dartVM) and client side (web browser) to build any application from a simple script to a full-blown 3D web game.

Introducing Dart is a joyride of game programming where the user harnesses the power of the Dart programming language. The techniques shown in these videos can easily be applied and expanded upon to create any kind of interactive web application.

We begin by learning how to install the Dart development environment, and how to get started using the Dart Editor. We then walk through building our game step-by-step until we are left with a fully functional game called “Dart Worm”.

At the first step you will be introduced to the Dart SDK and the Dart editor software. This will provide the environment where we will design and develop our main project. Then you will learn how to use Dart to access the elements on a web page (called the DOM). Once these elements are accessed you will be shown how to manipulate them by calling methods, and how to add and remove elements from the DOM dynamically.

As we move on we will be covering specific Dart classes that will help us bring the different components of our game to life. We will learn how to animate our game, keep score, and present the user with controls. Eventually, we will be putting everything we learned together and building our final game.

When you have completed these videos, you will have all of the tools necessary to build and deploy a fully functional web application using the Dart programming language.

About The Author

James Slocum is a Software Developer for TelVue, and an adjunct Computer Science professor at Mercer County Community College. He studied Computer Engineering and Computer Science at the New Jersey Institute of Technology, graduating in 2008. His first article about Dart was featured in the March 2013 (#227) issue of Linux Journal.

What are the requirements?

  • No experience with other programming languages is necessary, although it may help.

What am I going to get from this course?

  • Get up and running with the Dart development environment and Dart Editor
  • Produce clean and reliable codes using classes to organize ideas
  • Handle user events like keyboard presses and mouse movements to change the behaviour of your application.
  • Become more fluent with the core Dart tools such as Pub and Dart2js
  • Combine the power of CSS with Dart to create stunning effects and animations.
  • Use the dartlang API resource to expand on the classes, methods, and functions discussed.
  • Create and deploy visually attractive, interactive, and immersive web applications

What is the target audience?

  • You will get the most from this video course if you are already familiar with web development technologies such as HTML5 and CSS3.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Getting Started with the Dart Editor
01:58

This video will offer the overview of the course.


02:08

We want to start programming in Dart. We first need to install the Dart SDK and editor software so that we can begin programming. We can find this software at www.dartlang.org.

03:39

Now that we have the editor installed, you need to learn how to start a new project. We will choose file|new project. Then we add a new file to our project, and finally we run our project.

03:27

Now that we know how to make a new project, we want to start our Worm project, where we will be doing our work for the rest of the videos.

04:51

Before we can start creating a web application, we need to lay out the template HTML and CSS. We will add HTML and CSS to our project so that we can begin adding worms and food on the screen.

Section 2: Interacting with the DOM Using Dart
03:02

We need some way to access the HTML objects laid out in the DOM so that we can manipulate them.


02:03

Now that we have accessed an element, what are the things we can do with it? How do we change its properties?

03:11

We need some way of adding new elements to the DOM, and taking some away. We will explore how we can do this.

Section 3: Putting Some Boogie in the Worm
04:20

In our game, the worm needs some food objects on the screen to eat and grow longer. We will be implementing the basic style for our worm's food and testing it with static HTML.

02:29

It is not very interesting for the player if the food objects always appear in the same place. So, we will use the dart:math:Random class to generate random positions for our food objects.

02:35

As of now, we don't really have a game because nothing is moving. To get things moving, we will be using the Timer class in the dart:async library to trigger periodic events.

03:27

Our project is starting to grow, in both size and complexity, and we don't want it to get out of hand. We need to start breaking our parts into classes and utilizing the OOP facilities that are provided by Dart.

Section 4: Reacting to Key Press Events
02:05

Right now, we have no way for the user to control the game. We will use the onKeyPress() method provided by the dart:html:Document object to handle key press events and make the DOM react.

01:42

Now that we can react to any key being pressed, we need a way to figure out which key was pressed and react differently, depending on the result. To do this, we will expand our callback and use the KeyboardEvent.charcode property to figure out which key was pressed.

03:29

Now that we are getting the game controls in place and functional, it is a good time to implement the pause, resume, and reset functionality. We are presenting this here because we will be using these functions when wrapping up the development process in the next section.

Section 5: Putting the Game Together
02:59

So far, we have created the individual parts of the game and gotten them animated and under the control of the user. Now we must program the interactions between all the elements.

03:12

Now that we know whether the worm intersects with food objects, we need to know whether it goes out of bounds, or runs into itself. We can also set a score that means that the user has won if they achieve it.

02:14

Now that our base game is complete and playable, how do we release it to players all over the world? We can compile our game to JavaScript and it can be played on other browsers.

Section 6: Adding Some Flair
03:04

We now have our complete basic game, but we want to add some more flair to the game. We can expand our CSS to make our game more presentable.

04:53

We have our game over and game winning scenarios, but they are boring. We can use CSS animations to help make these announcements more presentable.

03:14

Our game is now complete, but is it really? What else can we do to make it better?

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Packt Publishing, Tech Knowledge in Motion

Over the past ten years Packt Publishing has developed an extensive catalogue of over 2000 books, e-books and video courses aimed at keeping IT professionals ahead of the technology curve. From new takes on established technologies through to the latest guides on emerging platforms, topics and trends – Packt's focus has always been on giving our customers the working knowledge they need to get the job done. Our Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.

Ready to start learning?
Take This Course