Presentation is loading. Please wait.

Presentation is loading. Please wait.

NetBeans & Ruby David Botterill Software Engineer Global Technology Manager - Campus Ambassador Program Sun Microsystems, Inc.

Similar presentations


Presentation on theme: "NetBeans & Ruby David Botterill Software Engineer Global Technology Manager - Campus Ambassador Program Sun Microsystems, Inc."— Presentation transcript:

1 NetBeans & Ruby David Botterill Software Engineer Global Technology Manager - Campus Ambassador Program Sun Microsystems, Inc.

2 2 Agenda Ruby JRuby Ruby on Rails NetBeans Ruby Support Next Steps

3 Ruby

4 4 Invented by Yukihiro Matsumoto (“Matz”) starting in 1993 > Goal: “Make Ruby natural, not simple” Released to the public in 1995 Popularity began in 2000, jumped in 2006 with Rails web framework

5 5 Ruby Ruby is an object-oriented programming language Ruby is a single-pass interpreted language The official implementation is free software written in C Ruby has a package manager called “RubyGems” that manages packages called “Gems”

6 6 Everything, including a literal, is an object Array and Hash support Ruby Language Basics Ruby

7 7 Demo Everything an Object Arrays and Hashes

8 8 Blocks and iterators > A block is defined between “{ }” or “do end” > An iterator is a method that processes blocks > The iterator “yield”s to the block > The block is a set of code that can process values from the iterator Ruby Language Basics Ruby

9 9 Demo Blocks and Iterators

10 10 Mixin > Ruby supports “Module”s - a collection of methods > Ruby only supports single inheritance > A Ruby class can “mixin” one or more modules to take advantage of the methods in the module Ruby Language Basics Ruby

11 11 Demo Mixins

12 12 Variables > Ruby is strongly typed > Ruby is dynamically typed > var.kind_of? Scope > var – could be a local variable > @var – instance variable > @@var – class variable > $var – global variable > Var – constant (can be changed in Ruby) Ruby Language Basics Ruby

13 13 Demo Variable Scope

14 14 Metaprogramming - “Programs that write programs” > missing_method > Code evaluation “class_eval” > Ability to add methods dynamically to an existing class even built-in classes Ruby Language Basics Ruby

15 15 Demo Metaprogramming

16 16 “Duck Typing” > If it walks like a duck and sounds like a duck, treat it like a duck > The class's methods are the important part, not the type > In other words, the objects action abilities are what's important regardless of what type of object it is > Eliminates casting > Natural for a language that is dynamically typed Ruby Language Basics Ruby

17 17 Demo Duck Typing

18 JRuby

19 19 JRuby is a Java Implementation of the Ruby Language JRuby is free software released under a three-way CPL/GPL/LGPL license. JRuby is tightly integrated with Java to allow the embedding of the interpreter into any Java application with full two-way access between the Java and the Ruby code JRuby offers all the performance benefits of using a JVM JRuby

20 20 Demo JRuby

21 Ruby on Rails

22 22 Ruby on Rails is a free web application framework RoR aims to increase the speed and ease with which database-driven web sites can be created Scaffolding - Ability to generate majority of the web application Applications developed using the Model-View- Controller design pattern Ruby on Rails

23 23 RoR Guiding Principles: > DRY - “Don't Repeat Yourself”, don't write the same code over and over again > Convention of Configuration – Rails makes assumptions about what you need to do and how you should do it (convention) rather than allowing you to configure all the details > REST (Representational State Transfer) is the best pattern for web applications Ruby on Rails

24 24 Demo Ruby on Rails

25 NetBeans & Ruby

26 26 Netbeans Ruby Support Comprehensive support for Ruby editing > Code Completion > Parameter Hints > Smart Indent > Smart Selection > Formatting > Pair Matching > RDoc Support and String Support > Spell Checking > Syntax highlighting > Navigation display > Code Folding > Background error parsing > Mark Occurrences > Go To Declaration > Instant Rename > Code Templates

27 27 Netbeans Ruby Support Refactoring > Find Usages > Rename > Other Refactorings Project support > Gem Support > File Type Recognition > Project Support > Unit Tests > IRB - Interactive Ruby Shell

28 28 Netbeans Ruby Support Debugging Support > Classic and fast debugger support > RHTML debugging > tool-tip variable and expression evaluation > Views (variables, stacks etc.) > Breakpoints > Session (multiple debugging session, finishing, switching support) > Thread (state, thread switching support) > Breakpoints management > Stepping (over/into/out/resume) into project, core, loadpath classes, RHTML

29 29 Netbeans Ruby Support Unit Test Support > Test::Unit – Ruby built-in test framework > Rspec – Behavior driven testing > AutoTest – optional continuous test environment

30 Next Steps

31 31 Get Involved Join the NetBeans Community! Next Steps Join the NetBeans OSUM !

32 32 Next Steps NetBeans: http://www.netbeans.orghttp://www.netbeans.org > Latest news and community information > Netbeans Plugins NetBeans & Ruby Wiki: http://wiki.netbeans.org/wiki/view/Ruby http://wiki.netbeans.org/wiki/view/Ruby NetBeans Community: http://www.netbeans.org/community/index.html http://www.netbeans.org/community/index.html > Forums, support, how to get involved NetBeans Ruby and Rails Learning trail - http://www.netbeans.org/kb/trails/ruby.html http://www.netbeans.org/kb/trails/ruby.html Ruby developer Center at SDN - http://developers.sun.com/ruby/ http://developers.sun.com/ruby/ Resources

33 33 Next Steps Free Ruby on Rails Training by Sang Shin - http://www.javapassion.com/rubyonrails/ http://www.javapassion.com/rubyonrails/ Netbeans IDE Features for Ruby - http://www.netbeans.org/features/ruby/index.htmlhttp://www.netbeans.org/features/ruby/index.html Ruby User's Guide - http://www.ruby- doc.org/docs/UsersGuide/rg/index.html http://www.ruby- doc.org/docs/UsersGuide/rg/index.html The Programmatic Programmer's Guide - http://www.ruby- doc.org/docs/ProgrammingRuby/html/index.html http://www.ruby- doc.org/docs/ProgrammingRuby/html/index.html Ruby Essentials - http://www.techotopia.com/index.php/Ruby_Essentials http://www.techotopia.com/index.php/Ruby_Essentials Resources

34 34 Get FREE Web-based training on Java TM, Solaris TM & more! > Visit: http://www.sunacademic.com > Course registration code from your Campus Ambassador Increase earnings potential with a Sun Certification! > Sun Certified Associate/Programmer for the Java 2 Platform SE > Sun Certified Web Component Developer for Java EE > Sun Certified Mobile Application Developer for Java ME > Sun Certified System/Network Admin for Solaris Operating System Free practice exams Discounted exams fees for academic developers – only US$60 (US$40 in APAC and Latin America) Next Steps Fast Track Your Career with Sun!

35 THANK YOU! David Botterill David.Botterill@sun.com NetBeans & Ruby


Download ppt "NetBeans & Ruby David Botterill Software Engineer Global Technology Manager - Campus Ambassador Program Sun Microsystems, Inc."

Similar presentations


Ads by Google