Aptana Radrails: an IDE for Rails Development Develop Ruby on Rails Applications Fast Using Radrails 1.0 Community Edition
Total Page:16
File Type:pdf, Size:1020Kb
Aptana RadRails: An IDE for Rails Development Develop Ruby on Rails applications fast using RadRails 1.0 Community Edition Javier Ramírez Chapter No. 7 "RadRails Views" In this package, you will find: A Biography of the author of the book A preview chapter from the book, Chapter NO.7 "RadRails Views" A synopsis of the book’s content Information on where to buy this book About the Author Javier Ramírez has been developing Web Applications since before the term Web Application was coined. Born in Zaragoza, Spain, in 1974, he started programming as a hobby around the age of 11 assisted by his older sister. A few years later, he got his first modem and became a regular of BBSes and Newsgroups. His interest in developing server applications that can be accessed remotely comes from those times. He has learned—and forgotten—many programming languages, including Basic, dBase III, Cobol, Pascal, SQL, C, C++, ASP, TCL, JavaScript, PHP, and Java, the language on which he has focused for most of his career so far. He has held the positions of programmer, analyst, consultant, team leader, post-sales engineer, project manager, and software architect, totaling over 12 years in the IT business. Having developed projects mainly for banks and other big corporations in Spain, Italy, and the US, he co-founded some years ago a small software development shop, which provided him with valuable experience about the difficulties and the joys of entrepreneurship. After two years, he left the company in pursuit of new professional challenges. For More Information: www.packtpub.com/aptana-rapid-rails-development/book For the last two years, he has been proudly working for ASPgems, where he discovered Ruby on Rails, which soon became his framework of choice for developing Web Applications. He is one of the organizers of the Spanish Rails Conference, also participating as a Speaker in the two events held so far. He has also been an instructor on Robotics, Java, FatWire Content Server, and Ruby on Rails, and a University Lecturer in the subjects of 'Software Engineering' and 'The Java Programming Language', which he currently teaches at Universidad Francisco de Vitoria, in Madrid. Javier Ramírez holds a B.Sc. in Business Information Systems with First Class Honors and a degree in Ingeniería en Sistemas de Computación This book would have not been possible in its present form if not for the work of the people at Packt Publishing. I'd like to thank specially to Acquisition Editor Shayantani Chaudhuri for giving me the opportunity to write this book and to Technical Editor Bhupali Khule for polishing the rough edges, which were many. Abhijeet, Adil, Shantanu, and Patricia also deserve to be in this list. I would also like to acknowledge the fantastic work of the original team of RadRails, and also of the developers behind Eclipse. A big special thank you goes to Chris Williams, the current lead developer of Aptana RadRails and the technical reviewer for this book. He provided me with precious insight about a large number of issues. Of course, any errors that might remain in the book are my own. Thanks to the people at ASPgems, for trusting me to join one of the most gifted team I know and for introducing me to Ruby on Rails. I also have to thank Madzia, who gently allowed me to disappear for uncountable evenings and weekends during the last nine months without complaining—or without complaining much anyhow. Finally, but not least important, I would like to thank my parents for supporting my education. A part of this book—the good one—wouldn't have been possible without all of them. For More Information: www.packtpub.com/aptana-rapid-rails-development/book Aptana RadRails: An IDE for Rails Development Develop Ruby on Rails applications fast using RadRails 1.0 Community Edition Coming from a background of developing in languages such as Java, one of the things that surprised me the most about the Ruby and Rails community, was the common practice of not using an Integrated Development Environment. Most of the members of the community, including the most relevant, were comfortable with just a programmer's editor. At first I thought it was because, Ruby being a dynamic language, using a full IDE might be an overkill. But then I thought of the PHP community, in which several IDEs are popular, with PHP also being a dynamic language. So I still had to guess why using an IDE was not a common practice within the Ruby on Rails world. Nowadays, there is a growing list of IDEs with support for Ruby on Rails, but two years ago the options were really scarce. Back then, I chose to use RadRails because it worked on top of the Eclipse IDE—which was the tool I was already using for other programming languages—and because it was the only free, open source, and portable option. Truth is, the first version of RadRails I used was very promising, but still a bit too basic. It featured just a few specialized tools, Ruby syntax colorization, and a slow and faulty code-assistance. As a result, the difference between RadRails and a good programmer's editor was not really significant. However, as Ruby on Rails gained popularity, RadRails was vastly improved, and a lot of new features were added. At the same time, several other IDEs started to provide support for Ruby too. Today, even if many Ruby on Rails developers still don't use an IDE, a growing number of them already. During these two years, I've been developing projects almost exclusively with Ruby on Rails; and I developed all of them using RadRails. Of course I have been keeping an eye on every new IDE with Ruby support, just to see if there were any reasons for changing, but I still didn't find any. For More Information: www.packtpub.com/aptana-rapid-rails-development/book To me, writing this book is a way of contributing back to the RadRails project. I hope this book will help the existing community of users of Aptana RadRails, and will also help new users to start working with this tool. Besides, thanks to the Packt Open Source Project Royalty Scheme, a part of the benefits will be directly paid as a royalty to the RadRails project, so by purchasing this book you are funding a bit of the Community Edition of Aptana RadRails. What This Book Covers This book will show you how to get the most of the Community Edition of Aptana RadRails for developing Ruby on Rails projects. Apart from the features provided by RadRails, the book will give you an overview of working with the Eclipse IDE, and will show you how to use the Eclipse functionalities that are relevant for Ruby and Rails development. This book is not about the Ruby programming language or the Ruby on Rails framework. Even if you don't need to be an expert, you should already be familiar with the language and the framework to get the most from this book. Chapters 1 and 2 will show you how to install and configure Aptana RadRails, and will help you find your way around the Eclipse IDE. If you have previous experience with Eclipse , and you have already installed Aptana RadRails, then you can proceed directly to Chapter 3. Chapters 3 to 8 are a complete reference to each of the components of RadRails, including all the configuration options. Finally, in Chapter 9 you will find documentation about some complementary plugins you can use for connecting to a database and for managing your source repositories. You can find below a brief introduction to each of the chapters. Chapter 1: This chapter will introduce you the concept of IDE and will give you a general overview of what you can expect from Aptana RadRails. You will also find instructions about how to install Aptana RadRails and the Eclipse IDE in your system. Even if you should already be familiar with the installation of Ruby and Rails, the chapter also provides a quick reference for installing Ruby and Ruby on Rails on Windows, Linux, and OSX. Chapter 2: In most cases, Aptana RadRails will work directly out of the box. However, in some cases you will need to make a minimal configuration of the IDE. The first part of this chapter will show you the basic configuration of RadRails. For More Information: www.packtpub.com/aptana-rapid-rails-development/book Chapter 3: Two of the basic tools RadRails provides are the Ruby Explorer and the Console View. With the Ruby explorer you will be able to browse the structure of your projects and perform any kind of file-related operations, including working with the local history of your files. The console view will display the output of most of the processes we will launch from RadRails. Apart from learning how to use these views, we will show how to use Generators and Rake Tasks from Aptana RadRails to create a simple demo application. You will also learn how to start and stop your servers and how to use the built-in browser to watch your application in action. Chapter 4 explains in detail all the built-in capabilities of RadRails for developing Ruby code. You will learn to use the Ruby Editor to write your source code, to navigate between the different classes and files, and to get the most out of code completion and the code templates. Chapter 5: One of the strong points of Aptana RadRails is the great support for the client- side of your application: JavaScript, HTML, and CSS.