O'Reilly logo

Dart: Scalable Application Development by Ivo Balbaert, Sergey Akopkokhyants, Davy Mitchell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Object Orientation

In this chapter, we will cover the following recipes:

  • Testing and converting types
  • Comparing two objects
  • Using a factory constructor
  • Building a singleton
  • Using reflection
  • Using mixins
  • Using annotations
  • Using the call method
  • Using noSuchMethod
  • Creating toJSON and fromJSON methods in your class
  • Creating common classes for client and server apps

Introduction

Dart, although optionally typed, is an object-oriented language like Ruby, so it is an object. This is in contrast to JavaScript, where object orientation is not inherent in the language and was added later in different ad hoc ways. We can expect huge benefits from working with a real object-oriented language to build our client web applications. So, let's delve a bit deeper ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required