Download presentation
Presentation is loading. Please wait.
Published byEdgar Sullivan Modified over 8 years ago
1
NetBeans & Ruby -Enhancements for Web 2.0 and beyond Your Name Sun Campus Ambassador Your Email Address
2
Ruby, jRuby, RoR What is NetBeans Agenda Ruby Language Basics Get your own NetBeans NetBeans and Ruby
3
Why NetBeans? We're Coders, not GUI graphic nuts. > Matisse GUI builder >Swing development very easy, even for unskilled GUI developers (wink) >Components are aesthetically integrated What's yours is yours. > Ant-based projects >Projects created in netbeans can be open outside of IDE without lockout >Build, run and deploy your projects to a server outside the IDE Take that proprietary restrictivity! > Netbeans Platform >Download and use NetBeans at no cost >No restrictions on redistributing what you create
4
Ruby Ruby is a reflective, dynamic, object-oriented programming language. It combines syntax inspired by Perl with Smalltalk- like object-oriented features Shares some features with Python, Lisp, Dylan, and CLU Ruby is a single-pass interpreted language. Its official implementation is free software written in C.”
5
JRuby 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. (Compare Jython for the Python language.)
6
Ruby on Rails Ruby on Rails is a free web application framework Ruby aims to increase the speed and ease with which database-driven web sites can be created Skeleton code frameworks (scaffolding) from the outset. Applications using the Rails framework are developed using the Model-View-Controller design pattern.
7
Ruby Language Basics Classic Hello world example > puts "Hello World!" # Everything, including a literal, is an object, so this works: > -199.abs # 199 > "ruby is cool".length # 12 > "Rick".index("c") # 2 > "Nice Day Isn't It?".downcase.split(//).uniq.sort.join # " '?acdeinsty"
8
Ruby Language Basics Constructing and using an array > a = [1, 'hi', 3.14, 1, 2, [4, 5]] > > a[2] # 3.14 > a.reverse # [[4, 5], 2, 1, 3.14, 'hi', 1] > a.flatten.uniq # [1, 'hi', 3.14, 2, 4, 5] Constructing and using a hash > hash = {:water => 'wet', :fire => 'hot'} > puts hash[:fire] # Prints: hot > > hash.each_pair do |key, value| # Or: hash.each do |key, value| > puts "#{key} is #{value}" > end
9
Ruby Language Basics Blocks and iterators > { puts "Hello, World!" } # Note the { braces } > > do puts "Hello, World!" end Parameter-passing a block to be a closure > # In an object instance variable (denoted with '@'), remember a block. > def remember(&a_block) > @block = a_block > end > # Invoke the above method, giving it a block that takes a name. > remember {|name| puts "Hello, #{name}!"} > @block.call("Blah")
10
Ruby Language Basics Calling Java from JRuby > require 'java' > > include_class "javax.swing.JFrame" > include_class "javax.swing.JLabel" > > frame = JFrame.new() > frame.getContentPane().add(JLabel.new("This is an example.")) > frame.pack() > frame.setVisible(true)
11
NetBeans and Ruby JRuby is a Ruby interpreter > Written entirely in Java. > Object-oriented programming, duck-typing > Tightly integrated with Java, and can be called directly from Java programs. Bean Scripting Framework > Enables the use of scripting languages within a Java application IDEs are not Editors > Support for all coding related tasks > Debugging infrastructure: balloon eval, thread view…
12
Netbeans Ruby Pack Comprehensive support for editing Ruby code > Colors > Syntax highlighting > Navigation display > Code Folding > Background error parsing > Semantic syntax highlighting, > Mark Occurrences > Go To Declaration > Instant Rename > Code Template > Code Completion > Parameter Hints > Smart Indent > Smart Selection > Formatting > Pair Matching > Live Code Templates > RDoc Support and String Support > Spell Checking
13
Netbeans Ruby Pack Refactoring > Find Usages > Rename > Other Refactorings Project support > Gem Support > File Type Recognition > Project Support > Unit Tests > IRB - Interactive Ruby Shell
14
Netbeans Ruby Pack Debugging Support > classic-debugger support - slow AND ruby-debug support - fast > RHTML debugging > Balloon 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
15
Netbeans Ruby Pack Unit Test Support > Test::Unit > RSpec > AutoTest Ruby Hints and Quick Fixes > Experimental Hints > Error Hints
16
demo
17
NetBeans Resources NetBeans: http://www.netbeans.orghttp://www.netbeans.org > Get your Beans here! > Latest news and development information > Netbeans Addons (additional flavors) NetBeans Wiki: http://en.wikipedia.org/wiki/NetBeanshttp://en.wikipedia.org/wiki/NetBeans > Good overview, NetBeans & Ruby: http://wiki.netbeans.org/wiki/view/Rubyhttp://wiki.netbeans.org/wiki/view/Ruby > Ruby support, FAQ, tutorials NetBeans Community: http://www.netbeans.org/community/index.html http://www.netbeans.org/community/index.html > Forums, support, love, tenderness
18
Fast Track Your Career with Sun! Get FREE Web-based training on Java TM, Solaris TM & more! > Visit: http://www.sunacademic.com > Course registration code for ABC University is XYZ 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
19
THANK YOU! NetBeans... -Stronger, faster, tastier. ● Your Name Here ● Sun Campus Ambassador Your Email Address Here
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.