Preface

The sales figures for smartphones continue to rise exponentially. Tablet computers are showing a similarly phenomenal adoption rate and are replacing laptop computers in many areas of life. We can imagine a time when nearly everyone is carrying around a powerful computer in the form of a smartphone or a tablet. The term mobile device is used to cover such devices. Typically, an app (an application program) for a smartphone or tablet has to be developed in a PC and transferred to the mobile device later. But does it have to be that way? The TouchDevelop project at Microsoft Research has proved that the answer is No. TouchDevelop is a programming environment that runs on all mobile devices. It allows a script to be developed on a mobile device, or on a PC, and to be run on any mobile device or a PC. After releasing the app in 2011 when it was available only for the Windows Phone, the overwhelming response was a big surprised us: more than 200,000 users downloaded the app and they published more than 10,000 scripts written entirely on phones. Since then, TouchDevelop has been made available in a form that runs on PC, Mac and Linux platforms, and on iPad, iPhone, iPod Touch and Android devices. TouchDevelop is truly a portable development environment for creating portable apps.

Who this book is for

Mobile devices represent the latest in technology. Furthermore, many students actually own their own smartphone. High school teachers and college or university instructors love the idea of using the latest technology to engage their students. While they may be experts in the field of teaching programming, many teachers appreciate guidance on how to navigate a complex app like TouchDevelop: its visual program editor is designed for touchscreens and uses different editing paradigms from a traditional keyboard-based text processor. Another opportunity and challenge is how to make use of some of the sensors that a modern mobile device has to offer.

This book has much to offer to both both teachers and self-starting students who are learning how to program on their own. For teachers, it walks in detail through all of the screens of the app, and it points out similarities and differences of the TouchDevelop language compared to other programming languages that the teacher might already be familiar with. For students and enthusiasts, the book can serve as a handy reference which they keep next to the device they are using – it is particularly useful when that device has a small screen. The book systematically addresses all programming language constructs, starting from the very basic constructs such as variables and loops. The book also explores many of the phone sensors and data sources which make creating apps for mobile devices so rewarding.

If you are new to programming with TouchDevelop, or if you have not yet worked on touchscreen devices, we suggest that you read the book starting from Chapter 1. If you are already familiar with the basic paradigm of the TouchDevelop programming environment, then feel free to jump ahead to the later chapters that address particular topic areas.

This book is written from the perspective of a person developing their code using a browser. All screenshots and navigation instructions refer to the TouchDevelop Web App running in a browser and is applicable to all platforms except the Windows Phone. Only Appendix E, which covers the editor on the Windows Phone, uses screenshots and instructions specific to the Windows Phone.

This book is available online as well as being publish in print form by APress. Please email [email protected] to give feedback.

Background to the book

This edition of the book is the result of the year-long evolution of earlier book versions, incorporating feedback from tutorials and lectures given by the authors. The first version of the book was produced as limited edition of 75 copies for the ACM SIGCSE Conference in Raleigh, NC, March, 2012. That book was based on the recently released Version 2.6 of TouchDevelop. An updated copy of the book with 1000 copies, based on Version 2.10, was printed in January 2013. This book was made available via a Creative Commons Licence and put on the Amazon Bookstore as well as the TouchDevelop website. Much of the contents of the second book were also applicable to the Web App version of TouchDevelop, though all the screenshots were still of a phone. This third version has been retargeted at the Web App version of TouchDevelop.

Other learning materials

On the TouchDevelop website, you can also find extensive videos, tutorials and slides to help you learn and teach TouchDevelop. Just tap (or click) on the large tile labeled “Docs” under the “Chat and Learn” heading once you have logged in to the TouchDevelop website to find these learning resources.

Comments are very welcome. To contact the TouchDevelop team or the authors, you can

Acknowledgments

As the TouchDevelop community grows, we are finding that we are learning from everyone who engages in the project – students at Hackathons, academics who write papers, and most of all developers of the amazing apps in the bazaar. Thanks to all of you.

Important websites

https://www.touchdevelop.com

https://www.facebook.com/TouchDevelop

http://research.microsoft.com/touchdevelop

The TouchDevelop Team

