Monkeybars Tools-enabled Swing development with JRuby

Size: px
Start display at page:

Download "Monkeybars Tools-enabled Swing development with JRuby"

Transcription

1 Monkeybars Tools-enabled Swing development with JRuby David Koontz JRuby fanboy, teacher, hockey player

2 This is a talk about Java 2

3 This is a talk about Java This is a talk about Ruby 3

4 This is a talk about JRuby This is a talk about Java This is a talk about Ruby 4

5 This is a talk about a developer trying to find a better way to write GUI applications 5

6 My Requirements Writable in something higher level than Java Not preventing me from using Java when needed Cross-platform Easy to distribute Securable (no exposed Ruby code) 6

7 Uniting two worlds > Why Ruby? 7

8 Uniting two worlds > Why Ruby? Popular language with good community support 8

9 Uniting two worlds > Why Ruby? Popular language with good community support Many convenient features for simplifying logic 9

10 Uniting two worlds > Why Ruby? Popular language with good community support Many convenient features for simplifying logic Good compliment to Java 10

11 Uniting two worlds > Why Ruby? Popular language with good community support Many convenient features for simplifying logic Good compliment to Java All the cool kids are doing it? 11

12 Uniting two worlds > Why Ruby? Popular language with good community support Many convenient features for simplifying logic Good compliment to Java All the cool kids are doing it? Duke approved! 12

13 Uniting two worlds > Why Ruby? > Why Swing? 13

14 Uniting two worlds > Why Ruby? > Why Swing? Included in consumer JREʼs 14

15 Uniting two worlds > Why Ruby? > Why Swing? Included in consumer JREʼs Well known Established bugs and workarounds 15

16 Uniting two worlds > Why Ruby? > Why Swing? Included in consumer JREʼs Well known Established bugs and workarounds Lots of tooling infrastructure 16

17 Uniting two worlds > Why Ruby? > Why Swing? Included in consumer JREʼs Well known Established bugs and workarounds Lots of tooling infrastructure I knew it better than SWT 17

18 Uniting two worlds > Why Ruby? > Why Swing? Included in consumer JREʼs Well known Established bugs and workarounds Lots of tooling infrastructure I knew it better than SWT Chet Haas and Romain Guy approved! 18

19 What Monkeybars is > Helpers for making GUI development easier with Swing > A guideline for how to structure your GUI application > Less complexity when dealing with complex applications 19

20 What Monkeybars is not > An abstraction layer for Swing > A self contained toolkit You will need to know some of the Swing API 20

21 Hello World 21

22 Monkeybars is a kind of MVC 22

23 Normal MVC setup Controller View Model 23

24 Monkeybars Controller Monkeybars configuration View Model 24

25 Monkeybars keeps the controller and the view separate Controller Monkeybars View 25

26 view.my_button.text = hello becomes model.button_text = hello update_view Monkeybars takes over here 26

27 Typical style Controller hello View 27

28 Monkeybars style Controller Monkeybars View hello Model 28

29 Monkeybars style update view Controller Monkeybars View Model 29

30 Monkeybars style update view Controller Monkeybars View Model 30

31 Monkeybars style update view Controller Monkeybars View Model hello 31

32 To each logic, a home > Monkeybars encourages the different kinds of logic to each live in their own place Business logic in the the model Application logic in the controller View logic in the view 32

33 Event handlers are also a bit different in Monkeybars 33

34 view.my_button.add_action_listener { def action_performed puts action! end } becomes def my_button_action_performed end puts action! 34

35 Monkeybars automatically adds the correct handler object on the target component (as long as you name things correctly) 35

36 So whatʼs so special about all this? 36

37 So whatʼs so special about all this? > The controller doesnʼt hold a reference to the view 37

38 So whatʼs so special about all this? > The controller doesnʼt hold a reference to the view > The model is a plain Ruby (or Java) object you provide yourself 38

39 So whatʼs so special about all this? > The controller doesnʼt hold a reference to the view > The model is a plain Ruby (or Java) object you provide yourself > The need to mock your GUI layer goes away 39

40 So whatʼs so special about all this? > The controller doesnʼt hold a reference to the view > The model is a plain Ruby (or Java) object you provide yourself > The need to mock your GUI layer goes away > You can easily unit test your controller and model Me test gui? 40

41 Hello World (tested) 41

42 Other Monkeybars features > Generators to get you started quickly > Ability to create components and nest them > Easily perform long running tasks without locking up the GUI > Helper methods (window positioning, etc.) 42

43 My Requirements Writable in something higher level than Java Not preventing me from using Java when needed Cross-platform Easy to distribute Securable (no exposed Ruby code) 43

44 Distribution requirements > Builds on any platform > Creates front ends for Windows, OSX and Linux 44

45 Rawr is a library built to address these issues for JRuby projects 45

46 Rawr packaging demo 46

47 Rawr takes care of > Compiling your Java classes > Compiling your Ruby files > Packaging your files into an executable Jar > Creating platform specific front-ends Exeʼs App bundles > Packaging any resource files into data jars 47

48 My Requirements Writable in something higher level than Java Not preventing me from using Java when needed Cross-platform Easy to distribute Securable (no exposed Ruby code) 48

49 JRuby protects your code Do not touch 49

50 File test.rb puts hello world Compile with jrubyc produces hello.class Decompile with jad 50

