Book Image

Implementing Domain-Specific Languages with Xtext and Xtend

By : Lorenzo Bettini
Book Image

Implementing Domain-Specific Languages with Xtext and Xtend

By: Lorenzo Bettini

Overview of this book

Xtext is an open source Eclipse framework for implementing domain-specific languages together with its IDE functionalities. It lets you implement languages really quickly, and, most of all, it covers all aspects of a complete language infrastructure, starting from the parser, code generator, interpreter, and more. "Implementing Domain-Specific Languages with Xtext and Xtend" will teach you how to develop a DSL with Xtext, an Eclipse framework for implementing domain-specific languages. The chapters are like tutorials that describe the main concepts of Xtext such as grammar definition, validation, code generation, customizations, and many more, through uncomplicated and easy-to-understand examples. Starting with briefly covering the features of Xtext that are involved in a DSL implementation, including integration in an IDE, the book will then introduce you to Xtend as this language will be used in all the examples throughout the book. We then proceed by explaining the main concepts of Xtext, such as validation, code generation, and customizations of runtime and UI aspects. By the end of the book, you will have learned how to test a DSL implemented in Xtext with Junit, in order to follow a test-driven development strategy that will help the developer implement maintainable code that is much faster and cleaner. A test-driven approach is used throughout the book when presenting advanced concepts such as type checking and scoping. The book also shows you how to build and release a DSL so that it can be installed in Eclipse, and gives you hints on how to build the DSL headlessly in a continuous integration server. "Implementing Domain-Specific Languages with Xtext and Xtend" aims to complement the official Xtext documentation to explain the main concepts through simplified examples and to teach the best practices for a DSL implementation in Xtext. It is a Beginner's Guide which should set you up for professional development DSL and its Eclipse IDE tooling.
Table of Contents (21 chapters)
Implementing Domain-Specific Languages with Xtext and Xtend
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
13
Bibliography
Index

About the Reviewers

Dr. Jan Koehnlein is a core committer of the Xtext project and the Xtend language. He has several years of experience in model-driven software development and on the Eclipse platform. Jan is currently working as a consultant and software architect for itemis in Germany.

Henrik Lindberg has worked for many companies since the early 80s, and he has had the opportunity to work with most aspects of software development from operating systems to applications as a developer, architect, CTO, and founder.

He is currently CTO and founder of Cloudsmith Inc, a Puppet Labs Inc. partner specializing in services and tools for the creation, testing, and deployment of software stacks in local and cloud infrastructures. Prior to Cloudsmith, he ran the BEA/JRockit development office (now Oracle's JVM division).

Henrik always had a passion for computer languages and parser technology, and he has worked with Eclipse Xtext on several projects, most recently the Puppet Language IDE called Geppetto. He is an Eclipse committer on Eclipse p2 and leads the Eclipse Buckminster and b3 projects. He is a frequent contributor to the Xtext forum.

You can contact him on Twitter as @hel and also on the Eclipse and Puppet IRCs with the tag helindbe as well as on the Eclipse forums.

Pedro J. Molina is a practitioner and researcher in the field of model-driven development. From his masters thesis in 1998 to his PhD in 2004, he worked on the research of conceptual user interface patterns for code generation on business applications and published more than 20 papers and 2 books.

Within industry, he has been working for CARE Technologies developing commercial code generators and doing consultancy and software architecture for Capgemini. Nowadays, he is the chief architect officer for Icinetic, a firm building modeling and code generation tools with a strong focus on architecture.

Pedro has been taking part in the program committee for Code Generation Conference for the last 7 years and keeps up-to-date with industrial MDD efforts. He maintains a blog: The Metalevel, where he talks about MDD and code-generation at http://pjmolina.com/metalevel.