preface_image001.jpg Thomas (Tom) Ball is a principal researcher and research manager at Microsoft Research, Redmond, widely known for his work in program profiling, software model checking, program testing, and empirical software engineering. Ball is a 2011 ACM Fellow for "contributions to software analysis and defect detection." Since becoming a manager at Microsoft, he has nurtured and grown research areas such as automated theorem proving, program testing and verification, and empirical software engineering. He holds a B.A. in Computer Science from Cornell University and a M.S. and Ph.D. from the University of Wisconsin-Madison.

preface_image002.jpg Judith Bishop is Director of Computer Science at Microsoft Research, based in Redmond, USA. Her role is to create strong links between Microsoft’s research groups and universities globally, through encouraging projects, supporting conferences and engaging directly in research. Her expertise is in programming languages and distributed systems, with a strong practical bias and an interest in compilers and design patterns. She is the author or editor of 17 books on programming languages. She has a PhD from the University of Southampton, UK in Computer Science.

preface_image002b.jpg Sebastian Burckhardt is a Researcher at Microsoft Research. He was born and raised in Basel, Switzerland. His research interests revolve around the general problem of programming concurrent, parallel, and distributed systems conveniently, efficiently, and correctly. More specific interests include consistency models, concurrency testing, self-adjusting computation, and the concurrent revisions programming model. After a few years of industry experience at IBM, he earned his PhD in Computer Science at the University of Pennsylvania.

preface_image003.jpg Juan Chen is a Researcher in the RiSE group at Microsoft Research Redmond. Her main research areas include compilers, programming verification, and type systems. She has worked on certifying compilers for object-oriented languages, and design and implementation of a functional programming language for specifying and verifying program properties. She has a PhD in Computer Science from Princeton University.

preface_image004.jpg Jonathan ‘Peli’ de Halleux is a Software Engineer in the Research in Software Engineering group at Microsoft Research. Peli also volunteers at the local high school to teach mobile computer science. From 2004 to 2006, he worked in the Common Language Runtime (CLR) as a Software Design Engineer in Test in charge of the Just In Time compiler. He has a PhD in Applied Mathematics from the Catholic University of Louvain, Belgium.

preface_image005.jpg Manuel Fähndrich is a Senior Researcher in the RiSE group at Microsoft Research in Redmond. He works on programming language design, static type systems, program analysis and verification, as well as runtime techniques and optimizations. His past and current project involvements include the Singularity OS and Sing# language, CodeContracts for .NET, and TouchDevelop. He has a PhD from the University of California, Berkeley.

preface_image006.jpg Nigel Horspool is a professor of computer science at the University of Victoria. His main focus for research and teaching has been programming languages and compilers, though his main claim to fame is a string searching algorithm. He is the author or co-author of three books, which cover the C language, Unix and the C# language. He is currently the co-editor of the journal ‘Software: Practice and Experience’. He has a PhD from the University of Toronto, Canada in Computer Science.

preface_image007.jpg Michał Moskal is a Researcher in Redmond. He is in the RiSE group working on software verification, automated theorem proving, and programming languages. He works on a formal verifier for concurrent C programs called VCC, while also taking on other projects including Boogie intermediate verification language, SPUR tracing JIT, and DKAL authorization engine. He has a PhD from the University of Wrocław, Poland.

preface_image008.jpg Arjmand Samuel works with the academic community to foster research and collaborations in the devices and services research areas. He leads the mobile and cloud computing research and outreach for Microsoft Research (Project Hawaii and TouchDevelop). His recent research interests are in software architectures and programming paradigms for devices of all shapes and forms (TouchDevelop and HomeOS). He has published in a variety of publications on topics of security, privacy, location aware access control, and innovative use of mobile technology. Samuel has a Ph.D. in Information Security from Purdue University.

preface_image009.jpg Nikolai Tillmann is a Principal Research Software Design Engineer, Microsoft Research. His main areas of research are program authoring on mobile devices, program analysis, testing, optimization, and verification. He started the TouchDevelop project, which enables end-users to write programs for mobile devices on mobile devices. He also leads the Pex project, in which he develops together with Peli de Halleux a framework for runtime verification and automatic test case generation for .NET applications based on parameterized unit testing and dynamic symbolic execution. Nikolai has a Dipl. Inf. in Computer Science from TU Berlin, Germany.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.205.136