51 import org.jruby.ruby; import org.jruby.rubyinstanceconfig; import org.jruby.ast.executable.abstractscript; import org.jruby.javasupport.util.runtimehelpers; import org.jruby.runtime.*; import org.jruby.runtime.builtin.irubyobject; import org.jruby.util.bytelist; public class test extends AbstractScript { public test() { $class = Class.forName("test"); filename = "test.rb"; this; callsites = setfunctionalcallsite(new CallSite[1], 0, "puts"); return; } public IRubyObject file (ThreadContext threadcontext, IRubyObject irubyobject, Block block) { Ruby ruby; IRubyObject irubyobject1 = (ruby = threadcontext.getruntime()).getnil(); setposition(threadcontext, 0); return getcallsite(0).call(threadcontext, irubyobject, irubyobject, ruby.newstringshared( 0)); } continued... 51

52 public IRubyObject file (ThreadContext threadcontext, IRubyObject irubyobject, IRubyObject airubyobject[], Block block) { Arity.checkArgumentCount(threadcontext.getRuntime(), airubyobject, 0, 0); return file (threadcontext, irubyobject, block); } public IRubyObject load(threadcontext threadcontext, IRubyObject irubyobject, IRubyObject airubyobject[], Block block) { RuntimeHelpers.preLoad(threadcontext, new String[0]); RuntimeHelpers.postLoad(threadcontext); return file (threadcontext, irubyobject, airubyobject, block); RuntimeHelpers.postLoad(threadcontext); throw ; } continued... 52

53 public static void main(string args[]) { RubyInstanceConfig rubyinstanceconfig; rubyinstanceconfig = new RubyInstanceConfig(); rubyinstanceconfig.setargv(args); Ruby ruby; (new test()).load((ruby = Ruby.newInstance(rubyinstanceconfig)).getCurrentContext(), ruby.gettopself(), IRubyObject.NULL_ARRAY, Block.NULL_BLOCK); } } private static void setposition(threadcontext threadcontext, int i) { threadcontext.setfileandline("test.rb", i); } private final Class $class; private static final ByteList 0 = ByteList.create("hello world"); 53

54 My Requirements Writable in something higher level than Java Not preventing me from using Java when needed Cross-platform Easy to distribute Securable (no exposed Ruby code) 54

55 Monkeybars status > Stable Used in production apps since version 0.5 Current version is > 1.0 > Small but active mailing list > Support on mailing list or on IRC channel > Used in real commercial applications in production now 55

56 A huge thank you goes out to Charlie Nutter and Tom Enebo and anyone who has contributed to JRuby without whom Monkeybars would not be possible 56

57 Visit your local recruiter To build GUI apps in JRuby Any questions? 57

58 David Koontz

JRuby: Who What Now. Thomas Enebo JRuby Guy Sun Microsystems

JRuby: Who What Now. Thomas Enebo JRuby Guy Sun Microsystems JRuby: Who What Now Thomas Enebo JRuby Guy Sun Microsystems 1 Who am I? エネボ. トーマス Co-lead of JRuby project Longtime Java developer (12+ years) Ruby developer (6 years) Engineer at Sun Microsystems for

More information

Graphical User Interfaces (GUIs)

