My presentation will be on the topic of MacRuby. MacRuby is relevent to Ruby developers because it allows us to dive into the world of Mac OS X development using Ruby 1.9. Unlike RubyCocoa, where we would need to use both Ruby and Objective-C, MacRuby's API allows us to just use Ruby.
I will go into a brief history of MacRuby and explain just why it is important to us as Ruby developers. I will then do some live coding of a quick desktop application using MacRuby. Attendees will be able to take away from the presentation a good understanding of MacRuby and the passion to develop something of their own using it.
ECMAScript 6 (ES6) is getting closer and closer with more support available in both node 0.12.0 and io.js. ES6 promises to fundamentally change the way we develop applications on node.js by allowing for the use of generators for iterators and a standard promises library for orchestrating our asynchronous calls. In this talk we will explore the implications of ES6 for the node driver and applications written on top of the driver.
ECMAScript 6 (ES6) is getting closer and closer with more support available in both node 0.12.0 and io.js. ES6 promises to fundamentally change the way we develop applications on node.js by allowing for the use of generators for iterators and a standard promises library for orchestrating our asynchronous calls. In this talk we will explore the implications of ES6 for the node driver and applications written on top of the driver.
ECMAScript 6: A Better JavaScript for the Ambient Computing EraAllen Wirfs-Brock
We've entered the Ambient Computing Era and JavaScript is its dominant programing language, But a new computing era needs a new and better JavaScript. It's called ECMAScript 6 and it's about to become the new JavaScript standard. Why do we need it? Why did it take so long? What's in it? When can you use it? Answers will be given.
The slides from erlounge Wellington 02-2009. Umleintung is a tiny HTTP redirect daemon based on mochiweb and CouchDB.
It describes how to bootstrap a mochiweb application and integrate CouchDB.
PHP / MySQL applications are compatible to all operating systems, support all the popular databases, 100% remotely configurable, perfect for web programming & provide higher performance and speed.
PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.
MySQL is a Relational Database Management System (RDBMS) that uses Structured Query Language (SQL).
PHP is the most popular scripting language for web development. It is free, open source and server-side (the code is executed on the server).
PHP third party tool and plug-in integration such as chat, forum, blog and search engine
ECMAScript 6: A Better JavaScript for the Ambient Computing EraAllen Wirfs-Brock
We've entered the Ambient Computing Era and JavaScript is its dominant programing language, But a new computing era needs a new and better JavaScript. It's called ECMAScript 6 and it's about to become the new JavaScript standard. Why do we need it? Why did it take so long? What's in it? When can you use it? Answers will be given.
The slides from erlounge Wellington 02-2009. Umleintung is a tiny HTTP redirect daemon based on mochiweb and CouchDB.
It describes how to bootstrap a mochiweb application and integrate CouchDB.
PHP / MySQL applications are compatible to all operating systems, support all the popular databases, 100% remotely configurable, perfect for web programming & provide higher performance and speed.
PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.
MySQL is a Relational Database Management System (RDBMS) that uses Structured Query Language (SQL).
PHP is the most popular scripting language for web development. It is free, open source and server-side (the code is executed on the server).
PHP third party tool and plug-in integration such as chat, forum, blog and search engine
The talk focuses on the processes and requirements to ship a software, which was written with MacRuby, to the end user. I present libraries and tools, that are helpful for this purpose and show how to use them.
Presented on 8/14/2012 at BostonRb. This talk provides a nice intro and overview of what RubyMotion is and whether or not it's worth incorporating into your development toolkit.
This is a set of modified MacRuby presentation slides given at the Pittsburgh Ruby Brigade meeting on Nov 5, 2009. The original presentation was given by Patrick Thomson at C4[3] in September, 2009. Slides 68 and 69 were added by me for the PghRB talk.
Patrick's original slides are available at http://www.slideshare.net/importantshock/why-macruby-matters
Playing With Fire - An Introduction to Node.jsMike Hagedorn
node.js is an evented server-side Javascript framework powered by the Google V8 Javascript engine. It is a platform ideal for creating highly scalable web applications. It has the same simplicity of frameworks such as Sinatra, but is designed to be more peformant from the ground up. This performance is achieved by making all network I/O non blocking and all file I/O asynchronous. We will go over how that impacts the development experience, and walk through a simple web application. Javascript is foundational to this type of I/O because it is already evented by design. We will also take a brief look a similar evented frameworks such as ruby`s EventMachine.
Explains how to make use of ruby in java-based work environments. There are some hints at .NET equivalents along the way.
This is part 3 of a trilogy of Star Wars-themed ruby talks given at Protegra's SDEC 2011 in Winnipeg, Canada.
Guardian News and Media (GNM) is at the forefront of the digital
revolution. Its award winning network guardian.co.uk is the most
popular news website in the UK. The company recognized that
growing demands from users, advertisers and editorial staff were
beginning to strain the capability of is technology.
Partnering with ThoughtWorks, The Guardian developed a new
platform, taking advantage of innovative technology and adopting
new ways of working as part of the process.
Business Critical Insurance
Broker Management Solution
ThoughtWorks helped an innovative insurance industry solutions
provider to develop a highly complex broker management application
– agencyPlus. Built using Agile best practices across a distributed
65-person team, agencyPlus is an incredibly functionally rich, flexible
and scalable insurance broker solution.
Preparing Grameen’s Systems For Tomorrow
The Grameen Foundation wanted to ensure it had the optimal
reporting platform for its open source application system, Mifos,
which provides a wide range of processing services to microfinance
institutions globally. ThoughtWorks stepped in to help ensure that
Mifos had a reporting component that would allow maximum
customization, performance and scalability.
Empowering Dealers With A New Loan Origination System:
When this financial services client projected its lease and loan origination volumes to
double due to expansion into a new product line, it turned to ThoughtWorks. Utilizing
cutting-edge technology, ThoughtWorks created an origination system equipped to process
the higher volumes, improve transaction turnaround time and deliver new features to the dealer sales channel.
Ruby is a wonderful language for rapid development, it is easy to learn, we have wonderful frameworks, an active and dynamic community. But when it comes to concurrency Ruby is plagued with problems, controversies and urban legends. A lot of people would know about green threads in Ruby, GIL and its inherent limitations. But that it only one part of the big picture. Ruby offers much more than threads to helps us with concurrency.
This presentation explores other options of writing highly concurrent applications in Ruby and options available in it. We cover topics ranging from Actor like message passing concurrency in Ruby, dataflow concurrency of how we can coordinate across different threads, Event driven methods, coroutine based concurrency which never blocks ;) and finally Software Transactional Memory. We look at lots of code, some serious looking yet colorful performance graphs comparisons, and conditions at which each of these forms are concurrency are effective and ineffective.
Ruby is a wonderful language for rapid development, it is easy to learn, we have wonderful frameworks, an active and dynamic community. But when it comes to concurrency Ruby is plagued with problems, controversies and urban legends. A lot of people would know about green threads in Ruby, GIL and its inherent limitations. But that it only one part of the big picture. Ruby offers much more than threads to helps us with concurrency.
This presentation explores other options of writing highly concurrent applications in Ruby and options available in it. We cover topics ranging from Actor like message passing concurrency in Ruby, dataflow concurrency of how we can coordinate across different threads, Event driven methods, coroutine based concurrency which never blocks ;) and finally Software Transactional Memory. We look at lots of code, some serious looking yet colorful performance graphs comparisons, and conditions at which each of these forms are concurrency are effective and ineffective.
Would you like to know how to build an application server from scratch? This talk would provide an insight to the thought process and the key decisions made while building WebROaR from grounds up using C & Ruby.
What enables this server to deliver high performance and also offer a rich bouquet of integrated features like Analytics, Exception Notifications etc? If gaining knowledge about design of a good software product interests you, do join us for this interactive session.
Ruby on Rails versus Django - A newbie Web Developer's Perspective -Shreyank...ThoughtWorks
As I have been developing Web Applications for just more than an year now, I can safely introduce myself as a Newbie Web Developer. A year ago, when I started out, my first choice when it came to building Web Apps was Ruby on Rails. The reason was the fascination. There was a steep learning curve from my Python background, but it was all worth it.
Today, working in the industry as a Web Programmer, I program applications in both Ruby on Rails and Django. And during my coffee-breaks, when I sit down and retrospect, I start comparing. And when I compare, I come up with advantages and disadvantages of both the web frameworks.
Both Ruby on Rails and Django are no doubt (in my opinion) the two best Web Frameworks in existence. Both have their own bits of Superiority and Inferiority when compared with the other. My talk aims to put these bits in front of the audience and have a little discussion on the areas of improvements.
Nick Sieger-Exploring Rails 3 Through Choices ThoughtWorks
One of the most eagerly anticipated aspects of the fast-approaching Rails 3 release is its inherent modularity, and how that modularity gives the application developer more choice. We'll start with a tour of some of the headlining differences between Rails 2 and 3, and then put Rails 3's internal architecture to the test by demonstrating how to plug in some non-standard standard components, including an example of how to wire in a Java library using JRuby.
Present and Future of Programming Languages - ola biniThoughtWorks
Programming languages are at the core of our profession. But we don't always give them as much credence as they deserve. The strength of Ruby lies in its heritage from a number of different languages, and a look at the history leading up to Ruby might reveal what lies in store for the future. At the moment a lot of attention is spent looking at programming languages and developers are realizing that your language is an important tool. I will talk a little bit about why languages matter, why you should know several, and what the future of languages might look like.
The ruby on rails i18n core api-Neeraj KumarThoughtWorks
Across the world, natural or regional languages differ in many ways, (e.g. in pluralization rules). Therefore, Internationalization became a complex problem and it is hard to provide tools for solving all problems at once. Sven Fuchs focused to provide an extensible framework and easy to use gem that is Ruby I18n (internationalization) gem.
The Ruby I18n gem is mainly designed for translating your application to a single custom language other than English or for providing multi-language support for your ruby on rails application. The pivotal point of the new I18n api in Rails is the I18n module which is provided as a gem and shipped with Rails (starting from Rails 2.2) in ActiveSupport’s vendor directory.
Therefore, during my presentation I will try to go over some of the advanced optional features and architecture of I18n gem. Besides, I will also try to cover begin with I18n gem, setup, benefits, the work flow, what's in? and what's not? Etc.
Project Fedena and Why Ruby on Rails - ArvindArvind G SThoughtWorks
Fedena is an open source school management software based on Ruby on Rails framework. It is a web 2.0 web application being developed by Foradian Technologies. Fedena is currently in closed beta. Visit http://www.fedena.com/ or http://en.wikipedia.org/wiki/Fedena more info.
The first part is about the birth of fedena. And why we chose Ruby on Rails for its development. My team was not experienced in Ruby on Rails. Actually they had no experience on practical programming skills other than the textbook knowledge on C and C++ that they get from and Electronics and Communication degree. They are now experienced programmers in ROR and are actively involved in various opensource ROR projects.
The second part is about our experience on ROR and the advantages and disadvantages we felt while coding and deploying. The third part of the talk is about why we are giving fedena as opensource to the community. The business model of opensource software.
Glass fish rubyconf-india-2010-Arun gupta ThoughtWorks
GlassFish is an open source and production-quality application server with full enterprise support from Sun Microsystems. In addition to traditional Java EE applications, it allows applications developed using different Ruby frameworks to be easily deployed as well. The choice of application frameworks is also available for Groovy/Grails and Python/Django apps and can be easily extended further.
This talk will demonstrate how GlassFish provides an extensible framework that allow applications created using different Ruby frameworks can be easily deployed. The attendees will learn the different deployment models available in GlassFish through live coding examples and several customer use cases of Rails deployments on GlassFish. The talk will show how Rails, Sinatra, Merb and any Rack-based framework can be easily deployed on GlassFish. It demonstrates how popular Rails applications can be easily deployed on GlassFish without any modification, and shows how GlassFish Gem can be used as an effective alternative to WEBrick, Mongrel, and other traditional deployment models.
It also explains the inner workings of GlassFish so that developers understand what’s happening under the hood. It will explain how standard Java monitoring technologies like JMX can be used to monitor/manage these applications.
The session also demonstrates how NetBeans provides a comprehensive IDE for developing, running, and debugging a Rails application directly on GlassFish – all without using any Java code.
Storage and computation is getting cheaper AND easily accessible on demand in the cloud. We now collect and store some really large data sets Eg: user activity logs, genome sequencing, sensory data etc. Hadoop and the ecosystem of projects built around it present simple and easy to use tools for storing and analyzing such large data collections on commodity hardware.
Topics Covered
* The Hadoop architecture.
* Thinking in MapReduce.
* Run some sample MapReduce Jobs (using Hadoop Streaming).
* Introduce PigLatin, a easy to use data processing language.
Speaker Profile: Mahesh Reddy is an Entrepreneur, chasing dreams. Works on large scale crawl and extraction of structured data from the web. He is a graduate frm IIT Kanpur(2000-05) and previously worked at Yahoo! Labs as Research Engineer/Tech Lead on Search and Advertising products.
iPhone, the next generation mobile platform has revolutionized the way one uses phones as it's a combination of a phone, an iPod and an internet device. The iPhone is a richer platform for application delivery due to an exponential growth and wide spread usage.
The critical factor, for a successful mobile application is the end user experience: application usability, reliability, and performance which the iPhone delivers in style. There are thousands of applications created by hundreds of developers for the iPhone. This kind of innovation helps you start developing the next generation of innovative mobile applications now.
Topics Covered
* Current State of iPhone Development
* Fast Track to Objective C
* Fast Track to XCode and Interface Builder
* Getting Productive using OR-Framework, Testing, Serialization
Munjal Budhabhatti is a senior solution developer at ThoughtWorks. He possesses over 10 years of experience in designing large-scale enterprise applications and has implemented innovative solutions for some of the largest microfinance, insurance and financial organizations. He loves writing well-designed enterprise applications using Agile processes. His article on "Test-Driven Development and Continuous Integration for Mobile Applications" was recently published in the Microsoft Architecture Journal.
Simplicity, ease of use, clean syntax and clear semantics are the characteristics of a good DSL that enable the users to focus on the problem. It is non-trivial to define, develop and maintain a DSL, especially using traditional compiler techniques. The Ruby programming language solves this issue to a certain extent.
Topics Covered
* Fundamentals of DSLs.
* Introduction of Ruby features for writing DSLs.
* Writing a DSL - The speakers' experience, with examples.
* Challenges and Issues.
Speaker Profiles:
Harshal Hayatnagarkar is a researcher at Tata Research Development and Design Centre, Pune (a division of TCS) with many years of experience in writing large-scale trading systems, DSLs and high performance machine learning systems. Currently he is writing a DSL for information visualization using Ruby.
Rohan Kini: is a Senior Developer at ThoughtWorks. He has been working with Ruby since 2005 on one of the earliest Ruby projects in India. He specializes in development of large-scale, web-based applications and scripting languages.
Cloud Computing: A New Computing Paradigm
Welcome to an interactive Webinar on Cloud Computing which has brought about a new approach to developing, deploying and managing applications at scale. With its unique and efficient on-demand and elastic capabilities it can level the playing field for companies from start-ups to large corporations.
Speaker Profile: Viswanathan K (Vish) was most recently VP of Engineering and CIO at Yahoo! India R&D. He has over 20 years experience in the IT industry in Internet, Brokerage, Financial Services and Telecom verticals. About 14 years of his professional career was spent in the US working for large multinationals.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
5. OBJECTIVE-C
• Object-oriented extensions to C
• Strongly typed
• Like Ruby, influenced by Smalltalk
• Primary language for Cocoa
• Garbage collection (2.0)
• 32 and 64-bit support
6. COCOA
• Set of object-oriented frameworks
• Used for writing Max OSX and iPhone OS apps
• Includes FoundationKit, and AppKit
• Typically built using tools like XCode and Interface Builder
7. CORE FOUNDATION
• Low level libraries that ship with Mac OSX
• Used for passing primitive types to OSX C routines
• Most routines follow ‘CF’ naming convention
• Open-Sourced by Apple as CF-Lite
14. RUBYCOCOA
• Mac OSX framework
• Bridge between Objective-C and Ruby
• Can manipulate Objective-C objects using Ruby
• Write Cocoa apps in Ruby
• Runs on Ruby 1.8
• Ships with OSX Leopard
19. MAC
RUBY
• Impl. of Ruby 1.9 that runs on the Objective-C runtime
• Open sourced by Apple
• Originally created by Laurent Sansonetti
• Replacing RubyCocoa
• Objects are peers with no translation layer
• Multi-core (Grand Central Dispatch)
• HotCocoa Support
20. MAC
RUBY
Object NSObject
String NSMutableString
Number NSNumber
Array NSMutableArray
Hash NSMutableDictionary
21. MAC
RUBY
Objects Objective-C
Classes Objective-C
Methods Objective-C
36. TDD IN MACRUBY
• Good supports for tests
• AnyRuby testing framework instantly becomes an
Objective-C testing framework
• Test::Unit
• RSpec
• Cucumber
• etc...
37. HOTCOCOA
• Use Ruby to build a UI without Interface Builder
• Developed by Rich Kilmer
• MacRuby 0.5 now supports HotCocoa
• Packaged as a gem in MacRuby 0.5
39. HELLO WORLD IN
HOTCOCOA
require ‘rubygems’
require ‘hotcocoa’
include HotCocoa
application do |app|
win = window :size => [100,50]
b = button :title => ‘Hello’
b.on_action { puts ‘World!’ }
win << b
end
42. MAC
RUBY
Questions?
http://macruby.org
http://macruby.org/hotcocoa.html
http://bit.ly/macruby-getting-started
http://bit.ly/macruby-examples
http://bit.ly/tdd-macruby
http://github.com/masterkain/macruby
Hinweis der Redaktion
- Objective-C is the primary language for Cocoa development. If you&#x2019;ve ventured into Mac OSX, iPhone or iPad development you&#x2019;ve been faced with the decision to learn Objective-C.
- Objective-C is essentially object oriented extensions to the C language
- It&#x2019;s a strongly typed language and is influenced by Smalltalk like Ruby -- Objective-C also has Smalltalk-like messaging
- There&#x2019;s garbage collection in Objective-C 2.0 and also there&#x2019;s also 32-bit and 64-bit support
- Cocoa is a set of object-oriented frameworks used to create Max OSX and iPhone OS applications.
- It includes two major frameworks, Foundation and AppKit.
- AppKit contains all the objects you need to implement your graphical user interface.
- Foundation includes a base layer of classes that can be used for any type of Cocoa app.
- Cocoa apps are typically developed using Xcode and Interface builder using Objective-C.
- Core Foundation is included in Foundation Kit and is a C API that is a mix of low-level routines and wrapper functions
- The most important use of Core Foundation is for passing its own primitive types to numerous GUI related C routines
- You can recognize a Core Foundation function because the naming almost always starts with CF. Some popular ones are CFRetain and CFRelease for memory management.
- Most of Core Foundation was actually open sourced by Apple as a project called CF-Lite
- So what&#x2019;s the big deal with Objective-C anyway?
- Why would we want to use Ruby instead of Objective-C?
I&#x2019;m going to go through some differences between Ruby and Objective C. In the following slides, the lines colored in red is ruby code and blue is Objective-C. Here&#x2019;s one of the most basic examples I can show.
- Here you can see how we pass a parameter to a method in ruby and in Objective-C.
- Also, if you&#x2019;re wondering what the square braces are, they are for binding a message to an object in Objective-C.
- Not that bad but it gets more complicated.
- In Objective-C the colon separates names and arguments.
- It looks like a hash, but it&#x2019;s not and the order for which arguments are passed in matters.
- Also it&#x2019;s good to note that most arguments are identified by name and the first argument is usually included in or attached to the method name.
WIthin Objective-C this is how we would create a new array. We are allocating a NSMutableArray then we are initializing it. Here we&#x2019;re starting to see how much more typing we&#x2019;re going to have to do to accomplish the same thing in Objective-C.
- In this example you can really see how much more we have to do to just strip the white space from a string.
- So, above is how we would create a hash in Ruby and below is how you would have to do, the exact same thing that we can accomplish in one line, in Objective-C.
- Wouldn&#x2019;t it be great if we could use Ruby instead of doing all of this?
- Unless you really really like typing, I don&#x2019;t see how Objective-C could seem more appealing at this point.
- So, this brings us to, RubyCocoa.
- So that brings us now to RubyCocoa
- RubyCocoa is a MacOSX framework
- It&#x2019;s a bridge between Objective-C and Ruby and it can manipulate Objective-C objects using Ruby
- It runs on Ruby 1.8 and it allows you to simply write Cocoa apps in Ruby.
- Also, it ships standard with OSX Leopard, so if you have Leopard or Snow Leopard on your Mac, you&#x2019;ve got RubyCocoa.
- So, this is a comparison between RubyCocoa and Objective-C.
- This example shows the setObject forKey function in Objective-C.
- On top you can see the RubyCocoa implementation, which is more ruby like but we are oddly mixing camelcase with underscores.
- So why not RubyCocoa?
- If we&#x2019;ve already got something that allows us to use Ruby to make Cocoa applications, then why should I use MacRuby?
- Since RubyCocoa is a bridge between Obj-C and Ruby, that means that performance is obviously going to be sacrificed.
- There are also two runtimes and two garbage collectors.
- Also, there&#x2019;s expensive object conversions.
- For example, the first time you access the NSTableView class, RubyCocoa will retrieve all of the necessary info regarding this class and will create a Ruby class of the same name to act as a proxy on demand.
- So, this is where MacRuby comes in.
- MacRuby is set to be the replacement for RubyCocoa.
- So if you&#x2019;re not too much of a fan of Objective-C then you&#x2019;re going to like MacRuby.
If you aren&#x2019;t much of an Objective-C fan you&#x2019;re going to be really happy with MacRuby.
- MacRuby is Ruby 1.9 ported to run on top of Objective-C runtime. So all classes, methods, and objects are all objective-c. They accomplished this by taking advantage of CoreFoundation. This gives you things like native threads, obj-c&#x2019;s garbage collector, and much more.
- Project originally started by Laurent Sansonetti of Apple, who also helped out with RubyCocoa
- Unlike RubyCocoa, there&#x2019;s no bridge or translation layer. That means little to no performance penalties. This also means that Ruby objects map to Objective-C objects without any extra work from you.
- Since MacRuby 0.5&#x2019;s release, they&#x2019;ve supported Apple&#x2019;s Grand Central Dispatch Library to support multi-core processors.
- MacRuby is supposed to be Apple&#x2019;s replacement for RubyCocoa.
- Also, MacRuby 0.5 now has HotCocoa support, which I&#x2019;ll briefly talk about later.
Originally, Macruby was called &#x201C;Ruby+Objc&#x201D; and was developed by Laurent Sansonetti. He started working on it in 2007. In March 2008 the first public version of MacRuby was released. In September of 2008 0.3 was released, which included the HotCocoa library, which allows you to develop interfaces using ruby. In March of this year MacRuby 0.4 was released.
- In MacRuby, Ruby types are nicely backed by foundation equivalents in Objective-C.
- Here you can see the foundation counterparts of these Ruby classes.
- Going further, what we need to realize here is that all objects are objective-c objects, all classes are objective-c classes and all methods defined in a Ruby class are registered with the Objective-C runtime.
- There were able to do this because of Core Foundation, which I mentioned before, which defines all of the primitive data types.
- Instead of using IRB you use MACIRB, which acts and performs the same way as IRB but for MacRuby.
- So what I&#x2019;m trying to show you here is that you use MacRuby the same way you would use traditional ruby.
- All the Ruby types are backed by Foundation equivalents. Here you can see that instead of just a regular Ruby String object being shown, we get back an NSMutableString. Ruby classes like String are now just aliases to their Foundation counterparts.
- Also, it&#x2019;s because of this that we can still call the ruby string method &#x201C;upcase&#x201D; and call the NSMutableString method uppercaseString.
- So it&#x2019;s also good to note that you can build objects by directly calling the Objective-C interface.
- Here you can see us creating a new string by calling NSString.new, stringWithString, and allocating and initializing with a string.
- Here you can see us easily creating an array just how we&#x2019;re used to.
- Also you scan ee that we get back an NSMutableArray instead of just a Ruby array.
- The Array class descends from Ruby and Cocoa objects as well.
- This is an example that shows you what the method definition looks like in objective-c.
- If you&#x2019;re familiar with iPhone development, this is one of the callback methods of CoreLocation.
- We can see here that the data types for each of the arguments that we need to pass in.
- The MacRuby version of this example is shown above.
- It&#x2019;s pretty close except that we removed the data types for each argument and it now looks more like idiomatic ruby with named arguments.
- If you were to try and call this method from MacRuby you could do the following with the named arguments and variables.
- Also, you can even call this method using key-value hash pairs, which could feel much more natural to you.
- And remember that even though it looks like a hash, you have to make sure that the ordering stays the same.
- Interface Builder Outlets are essentially instance variables that refer to other objects.
- When building graphical interfaces with our MacRuby application we need to be able to access our instance variables in Interface Builder so that we can make connections between our controller and our view.
- We can do this by using attr_reader, attr_writer, or attr_accessor in MacRuby. In Objective-C we have to do the following below in red to create an IBOutlet in the header file.
- Interface Builder Actions are methods that we want to be called when a user performs a certain action on an object we specify within Interface Builder. Most commonly this would be a button that you could click on.
- Also, by convention it is mandatory to have one parameter for these actions, which is noted above as sender. Sender specified in the method above would be the button that is clicked.
- Without this sender parameter, Interface Builder will not register this action.
- After talking about all of the awesomeness of MacRuby some of you are probably wondering if you could ditch Objective-C and just write iPhone or iPad apps using MacRuby.
- Sadly, you can&#x2019;t yet. Apple doesn&#x2019;t allow interpreted code and doesn&#x2019;t support garbage collection for the iPhone OS.
- Hopefully this will change but right now you&#x2019;re going to have to stick with Objective-C. You could though, use tools like Appcelerator Titanium to create native apps using JavaScript.
- If you&#x2019;re interested in hearing about that please come see me after this talk - I&#x2019;d love to talk about it.
- With MacRuby development you&#x2019;ll spend a good chunk of time in XCode.
- XCode is an IDE and I&#x2019;m not sure how many people here use it but if you&#x2019;re uncomfortable with it, you can still use your favorite text editor to work on your ruby files but you&#x2019;ll have to come back to XCode to compile your application and run your application.
- Xcode isn&#x2019;t installed by default but it comes on that second disk you get with OSX and it&#x2019;s also available for free online.
- You&#x2019;ll also spend a good chunk of your time using Interface Builder, which is part of Xcode.
- Interface builder allows for you to build the interfaces for your cocoa or macruby applications using a graphical user interface.
- The files you work on are called NIB files which are our views.
- Also, with XCode you get great tools like Instruments.
- Instruments allows you to profile your app, check for leaks, memory usage, cpu usage, see how many objects you create, and much more.
- You get all of this when using MacRuby.
- What&#x2019;s great about MacRuby is that it&#x2019;s also got good support for testing
- Any Ruby testing framework that you&#x2019;d normally use can be used with MacRuby.
- So, the last thing I wanted to talk about was HotCocoa.
- HotCocoa was developed by Rich Kilmer and it&#x2019;s a thin Ruby layer that sits on top of Cocoa and other frameworks.
- It was designed to simplify the way you can create user interfaces without using Interface Builder.
- MacRuby 0.5 now supports HotCocoa and it&#x2019;s included in MacRuby.
- Even though MacRuby allows us to write Cocoa apps using Ruby, if we want to programmatically create our interface we still have to implement the same Objective-C methods to create our UI and that can look a little nasty.
- Below you can see how much nicer it is to do this using HotCocoa.
- This is how simple it is to use HotCocoa to programmatically construct your cocoa application.
- What this does is create a window 100 pixels wide and 50 pixels tall and adds a button with the title &#x2018;Hello&#x2019;. Once you click this button it will spit out &#x2018;World!&#x2019; to your console.
- Well, so MacRuby has a very exciting future ahead.
- The current release is only at version 0.5 so there&#x2019;s so much more that will surprise us before 1.0 is released.
- Also, with Apple&#x2019;s backing, soon everybody could be using Ruby to develop their Cocoa Desktop apps -- also possibly even for the iPhone and the iPad.
- And simply, it just allows you to use Ruby to develop Cocoa applications. How cool is that?
- MacRuby 0.5 is built upon the low level virtual machine (LLVM) in 0.5 but they used to use YARV
- Switched from YARV to LLVM due to YARV&#x2019;s lack of machine code compilation and the global interpreter lock, which prevented true concurrency.
- MacRuby supports Just In Time and Ahead of Time compilation
- AOT compilation makes MacRuby a true Ruby compiler