Rough Cuts are manuscripts that are developed but not yet published, available through Safari. Rough Cuts provide you access to the very latest information on a given topic and offer you the opportunity to interact with the author to influence the final publication.
This is a working draft of a pre-release book. It is available before the published date as part of the Rough Cuts service.
Ruby has built an enormous following of developers attracted by its intuitiveness, flexibility, and simplicity. Meanwhile, Microsoft’s .NET has grown and matured into a platform of unparalleled power. IronRuby brings them together, enabling developers to write elegant, efficient Ruby code that seamlessly integrates with .NET objects and leverages .NET’s full capabilities. Now, in IronRuby Unleashed, one of IronRuby’s most respected early adopters demonstrates how to write outstanding production software with the brand new IronRuby 1.0.
Writing for both Ruby and .NET developers, Shay Friedman covers every facet of IronRuby programming. Friedman begins by explaining how IronRuby leverages the new Dynamic Language Runtime (DLR) libraries to run atop the .NET Framework and access its resources. Next, he presents an in-depth IronRuby tutorial that ranges from basic syntax and object-oriented programming techniques through advanced concepts. Building on this foundation, you’ll learn how to make the most of a broad spectrum of .NET platform features.
IronRuby Unleashed thoroughly illuminates the use of IronRuby and .NET with today’s most powerful frameworks and technologies, including WPF, ASP.NET MVC, Ruby on Rails, and Silverlight. You’ll also find detailed coverage of unit testing, as well as cutting-edge techniques for extending IronRuby with C# or VB.NET.
Detailed information on how to...
Introduction 1
Part I Introduction to IronRuby
1 Introduction to the Ruby Language 5
History of the Ruby Language 5
Implementations 6
Features 6
Dynamic Language 6
Object Oriented 7
Duck Typing 8
Metaprogramming 9
REPL 10
Available Libraries 11
2 Introduction to the .NET Framework 13
History of the .NET Framework 13
Overview 15
Features 16
Common Language Infrastructure 16
Assemblies 18
Base Class Library 19
Security 19
Memory Management 19
Frameworks 20
3 Introduction to the Dynamic Language Runtime 21
Overview 22
Features 23
Common Hosting Model 23
Runtime Components 23
Language Implementation 24
4 Getting Started with IronRuby 25
Overview 25
Installing IronRuby 26
IronRuby Folders 29
Getting the Sources 29
Executables and Tools 30
The IronRuby Interpreter (ir.exe) 31
File Execution Mode 32
Development Environments 34
Ruby in Steel 34
NetBeans 35
RubyMine 36
Others 37
The Power of IronRuby 38
Part II The Ruby Language
5 Ruby Basics 43
Basic Syntax 43
Comments 43
Setting Values to Variables 44
Calling Methods 45
Code File Structure 46
Coding Standards 47
Hello World 48
Variables 48
Numbers 48
Text 50
Arrays 54
Hashes 57
Ranges 59
Booleans 60
Regular E