Graphical User Interfaces (GUIs) CMSC 132: Object-Oriented Programming II Graphical User Interfaces (GUIs) Department of Computer Science University of Maryland, College Park Model-View-Controller (MVC) Model for GUI programming (Xerox

More information

Lec 3. Compilers, Debugging, Hello World, and Variables

Lec 3. Compilers, Debugging, Hello World, and Variables Lec 3 Compilers, Debugging, Hello World, and Variables Announcements First book reading due tonight at midnight Complete 80% of all activities to get 100% HW1 due Saturday at midnight Lab hours posted

More information

<Insert Picture Here> JavaFX 2.0

<Insert Picture Here> JavaFX 2.0 1 JavaFX 2.0 Dr. Stefan Schneider Chief Technologist ISV Engineering The following is intended to outline our general product direction. It is intended for information purposes only,

More information

: Primitive data types Variables Operators if, if-else do-while, while, for. // // First Java Program. public class Hello {

: Primitive data types Variables Operators if, if-else do-while, while, for. // // First Java Program. public class Hello { 2110211 : 2110211 Primitive data types Variables Operators if, if-else do-while, while, for 2110211 7/11/2002 2 // // First Java Program public class Hello { // // main method public static void main(string[]

More information

1001ICT Introduction To Programming Lecture Notes

1001ICT Introduction To Programming Lecture Notes 1001ICT Introduction To Programming Lecture Notes School of Information and Communication Technology Griffith University Semester 2, 2015 1 2 Elements of Java Java is a popular, modern, third generation

More information

Windows 8. Rainer Stropek. System Architecture. System Architecture re of Windows Store Apps. Saves the day. software architects gmbh

Windows 8. Rainer Stropek. System Architecture. System Architecture re of Windows Store Apps. Saves the day. software architects gmbh System Architecture re of Windows Store Apps Rainer Stropek software architects gmbh Windows 8 System Architecture Mail Web Twitter rainer@timecockpit.comcom http://www.timecockpit.com @rstropek Saves

More information

Classes and Objects 3/28/2017. How can multiple methods within a Java class read and write the same variable?

Classes and Objects 3/28/2017. How can multiple methods within a Java class read and write the same variable? Peer Instruction 8 Classes and Objects How can multiple methods within a Java class read and write the same variable? A. Allow one method to reference a local variable of the other B. Declare a variable

More information

Chapter 1 Getting Started

Chapter 1 Getting Started Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different

More information

Scripting Languages in OSGi. Thursday, November 8, 12

Scripting Languages in OSGi. Thursday, November 8, 12 Scripting Languages in OSGi Frank Lyaruu CTO Dexels Project lead Navajo Framework Amsterdam www.dexels.com Twitter: @lyaruu Navajo Framework TSL XML based script language Compiled to Java Recently ported

More information

Java FX 2.0. Dr. Stefan Schneider Oracle Deutschland Walldorf-Baden

Java FX 2.0. Dr. Stefan Schneider Oracle Deutschland Walldorf-Baden Java FX 2.0 Dr. Stefan Schneider Oracle Deutschland Walldorf-Baden Keywords: JavaFX, Rich, GUI, Road map. Introduction This presentation gives an introduction into JavaFX. It introduces the key features

More information

You should see something like this, called the prompt :

You should see something like this, called the prompt : CSE 1030 Lab 1 Basic Use of the Command Line PLEASE NOTE this lab will not be graded and does not count towards your final grade. However, all of these techniques are considered testable in a labtest.

More information

TestingofScout Application. Ludwigsburg,

TestingofScout Application. Ludwigsburg, TestingofScout Application Ludwigsburg, 27.10.2014 The Tools approach The Testing Theory approach Unit testing White box testing Black box testing Integration testing Functional testing System testing

More information

AP Computer Science Summer Assignment (updated 5/29/2018) DUE : Sept. 4, 2018

AP Computer Science Summer Assignment (updated 5/29/2018) DUE : Sept. 4, 2018 AP Computer Science 2018 2019 E-mail: taegoode@vbschools.com Summer Assignment (updated 5/29/2018) DUE : Sept. 4, 2018 This assignment is due on the first day of class. Please read the instructions carefully

More information

Prototyping a Swing Interface with the Netbeans IDE GUI Editor

Prototyping a Swing Interface with the Netbeans IDE GUI Editor Prototyping a Swing Interface with the Netbeans IDE GUI Editor Netbeans provides an environment for creating Java applications including a module for GUI design. Here we assume that we have some existing

More information

Simplifying Desktop Development with Glimmer

Simplifying Desktop Development with Glimmer Simplifying Desktop Development with Glimmer by Annas Andy Maleh andy@obtiva.com Obtiva Corp. Preview Introduction Overview of Widgets Hello World Glimmer Listens Data-binding Test-driving with MVP First

More information

CS 11 java track: lecture 1

CS 11 java track: lecture 1 CS 11 java track: lecture 1 Administrivia need a CS cluster account http://www.cs.caltech.edu/ cgi-bin/sysadmin/account_request.cgi need to know UNIX www.its.caltech.edu/its/facilities/labsclusters/ unix/unixtutorial.shtml

More information

CPSC 150 Laboratory Manual. Lab 1 Introduction to Program Creation

CPSC 150 Laboratory Manual. Lab 1 Introduction to Program Creation CPSC 150 Laboratory Manual A Practical Approach to Java, jedit & WebCAT Department of Physics, Computer Science & Engineering Christopher Newport University Lab 1 Introduction to Program Creation Welcome

More information

Starting In Java With JPT in Eclipse

Starting In Java With JPT in Eclipse Starting In Java With JPT in Eclipse 1. Installing Java and Eclipse Both Java from Sun Microsystems and the Eclipse development environment are free to download. It is important that Java be installed

More information

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG 1 Notice Class Website http://www.cs.umb.edu/~jane/cs114/ Reading Assignment Chapter 1: Introduction to Java Programming

More information

Porting applications to Qt. Kevin Funk, Software Engineer KDAB

Porting applications to Qt. Kevin Funk, Software Engineer KDAB Porting applications to Qt Kevin Funk, Software Engineer KDAB What is a migration? Some other toolkit Qt QNX Photon Motif MFC Java AWT Older Qt version Qt5 Why migrate at all? Hard to find developers who

More information

Widget Toolkits CS MVC

Widget Toolkits CS MVC Widget Toolkits 1 CS349 -- MVC Widget toolkits Also called widget libraries or GUI toolkits or GUI APIs Software bundled with a window manager, operating system, development language, hardware platform

More information

Comp215: More lists. Dan S. Wallach (Rice University) Copyright 2015, Dan S. Wallach. All rights reserved.

Comp215: More lists. Dan S. Wallach (Rice University) Copyright 2015, Dan S. Wallach. All rights reserved. Comp215: More lists Dan S. Wallach (Rice University) Copyright 2015, Dan S. Wallach. All rights reserved. What s a good list interface We now have two different kinds of lists: lazy and eager. (We ll talk

More information

The Past, Present, and Future of SWT

The Past, Present, and Future of SWT The Past, Present, and Future of SWT Eric Williams Email: ericwill@redhat.com Twitter: @yyzericwill About me: Eric Williams - Studied computer science at the University of Toronto - Intern at Red Hat from

More information

Exercise 1: Intro to Java & Eclipse

Exercise 1: Intro to Java & Eclipse Exercise 1: Intro to Java & Eclipse Discussion of exercise solution We do not put the exercise solution s source code online! But we show & publish the most important parts on slides There are sometimes

More information

Handouts. 1 Handout for today! Recap. Homework #2 feedback. Last Time. What did you think? HW3a: ThreadBank. Today. Small assignment.

Handouts. 1 Handout for today! Recap. Homework #2 feedback. Last Time. What did you think? HW3a: ThreadBank. Today. Small assignment. Handouts CS193J: Programming in Java Summer Quarter 2003 Lecture 10 Thread Interruption, Cooperation (wait/notify), Swing Thread, Threading conclusions 1 Handout for today! #21: Threading 3 #22: HW3a:

More information

1Z Oracle. Java Platform Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert

1Z Oracle. Java Platform Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert Oracle 1Z0-895 Java Platform Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert Download Full Version : http://killexams.com/pass4sure/exam-detail/1z0-895 Answer: F QUESTION: 284 Given:

More information

Active Model Basics. December 29, 2014

Active Model Basics. December 29, 2014 Active Model Basics December 29, 2014 This guide should provide you with all you need to get started using model classes. Active Model allows for Action Pack helpers to interact with plain Ruby objects.

More information

AP Computer Science A Summer Assignment 2017

AP Computer Science A Summer Assignment 2017 AP Computer Science A Summer Assignment 2017 The objective of this summer assignment is to ensure that each student has the ability to compile and run code on a computer system at home. We will be doing

More information

What is the Selendroid?

What is the Selendroid? When you publish an app to Google play, it must be well tested to avoid the potential bugs. There's a ton of test scenarios that should be executed before publishing an app. To save the testing effort,

More information

CS 3 Introduction to Software Engineering. 3: Exceptions

CS 3 Introduction to Software Engineering. 3: Exceptions CS 3 Introduction to Software Engineering 3: Exceptions Questions? 2 Objectives Last Time: Procedural Abstraction This Time: Procedural Abstraction II Focus on Exceptions. Starting Next Time: Data Abstraction

More information

Swinging from the Outside

Swinging from the Outside Swinging from the Outside A guide to navigating Swing from the outside of Sun Brian Mason, Dir Software of Engineering, Teseda S295599 Space is big, really big. You might think it is a long way down to

More information

Core Java Syllabus. Pre-requisite / Target Audience: C language skills (Good to Have)

Core Java Syllabus. Pre-requisite / Target Audience: C language skills (Good to Have) Overview: Java programming language is developed by Sun Microsystems. Java is object oriented, platform independent, simple, secure, architectural neutral, portable, robust, multi-threaded, high performance,

More information

Creating and Running Your First C# Program

Creating and Running Your First C# Program Creating and Running Your First C# Program : http://eembdersler.wordpress.com Choose the EEE-425Programming Languages (Fall) Textbook reading schedule Pdf lecture notes Updated class syllabus Midterm and

More information

Section 003 Fall CS 170 Exam 1. Name (print): Instructions:

Section 003 Fall CS 170 Exam 1. Name (print): Instructions: CS 170 Exam 1 Section 003 Fall 2012 Name (print): Instructions: Keep your eyes on your own paper and do your best to prevent anyone else from seeing your work. Do NOT communicate with anyone other than

More information

EEE-425 Programming Languages (2013) 1

EEE-425 Programming Languages (2013) 1 Creating and Running Your First C# Program : http://eembdersler.wordpress.com Choose the EEE-425Programming Languages (Fall) Textbook reading schedule Pdf lecture notes Updated class syllabus Midterm and

More information

RubyConf China. Why Ruby? Yukihiro "Matz" Matsumoto. Copyright (c) 2008 Yukihiro "Matz" Matsumoto, No rights reserved

RubyConf China. Why Ruby? Yukihiro Matz Matsumoto. Copyright (c) 2008 Yukihiro Matz Matsumoto, No rights reserved RubyConf China Why Ruby? Yukihiro "Matz" Matsumoto matz@ruby-lang.org Copyright (c) 2008 Yukihiro "Matz" Matsumoto, No rights reserved thou Moore s Law The number of Transistors in LSI Doubles Every 18

More information

AWS Lambda. 1.1 What is AWS Lambda?

AWS Lambda. 1.1 What is AWS Lambda? Objectives Key objectives of this chapter Lambda Functions Use cases The programming model Lambda blueprints AWS Lambda 1.1 What is AWS Lambda? AWS Lambda lets you run your code written in a number of

More information

Lecture 02, Fall 2018 Friday September 7

Lecture 02, Fall 2018 Friday September 7 Anatomy of a class Oliver W. Layton CS231: Data Structures and Algorithms Lecture 02, Fall 2018 Friday September 7 Follow-up Python is also cross-platform. What s the advantage of Java? It s true: Python

More information

Even though we created a folder for the workspace, we still have to let JCreator do the same. So click File, New, and then Blank Workspace.

Even though we created a folder for the workspace, we still have to let JCreator do the same. So click File, New, and then Blank Workspace. Getting Started With JCreator The first thing to do with JCreator is to create a workspace. A workspace is an area where you can store a project or a set of related projects. For me, the best way to create

More information

CS/ENGRD 2110 FALL Lecture 2: Objects and classes in Java

CS/ENGRD 2110 FALL Lecture 2: Objects and classes in Java 1 CS/ENGRD 2110 FALL 2017 Lecture 2: Objects and classes in Java http://courses.cs.cornell.edu/cs2110 CMS VideoNote.com, PPT slides, DrJava 2 CMS. Visit course webpage, click Links, then CMS for 2110.

More information

CS 11 java track: lecture 3

CS 11 java track: lecture 3 CS 11 java track: lecture 3 This week: documentation (javadoc) exception handling more on object-oriented programming (OOP) inheritance and polymorphism abstract classes and interfaces graphical user interfaces

More information

The Script Bowl Featuring Groovy, JRuby, Jython and Scala. Raghavan Rags N. Srinivas CTO, Technology Evangelism

The Script Bowl Featuring Groovy, JRuby, Jython and Scala. Raghavan Rags N. Srinivas CTO, Technology Evangelism The Script Bowl Featuring Groovy, JRuby, Jython and Scala Raghavan Rags N. Srinivas CTO, Technology Evangelism The Script Bowl: Groovy Style Guillaume Laforge VP Technology at G2One, Inc. Groovy Project

More information

Basic Keywords Practice Session

Basic Keywords Practice Session Basic Keywords Practice Session Introduction In this article from my free Java 8 course, we will apply what we learned in my Java 8 Course Introduction to our first real Java program. If you haven t yet,

More information

JAVA An overview for C++ programmers

JAVA An overview for C++ programmers JAVA An overview for C++ programmers Wagner Truppel wagner@cs.ucr.edu edu March 1st, 2004 The early history James Gosling, Sun Microsystems Not the usual start for a prog.. language Consumer electronics,

More information

CSc 372 Comparative Programming Languages

CSc 372 Comparative Programming Languages CSc 372 Comparative Programming Languages 1 : Introduction Christian Collberg collberg+372@gmail.com Department of Computer Science University of Arizona Copyright c 2007 Christian Collberg [1] Why learn

More information

Example: CharCheck. That s It??! What do you imagine happens after main() finishes?

Example: CharCheck. That s It??! What do you imagine happens after main() finishes? Event-Driven Software Paradigm Today Finish Programming Unit: Discuss Graphics In the old days, computers did exactly what the programmer said Once started, it would run automagically until done Then you

More information

There are several files including the start of a unit test and the method stubs in MindNumber.java. Here is a preview of what you will do:

There are several files including the start of a unit test and the method stubs in MindNumber.java. Here is a preview of what you will do: Project MindNumber Collaboration: Solo. Complete this project by yourself with optional help from section leaders. Do not work with anyone else, do not copy any code directly, do not copy code indirectly

More information

JavaFX. JavaFX Overview Release E

JavaFX. JavaFX Overview Release E JavaFX JavaFX Overview Release 2.2.21 E20479-06 April 2013 Learn about the JavaFX 2 and later technology, read a feature summary, explore the sample applications, and follow the high-level steps to create

More information

5/3/2006. Today! HelloWorld in BlueJ. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont.

5/3/2006. Today! HelloWorld in BlueJ. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. Today! Build HelloWorld yourself in BlueJ and Eclipse. Look at all the Java keywords. Primitive Types. HelloWorld in BlueJ 1. Find BlueJ in the start menu, but start the Select VM program instead (you

More information

DESIGN PATTERNS MOCK TEST DESIGN PATTERNS MOCK TEST III

DESIGN PATTERNS MOCK TEST DESIGN PATTERNS MOCK TEST III http://www.tutorialspoint.com DESIGN PATTERNS MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to Design Patterns Framework. You can download these sample

More information

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017 Introduction to Java Lecture 1 COP 3252 Summer 2017 May 16, 2017 The Java Language Java is a programming language that evolved from C++ Both are object-oriented They both have much of the same syntax Began

More information

CS3901 Intermediate Programming and Data Structures Winter 2008 (Q2 AY 08) Assignment #5. Due: noon Tuesday, 3 March 2008

CS3901 Intermediate Programming and Data Structures Winter 2008 (Q2 AY 08) Assignment #5. Due: noon Tuesday, 3 March 2008 CS3901 Intermediate Programming and Data Structures Winter 2008 (Q2 AY 08) Assignment #5 Due: noon Tuesday, 3 March 2008 Objective Practice with Java Create a CircularLinkedList implementation of List

More information

Human Computer Interaction Lecture 08 [ Implementation Support ] Implementation support

Human Computer Interaction Lecture 08 [ Implementation Support ] Implementation support Human Computer Interaction Lecture 08 [ Implementation Support ] Imran Ihsan Assistant Professor www.imranihsan.com aucs.imranihsan.com HCI08 - Implementation Support 1 Implementation support programming

More information

Graphical User Interface (Part-1) Supplementary Material for CPSC 233

Graphical User Interface (Part-1) Supplementary Material for CPSC 233 Graphical User Interface (Part-1) Supplementary Material for CPSC 233 Introduction to Swing A GUI (graphical user interface) is a windowing system that interacts with the user The Java AWT (Abstract Window

More information

Software Construction

Software Construction Lecture 1: Introduction Software Construction in Java for HSE Moscow Tom Verhoeff Eindhoven University of Technology Department of Mathematics & Computer Science Software Engineering & Technology Group

More information

CS415 Human Computer Interaction

CS415 Human Computer Interaction CS415 Human Computer Interaction Lecture 5 HCI Design Methods (GUI Builders) September 18, 2015 Sam Siewert A Little Humor on HCI Sam Siewert 2 WIMP GUI Builders The 2D GUI is the Killer App for WIMP Floating

More information

JRuby: Bringing Ruby to the JVM

JRuby: Bringing Ruby to the JVM JRuby: Bringing Ruby to the JVM Thomas E. Enebo Aandtech Inc. Charles Oliver Nutter Ventera Corp http://www.jruby.org TS-3059 2006 JavaOne SM Conference Session TS-3059 JRuby Presentation Goal Learn what

More information

Matt Meisinger, Akshata Ramesh, Alex Dong, Kate Haas

Matt Meisinger, Akshata Ramesh, Alex Dong, Kate Haas { Matt Meisinger, Akshata Ramesh, Alex Dong, Kate Haas Motivation Easy HTML manipulation: for extracting images, links, and other content from specific portions of the page. Traversing the hierarchical

More information

implementation support

implementation support Implementation support chapter 8 implementation support programming tools levels of services for programmers windowing systems core support for separate and simultaneous usersystem activity programming

More information

TOOLS AND TECHNIQUES FOR TEST-DRIVEN LEARNING IN CS1

TOOLS AND TECHNIQUES FOR TEST-DRIVEN LEARNING IN CS1 TOOLS AND TECHNIQUES FOR TEST-DRIVEN LEARNING IN CS1 ABSTRACT Test-Driven Development is a design strategy where a set of tests over a class is defined prior to the implementation of that class. The goal

More information

Java Classes - Using your classes. How the classes you write are being used

Java Classes - Using your classes. How the classes you write are being used Java Classes - Using your classes How the classes you write are being used What s the use of classes? So, you have been writing a few classes by now... What for? The programs you will write will use objects

More information

Introduction to Graphical Interface Programming in Java. Introduction to AWT and Swing

Introduction to Graphical Interface Programming in Java. Introduction to AWT and Swing Introduction to Graphical Interface Programming in Java Introduction to AWT and Swing GUI versus Graphics Programming Graphical User Interface (GUI) Graphics Programming Purpose is to display info and

More information

designed to enable you to create a foundation for your own plugin project.

designed to enable you to create a foundation for your own plugin project. Plugin Development Introduction Savant is unique in the Genome Browser arena in that it was designed to be extensible through a rich plugin framework, which allows developers to provide functionality in

More information

Quick Multitouch Apps using kivy and Python

Quick Multitouch Apps using kivy and Python Quick Multitouch Apps using kivy and Python About Me! Python and Kivy + Setting up Kivy... 1) in Linux 2) in Windows 3) Mac OSX Hello World in Kivy :) Controlling the Environment Many environment variables

More information

B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA

B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE

More information

Who am I? Harlan Iverson. Programming enthusiast. Seeker of truth. Imperfect. I'll be wrong about some things. Please correct me if you can.

Who am I? Harlan Iverson. Programming enthusiast. Seeker of truth. Imperfect. I'll be wrong about some things. Please correct me if you can. Who am I? Harlan Iverson. Programming enthusiast. Seeker of truth. Imperfect. I'll be wrong about some things. Please correct me if you can. P.S... I hate boring presentations. Please, engage and stay

More information

Notes from a Short Introductory Lecture on Scala (Based on Programming in Scala, 2nd Ed.)

Notes from a Short Introductory Lecture on Scala (Based on Programming in Scala, 2nd Ed.) Notes from a Short Introductory Lecture on Scala (Based on Programming in Scala, 2nd Ed.) David Haraburda January 30, 2013 1 Introduction Scala is a multi-paradigm language that runs on the JVM (is totally

More information

Life Without NetBeans

Life Without NetBeans Life Without NetBeans Part A Writing, Compiling, and Running Java Programs Almost every computer and device has a Java Runtime Environment (JRE) installed by default. This is the software that creates

More information

Chapter 1 Introduction to Computers, Programs, and Java

Chapter 1 Introduction to Computers, Programs, and Java Chapter 1 Introduction to Computers, Programs, and Java 1.1 What are hardware and software? 1. A computer is an electronic device that stores and processes data. A computer includes both hardware and software.

More information

JRuby. A Ruby VM in Java jruby.sourceforge.net Charles Oliver Nutter, presenting

JRuby. A Ruby VM in Java jruby.sourceforge.net Charles Oliver Nutter, presenting JRuby A Ruby VM in Java jruby.sourceforge.net Charles Oliver Nutter, presenting Who Am I? Charles Oliver Nutter: headius@headius.com Senior Architect/Technologist at Ventera Corp (gov t, financial, telecom

More information

PRINCIPLES OF SOFTWARE BIM209DESIGN AND DEVELOPMENT 00. WELCOME TO OBJECTVILLE. Speaking the Language of OO

PRINCIPLES OF SOFTWARE BIM209DESIGN AND DEVELOPMENT 00. WELCOME TO OBJECTVILLE. Speaking the Language of OO PRINCIPLES OF SOFTWARE BIM209DESIGN AND DEVELOPMENT 00. WELCOME TO OBJECTVILLE Speaking the Language of OO COURSE INFO Instructor : Alper Bilge TA : Gökhan Çıplak-Ahmet Alkılınç Time : Tuesdays 2-5pm Location

More information

CS 177 Recitation. Week 1 Intro to Java

CS 177 Recitation. Week 1 Intro to Java CS 177 Recitation Week 1 Intro to Java Questions? Computers Computers can do really complex stuff. How? By manipulating data according to lists of instructions. Fundamentally, this is all that a computer

More information

LIGHTWEIGHT UI TOOLKIT MAKING COMPELLING JAVA ME APPLICATIONS EASY

LIGHTWEIGHT UI TOOLKIT MAKING COMPELLING JAVA ME APPLICATIONS EASY LIGHTWEIGHT UI TOOLKIT MAKING COMPELLING JAVA ME APPLICATIONS EASY Chen Fishbein, Software Architect Shai Almog, Software Architect Yoav Barel, Senior Manager TS-4921 Agenda What is LWUIT? Why? Key Benefits

More information

JSR 292 Cookbook: Fresh Recipes with New Ingredients

JSR 292 Cookbook: Fresh Recipes with New Ingredients JSR 292 Cookbook: Fresh Recipes with New Ingredients John Rose Christian Thalinger Sun Microsystems Overview Got a language cooking on the JVM? JSR 292, a set of major changes to the JVM architecture,

More information

High performance reactive applications with Vert.x

High performance reactive applications with Vert.x High performance reactive applications with Vert.x Tim Fox Red Hat Bio Employed By Red Hat to lead the Vert.x project Worked in open source exclusively for the past 9 years Some projects I've been involved

More information

DCS235 Software Engineering Exercise Sheet 2: Introducing GUI Programming

DCS235 Software Engineering Exercise Sheet 2: Introducing GUI Programming Prerequisites Aims DCS235 Software Engineering Exercise Sheet 2: Introducing GUI Programming Version 1.1, October 2003 You should be familiar with the basic Java, including the use of classes. The luej

More information

COMP 110/L Lecture 6. Kyle Dewey

COMP 110/L Lecture 6. Kyle Dewey COMP 110/L Lecture 6 Kyle Dewey Outline Methods Variable scope Call-by-value Testing with JUnit Variable Scope Question Does this compile? public class Test { public static void main(string[] args) { int

More information

Oracle Mix. A Case Study. Ola Bini JRuby Core Developer ThoughtWorks Studios.

Oracle Mix. A Case Study. Ola Bini JRuby Core Developer ThoughtWorks Studios. Oracle Mix A Case Study Ola Bini JRuby Core Developer ThoughtWorks Studios ola.bini@gmail.com http://olabini.com/blog Vanity slide Vanity slide Ola Bini Vanity slide Ola Bini From Stockholm, Sweden Vanity

More information

CS/ENGRD 2110 SPRING Lecture 2: Objects and classes in Java

CS/ENGRD 2110 SPRING Lecture 2: Objects and classes in Java 1 CS/ENGRD 2110 SPRING 2014 Lecture 2: Objects and classes in Java http://courses.cs.cornell.edu/cs2110 Java OO (Object Orientation) 2 Python and Matlab have objects and classes. Strong-typing nature of

More information

invokedynamic IN 45 MINUTES!!! Wednesday, February 6, 13

invokedynamic IN 45 MINUTES!!! Wednesday, February 6, 13 invokedynamic IN 45 MINUTES!!! Me Charles Oliver Nutter headius@headius.com, @headius blog.headius.com JRuby Guy at Sun, Engine Yard, Red Hat JVM enthusiast, educator, contributor Earliest adopter of invokedynamic

More information

ArcGIS Runtime: Building Cross-Platform Apps. Rex Hansen Mark Baird Michael Tims Morten Nielsen

ArcGIS Runtime: Building Cross-Platform Apps. Rex Hansen Mark Baird Michael Tims Morten Nielsen ArcGIS Runtime: Building Cross-Platform Apps Rex Hansen Mark Baird Michael Tims Morten Nielsen Agenda Cross-platform review ArcGIS Runtime cross-platform options - Java - Qt -.NET ArcGIS Runtime: Building

More information

Building a Java ME Test Suite in 15 Minutes

Building a Java ME Test Suite in 15 Minutes Building a Java ME Test Suite in 15 Minutes Mikhail Gorshenev, Senior Staff Engineer Roman Zelov, Member of Technical Staff Alexander Glasman, Member of Technical Staff Sun Microsystems, Inc. http://www.sun.com/

More information

Heavyweight with platform-specific widgets. AWT applications were limited to commonfunctionality that existed on all platforms.

Heavyweight with platform-specific widgets. AWT applications were limited to commonfunctionality that existed on all platforms. Java GUI Windows Events Drawing 1 Java GUI Toolkits Toolkit AWT Description Heavyweight with platform-specific widgets. AWT applications were limited to commonfunctionality that existed on all platforms.

More information

JDirectoryChooser Documentation

JDirectoryChooser Documentation JDirectoryChooser Documentation Page 1 of 7 How to Use JDirectoryChooser The JDirectoryChooser provides user-friendly GUI for manipulating directories from Java application. User can either simply choose

More information

2.6 Error, exception and event handling

2.6 Error, exception and event handling 2.6 Error, exception and event handling There are conditions that have to be fulfilled by a program that sometimes are not fulfilled, which causes a so-called program error. When an error occurs usually

More information

Solution register itself

Solution register itself Observer Pattern Context: One object (the Subject) is the source of events. Other objects (Observers) want to know when an event occurs. Or: several objects should be immediately updated when the state

More information

Introduction to GUIs. Principles of Software Construction: Objects, Design, and Concurrency. Jonathan Aldrich and Charlie Garrod Fall 2014

Introduction to GUIs. Principles of Software Construction: Objects, Design, and Concurrency. Jonathan Aldrich and Charlie Garrod Fall 2014 Introduction to GUIs Principles of Software Construction: Objects, Design, and Concurrency Jonathan Aldrich and Charlie Garrod Fall 2014 Slides copyright 2014 by Jonathan Aldrich, Charlie Garrod, Christian

More information

ASSIGNMENT 5 Objects, Files, and a Music Player

ASSIGNMENT 5 Objects, Files, and a Music Player ASSIGNMENT 5 Objects, Files, and a Music Player COMP-202A, Fall 2009, All Sections Due: Thursday, December 3, 2009 (23:55) You MUST do this assignment individually and, unless otherwise specified, you

More information

Unit Testing J2EE from JRuby. Evan Light

Unit Testing J2EE from JRuby. Evan Light Unit Testing J2EE from JRuby Evan Light http://evan.tiggerpalace.com Who I am Professional developer since 1996 Java since 1999 J2EE since 2000 Ruby since 2006 Some yutz with Keynote and a remote control

More information

Tiers (or layers) Separation of concerns

Tiers (or layers) Separation of concerns Tiers (or layers) Separation of concerns Hiding the type of storage from the client class Let s say we have a program that needs to fetch objects from a storage. Should the program have to be concerned

More information

Windows and Events. created originally by Brian Bailey

Windows and Events. created originally by Brian Bailey Windows and Events created originally by Brian Bailey Announcements Review next time Midterm next Friday UI Architecture Applications UI Builders and Runtimes Frameworks Toolkits Windowing System Operating

More information

3 Continuous Integration 3. Automated system finding bugs is better than people

3 Continuous Integration 3. Automated system finding bugs is better than people This presentation is based upon a 3 day course I took from Jared Richardson. The examples and most of the tools presented are Java-centric, but there are equivalent tools for other languages or you can

More information

Graphical User Interface (GUI)

Graphical User Interface (GUI) Graphical User Interface (GUI) An example of Inheritance and Sub-Typing 1 Java GUI Portability Problem Java loves the idea that your code produces the same results on any machine The underlying hardware

More information

Lecture 17. For Array Class Shenanigans

Lecture 17. For Array Class Shenanigans Lecture 17 For Array Class Shenanigans For or While? class WhileDemo { public static void main(string[] args){ int count = 1; while (count < 11) { System.out.println("Count is: " + count); count++; Note:

More information

Closures. Mooly Sagiv. Michael Clarkson, Cornell CS 3110 Data Structures and Functional Programming

Closures. Mooly Sagiv. Michael Clarkson, Cornell CS 3110 Data Structures and Functional Programming Closures Mooly Sagiv Michael Clarkson, Cornell CS 3110 Data Structures and Functional Programming t ::= x x. t t t Call-by-value big-step Operational Semantics terms variable v ::= values abstraction x.

More information

Introduction to programming the FRDM/MBED in Java David J. https://www.cs.kent.ac.uk/~djb/

Introduction to programming the FRDM/MBED in Java David J. https://www.cs.kent.ac.uk/~djb/ Introduction to programming the FRDM/MBED in Java David J. Barnes d.j.barnes@kent.ac.uk @kentdjb https://www.cs.kent.ac.uk/~djb/ Introduction This document is an introduction to programming a FRDM/MBED

More information

Invokedynamic in Practice. Adding invokedynamic support to JRuby

Invokedynamic in Practice. Adding invokedynamic support to JRuby Invokedynamic in Practice Adding invokedynamic support to JRuby Intro Charles Nutter @headius headius@headius.com JRuby guy at Engine Yard JVM enthusiast JRuby Ruby language on JVM Pushes JVM/platform

More information

Real World. static methods and Console & JavaFX App Intros. Lecture 16. Go ahead and PULL Lecture Materials & Sign-in on PollEv

Real World. static methods and Console & JavaFX App Intros. Lecture 16. Go ahead and PULL Lecture Materials & Sign-in on PollEv Go ahead and PULL Lecture Materials & Sign-in on PollEv Poll Everywhere: pollev.com/comp110 Lecture 16 static methods and Console & JavaFX App Intros Real World Spring 2016 Today Our first apps without

More information

Hanley s Survival Guide for Visual Applications with NetBeans 2.0 Last Updated: 5/20/2015 TABLE OF CONTENTS

Hanley s Survival Guide for Visual Applications with NetBeans 2.0 Last Updated: 5/20/2015 TABLE OF CONTENTS Hanley s Survival Guide for Visual Applications with NetBeans 2.0 Last Updated: 5/20/2015 TABLE OF CONTENTS Glossary of Terms 2-4 Step by Step Instructions 4-7 HWApp 8 HWFrame 9 Never trust a computer

More information