HX101 Introduction to Cross-platform Development with Haxe
This course will provide an overview of cross-platform development using Haxe, a high-level programming language that compiles to multiple targets. With examples and hands on exercises of creating command line programs, interactive web pages, and graphical mini games, you will find it easy to adopt Haxe for your own use.
In this course, we will learn Haxe programming as well as general best practices of cross-platform development. We will discover some important Haxe features (e.g. conditional compilation, inlining, externs) that make Haxe highly suitable for cross-platform development. We will also walk through some advanced features, like pattern-matching and compile-time macros, to highlight some benefits of using a modern high-level language to target a relatively traditional low-level language like Java and C++. By using these Haxe features and following best practices, we can abstract away platform differences while having run-time performance close to, or even better than, using the target languages directly.
The course is hands on. We will learn through creating a number of small applications. In the beginning, we will create text-only command line programs, which are easy for us to master basic programming constructs. We will quickly move on to full-stack development by writing interactive web pages, for which we will implement both client and server logics in Haxe. Lastly, we will create mini games to explore some advanced Haxe features and cross-platform development concepts.
How To Pass
Pass all graded assignments to complete the course. Assignments consist of multiple-choice questions and small programming exercisers.
Hours of Effort per Week
We expect each student will use 5-7 hours per week.
The course consists of 6 sections. Each section contains lecture videos and assignments related to a particular topic. When the course begins, we will release one section each week. Students are advised to complete the section within the week, however, there will be no penalty for late assignment submission except that they have to be submitted before the end of the course.
Section 1 - Getting Started + Basic Programming Constructs
Get up and running with Haxe on our computer. We step through the basics of Haxe, including variables, conditionals, loops, and functions.
Section 2 - Object-oriented Programming and Functional Programming
Learn how Haxe fits into object-oriented programming and functional programming - two popular programming paradigms. We study the Haxe type system with a focus on classes, interfaces, functions, and enums (abstract data types).
Section 3 - Full-stack Web Development
Explore both client-side and server-side web development concepts. We will cover conditional compilation and extern system.
Section 4 - Interoperation and Communication
Learn more about how Haxe code interoperates with the libraries and APIs provided by the target language.
Section 5 - Performance Tuning
Know the various performance optimization techniques we can utilize to fine tune programs. Study Haxe's function inlining, static analysis, and conditional compilation.
Section 6 - Compile-time Macros
Peek into the power of Haxe macros, which is the ultimate feature that allows us to write programs using programs.
The Teaching Team
Andy Li (instructor)
Andy is a member of the Haxe Foundation. He maintains various aspects of the Haxe toolkit, including the software packages, continuous integration/deployment, the websites, the jQuery externs etc. He has over 6 years of Haxe programming experience , and he enjoys speaking about Haxe in conferences like World-Wide Haxe (WWX), Hong Kong Open Source Conference (HKOSCon), and PyCon HK.
Andy obtained a Ph.D. in the School of Creative Media, City University of Hong Kong. His research interests fall in the field of mobile human-computer interface, interactivity, and augmented reality. During his Ph.D. study, he taught a number of bachelor degree courses about video games and interdisciplinary practices, and this was how he learned the joy of teaching.
more to come!
What Haxe targets will be covered in the course?
Does this course provide enough knowledge for me to become a professional (web / game / software) developer?
This course is a general overview of cross-platform development with Haxe. It is too short for us to cover the detail of any particular domain. However, this course will equip you with much necessary knowledge and hands on experience for mastering Haxe and becoming a professional. We plan to offer specialized courses for using Haxe in some particular domains in the future.
Can I take the course if I'm not good at programming?
This course is positioned as a beginner course, so it does not require too much programming skill to begin with. We expect you to have some programming experience with any programming language. Having completion of a basic programming course in school would be perfect, but optional. However, if you know nothing about computer programming, we expect this course would be too difficult for you, although we wouldn't stop you from trying ;)
I'm a professional developer. Will the course be too boring for me?
If you are proficient in a language other than Haxe, you will enjoy discovering Haxe and how it's different from the one you are using. Different languages gives you different solutions to a problem. By learning one more language, you will have one more tool, unless the language can compile to multiple targets - you will gain more than one tool ;)
If you are already using Haxe, this course will be a good refresher of the Haxe basics. You will also have a much solid understanding of how Haxe is designed to ace in cross-platform development. You are also invited to help other Haxe beginners by answering questions in the course discussion forum. We are sure you will learn something by teaching others!
What OS / IDE / text editor should I use?
Haxe itself is cross-platform - you can use it on Windows, Mac OS X, or Linux. For IDE / text editor, we will cover setting up HaxeDevelop and Visual Studio Code with Haxe support. You may also try the other ones listed in the Haxe website.
How much will the course cost?
You can complete this course and access all the course materials for free.
Optionally, you can obtain a completion certificate signed by the course instructor and be recognized by the Haxe Foundation for a fee that is well worth. More info coming soon.
How the course is built? Can I contribute?
The course is built with using a combination of Git, GitLab, GitBook, and YouTube. Contribution is of course welcome! Take a look at the Development Info.