This document contains the slides from a presentation on Ruby on Rails. The presentation covers an introduction to Ruby programming including object-oriented concepts, variables, strings, regular expressions, arrays/hashes, numerics and methods. It then discusses Ruby on Rails fundamentals like models, views, controllers and ActiveRecord. Finally, it discusses actual experience working with Rails including productivity gains, data modeling challenges, testing and learning Ruby.
This document discusses localizing Ruby on Rails applications. It defines internationalization, localization, and globalization. Localization in Rails involves translating views, models, dates/times, currencies, numbers and other elements to different locales. The document reviews various Rails plugins that can help with localization, including Globalize, Localize, Gloc, and Ruby Gettext. It recommends choosing localization tools wisely and considering model translations may require Globalize.
This document summarizes a presentation about JRuby, an implementation of the Ruby programming language that runs on the Java Virtual Machine. It discusses what JRuby is, how to get started with it, details of its implementation including compilation and threading, and how it addresses various issues with Ruby like performance, memory management, and integration with Java. It also covers some JRuby projects and potential future directions.
Ruby on Rails version 2.1 was released on June 1st, 2008. It included several new features such as timezones, dirty tracking, gem dependencies, named scopes, UTC-based migrations, and better caching. ActiveRecord changes included support for expressions in sum calculations, eager loading of associations, polymorphic URLs, and the ability to add and remove timestamps from tables.
This document summarizes the development and maintenance of a large web application called Arcos over 2.5 years. It includes:
- Details on the codebase which includes nearly 80,000 lines of Perl code, 4,900 lines of SQL, and uses over 140 modules.
- The key features of Arcos including a CMS, e-commerce, data warehouse, email campaigns, job queue, and reporting.
- Challenges around deployment including managing dependencies, upgrades, testing, and configuration.
- Approaches to version control, releases, maintenance, and testing the application.
This document summarizes a presentation about building web applications in Perl using PSGI and Plack. It discusses:
- The history of CGI and its problems with performance
- How mod_perl and other environments addressed these issues but reduced portability
- How PSGI separates web application processing from deployment, allowing applications to run on different servers and frameworks
- A PSGI application is defined as a code reference that returns a response as an array reference
- Plack provides helpers like Plack::Request and Plack::Response to simplify building PSGI applications
- Template Toolkit can be used to separate HTML templates from application code
- User input can be accessed from the environment hash or Plack::Request object
QueryPath provides a jQuery-like tool in PHP. Use it to work with local files, or with remote web services. This presentation illustrates how QueryPath can be used to build elaborate multi-source mash-ups in Drupal.
This document discusses localizing Ruby on Rails applications. It defines internationalization, localization, and globalization. Localization in Rails involves translating views, models, dates/times, currencies, numbers and other elements to different locales. The document reviews various Rails plugins that can help with localization, including Globalize, Localize, Gloc, and Ruby Gettext. It recommends choosing localization tools wisely and considering model translations may require Globalize.
This document summarizes a presentation about JRuby, an implementation of the Ruby programming language that runs on the Java Virtual Machine. It discusses what JRuby is, how to get started with it, details of its implementation including compilation and threading, and how it addresses various issues with Ruby like performance, memory management, and integration with Java. It also covers some JRuby projects and potential future directions.
Ruby on Rails version 2.1 was released on June 1st, 2008. It included several new features such as timezones, dirty tracking, gem dependencies, named scopes, UTC-based migrations, and better caching. ActiveRecord changes included support for expressions in sum calculations, eager loading of associations, polymorphic URLs, and the ability to add and remove timestamps from tables.
This document summarizes the development and maintenance of a large web application called Arcos over 2.5 years. It includes:
- Details on the codebase which includes nearly 80,000 lines of Perl code, 4,900 lines of SQL, and uses over 140 modules.
- The key features of Arcos including a CMS, e-commerce, data warehouse, email campaigns, job queue, and reporting.
- Challenges around deployment including managing dependencies, upgrades, testing, and configuration.
- Approaches to version control, releases, maintenance, and testing the application.
This document summarizes a presentation about building web applications in Perl using PSGI and Plack. It discusses:
- The history of CGI and its problems with performance
- How mod_perl and other environments addressed these issues but reduced portability
- How PSGI separates web application processing from deployment, allowing applications to run on different servers and frameworks
- A PSGI application is defined as a code reference that returns a response as an array reference
- Plack provides helpers like Plack::Request and Plack::Response to simplify building PSGI applications
- Template Toolkit can be used to separate HTML templates from application code
- User input can be accessed from the environment hash or Plack::Request object
QueryPath provides a jQuery-like tool in PHP. Use it to work with local files, or with remote web services. This presentation illustrates how QueryPath can be used to build elaborate multi-source mash-ups in Drupal.
This document provides an introduction to JRuby, which allows Ruby code to run on the Java Virtual Machine. It discusses key features of Ruby like dynamic typing and everything being an object. It then covers how to integrate Ruby and Java code through the Java integration layer, including calling Java from Ruby and converting interfaces. The document concludes by discussing using JRuby for applications, testing Java with RSpec, and build utilities.
This document summarizes a presentation about the future of the Rake gem and domain-specific languages (DSLs) in Ruby.
The presentation discusses:
1. How Rake works as a Make-like program implemented in Ruby syntax with tasks and dependencies. Rake files use standard Ruby syntax.
2. Examples of common patterns for building internal DSLs in Ruby using class/module methods, method definition, implicit/explicit code blocks, and instance evaluation.
3. How popular Ruby gems like Rake, Bundler, and Thor use DSL techniques and inherit from each other to provide domain-specific interfaces.
This document provides an overview and introduction to Ruby on Rails. It begins with an agenda and introduction to the speaker. It then provides a brief introduction to Rails, including what industries use it, examples of popular websites built with Rails, and an explanation of its model-view-controller architecture and RESTful design philosophy. The document continues with sections on auditing Rails applications, identifying common vulnerabilities like mass assignment and cross-site scripting, and recommendations for removing vulnerabilities.
How to develop Jenkins plugin using to ruby and Jenkins.rbHiroshi SHIBATA
- The document discusses developing Jenkins plugins using Ruby and the jpi tool. It covers generating a sample wrapper plugin, configuring the plugin, and building and releasing the plugin through jpi commands.
- The speaker demonstrates creating a sample "rbenv" plugin with jpi to configure Ruby versions and gems for builds.
- Commands like jpi new, generate, build, server and release are used to generate the plugin scaffolding, configure the wrapper, build the plugin file, host it locally for testing, and prepare it for release.
Ola Bini gave a whirlwind tour of JRuby, a Java implementation of the Ruby programming language. Some key points included: JRuby allows Ruby code to run on the Java virtual machine, taking advantage of features like native threading and access to Java libraries. It can run in several modes including interpreted, compiled, and just-in-time compiled. JRuby is commonly used to run Ruby on Rails applications, and tools like ActiveRecord-JDBC facilitate database access. Several other Ruby tools and frameworks like RSpec work with JRuby. Ola demonstrated several JRuby projects including Profligacy, Rubiq, and Swing wrappers. Future work includes finishing the compiler and exploring alternative interpreters like
PECL Picks - Extensions to make your life betterZendCon
This document provides information about various PHP extensions available through PECL (PHP Extension Community Library). It introduces the author and their background, describes what PECL is and provides a brief history. It then discusses the current status of PECL, future plans, and how individuals can get involved. Finally, it highlights and provides code examples for several popular and useful PECL extensions, including APC, Memcache, Imagick, HTTP, UploadProgress and others.
PSGI is a Perl port of Python's WSGI and Ruby's Rack that defines a common interface between web servers and frameworks. Plack provides reference implementations of PSGI servers as well as middleware and utilities. This allows frameworks to run on many servers like standalone, FastCGI, and Apache using a common PSGI application interface. Plack is fast, supports many frameworks through adapters, and provides tools like Plackup and middleware to help build and test PSGI applications.
Plack provides a common interface called PSGI (Perl Server Gateway Interface) that allows Perl web applications to run on different web servers. It includes tools like Plackup for running PSGI applications from the command line and middleware for adding functionality. Plack has adapters that allow many existing Perl web frameworks to run under PSGI. It also provides high performance PSGI servers and utilities for building and testing PSGI applications.
Getting started with Catalyst and extjsPeter Edwards
This document is a presentation about getting started with the ExtJS JavaScript library and the Catalyst Perl framework. It provides an overview of ExtJS and Catalyst, discusses how to put them together in an example application, and concludes that the combination allows for quick and easy development of Web 2.0 applications. The presentation was given at the 2008 Perl Mova conference in Kyiv, Ukraine.
Leave end-to-end testing to Capybara. Capybara is a web testing tool that simulates user interactions with a website. It allows automating browser interactions for scenarios and features using domain-specific languages like Cucumber. Capybara supports using different drivers like Selenium for JavaScript interactions and HtmlUnit for non-JavaScript sites. Specifying the driver and JavaScript support in tests allows running tests across different environments.
Catalyst is a web framework for Perl that allows developers to build dynamic web applications in a modular, reusable way. It utilizes common Perl techniques like Moose, DBIx::Class and Template Toolkit to handle tasks like object modeling, database access and view rendering. Catalyst applications can be built in a model-view-controller style to separate application logic, data access and presentation layers. This framework provides a standard way to write reusable code and build web UIs for tasks like system administration and automation.
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
Building a desktop app using HTTP::Engine as a micro web server, SQLite for data storage, and jQuery for the user interface. Comet and asynchronous workers are used to enable real-time features. JSON-RPC and routing are implemented to support AJAX actions. The combination provides a lightweight "desktop app" architecture that is cross-platform.
The document discusses a computer programmer who is also a guitarist and leads an Agile software development team. It includes code snippets from programming languages like Ruby. There are also descriptions of using source control tools like Git for managing branches, tags, and cherry-picking commits.
Docker is quickly becoming an invaluable development and deployment tool for many organizations. Come and spend the day learning about what Docker is, how to use it, how to integrate it into your workflow, and build an environment that works for you and the rest of your team. This hands-on tutorial will give you the kick-start needed to start using Docker effectively.
The document discusses the state of Ruby on Rails, including one developer's growing dislike of J2EE and dilemma of leaving a high paying J2EE job for Rails, another developer questioning how a Rails application could be written in 600 lines, and mentions 150,000 downloads and 400+ professionals from 55 countries using Rails. It also lists names of contributors to Rails and mentions creating an industry and getting organized.
Ruby on Rails is a web application framework that allows developers to quickly build web applications by following conventions instead of requiring extensive configuration. It aims to make web development easier, faster, and more enjoyable by balancing simplicity, pragmatism, and power. Rails takes care of common tasks like database interaction and rendering views so developers can focus on delivering value to users.
This document provides an introduction to JRuby, which allows Ruby code to run on the Java Virtual Machine. It discusses key features of Ruby like dynamic typing and everything being an object. It then covers how to integrate Ruby and Java code through the Java integration layer, including calling Java from Ruby and converting interfaces. The document concludes by discussing using JRuby for applications, testing Java with RSpec, and build utilities.
This document summarizes a presentation about the future of the Rake gem and domain-specific languages (DSLs) in Ruby.
The presentation discusses:
1. How Rake works as a Make-like program implemented in Ruby syntax with tasks and dependencies. Rake files use standard Ruby syntax.
2. Examples of common patterns for building internal DSLs in Ruby using class/module methods, method definition, implicit/explicit code blocks, and instance evaluation.
3. How popular Ruby gems like Rake, Bundler, and Thor use DSL techniques and inherit from each other to provide domain-specific interfaces.
This document provides an overview and introduction to Ruby on Rails. It begins with an agenda and introduction to the speaker. It then provides a brief introduction to Rails, including what industries use it, examples of popular websites built with Rails, and an explanation of its model-view-controller architecture and RESTful design philosophy. The document continues with sections on auditing Rails applications, identifying common vulnerabilities like mass assignment and cross-site scripting, and recommendations for removing vulnerabilities.
How to develop Jenkins plugin using to ruby and Jenkins.rbHiroshi SHIBATA
- The document discusses developing Jenkins plugins using Ruby and the jpi tool. It covers generating a sample wrapper plugin, configuring the plugin, and building and releasing the plugin through jpi commands.
- The speaker demonstrates creating a sample "rbenv" plugin with jpi to configure Ruby versions and gems for builds.
- Commands like jpi new, generate, build, server and release are used to generate the plugin scaffolding, configure the wrapper, build the plugin file, host it locally for testing, and prepare it for release.
Ola Bini gave a whirlwind tour of JRuby, a Java implementation of the Ruby programming language. Some key points included: JRuby allows Ruby code to run on the Java virtual machine, taking advantage of features like native threading and access to Java libraries. It can run in several modes including interpreted, compiled, and just-in-time compiled. JRuby is commonly used to run Ruby on Rails applications, and tools like ActiveRecord-JDBC facilitate database access. Several other Ruby tools and frameworks like RSpec work with JRuby. Ola demonstrated several JRuby projects including Profligacy, Rubiq, and Swing wrappers. Future work includes finishing the compiler and exploring alternative interpreters like
PECL Picks - Extensions to make your life betterZendCon
This document provides information about various PHP extensions available through PECL (PHP Extension Community Library). It introduces the author and their background, describes what PECL is and provides a brief history. It then discusses the current status of PECL, future plans, and how individuals can get involved. Finally, it highlights and provides code examples for several popular and useful PECL extensions, including APC, Memcache, Imagick, HTTP, UploadProgress and others.
PSGI is a Perl port of Python's WSGI and Ruby's Rack that defines a common interface between web servers and frameworks. Plack provides reference implementations of PSGI servers as well as middleware and utilities. This allows frameworks to run on many servers like standalone, FastCGI, and Apache using a common PSGI application interface. Plack is fast, supports many frameworks through adapters, and provides tools like Plackup and middleware to help build and test PSGI applications.
Plack provides a common interface called PSGI (Perl Server Gateway Interface) that allows Perl web applications to run on different web servers. It includes tools like Plackup for running PSGI applications from the command line and middleware for adding functionality. Plack has adapters that allow many existing Perl web frameworks to run under PSGI. It also provides high performance PSGI servers and utilities for building and testing PSGI applications.
Getting started with Catalyst and extjsPeter Edwards
This document is a presentation about getting started with the ExtJS JavaScript library and the Catalyst Perl framework. It provides an overview of ExtJS and Catalyst, discusses how to put them together in an example application, and concludes that the combination allows for quick and easy development of Web 2.0 applications. The presentation was given at the 2008 Perl Mova conference in Kyiv, Ukraine.
Leave end-to-end testing to Capybara. Capybara is a web testing tool that simulates user interactions with a website. It allows automating browser interactions for scenarios and features using domain-specific languages like Cucumber. Capybara supports using different drivers like Selenium for JavaScript interactions and HtmlUnit for non-JavaScript sites. Specifying the driver and JavaScript support in tests allows running tests across different environments.
Catalyst is a web framework for Perl that allows developers to build dynamic web applications in a modular, reusable way. It utilizes common Perl techniques like Moose, DBIx::Class and Template Toolkit to handle tasks like object modeling, database access and view rendering. Catalyst applications can be built in a model-view-controller style to separate application logic, data access and presentation layers. This framework provides a standard way to write reusable code and build web UIs for tasks like system administration and automation.
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
Building a desktop app using HTTP::Engine as a micro web server, SQLite for data storage, and jQuery for the user interface. Comet and asynchronous workers are used to enable real-time features. JSON-RPC and routing are implemented to support AJAX actions. The combination provides a lightweight "desktop app" architecture that is cross-platform.
The document discusses a computer programmer who is also a guitarist and leads an Agile software development team. It includes code snippets from programming languages like Ruby. There are also descriptions of using source control tools like Git for managing branches, tags, and cherry-picking commits.
Docker is quickly becoming an invaluable development and deployment tool for many organizations. Come and spend the day learning about what Docker is, how to use it, how to integrate it into your workflow, and build an environment that works for you and the rest of your team. This hands-on tutorial will give you the kick-start needed to start using Docker effectively.
The document discusses the state of Ruby on Rails, including one developer's growing dislike of J2EE and dilemma of leaving a high paying J2EE job for Rails, another developer questioning how a Rails application could be written in 600 lines, and mentions 150,000 downloads and 400+ professionals from 55 countries using Rails. It also lists names of contributors to Rails and mentions creating an industry and getting organized.
Ruby on Rails is a web application framework that allows developers to quickly build web applications by following conventions instead of requiring extensive configuration. It aims to make web development easier, faster, and more enjoyable by balancing simplicity, pragmatism, and power. Rails takes care of common tasks like database interaction and rendering views so developers can focus on delivering value to users.
Ruby on Rails is an integrated web application framework written in Ruby that is designed to make web development simple and enjoyable. It includes everything needed to build database-backed web applications according to the model-view-controller pattern, including an object-relational mapper (ORM), web server gateway interface (WSGI) compliant web server, and web page template system. Over 150,000 downloads and 400+ professionals from 55 countries use Rails for its convention over configuration design, instant feedback, and ability to change code on the fly without restarts.
This document outlines Ugo Cei's presentation "Ruby for Java Programmers". The presentation will cover how to integrate Ruby and Java code, including using bridges like JRuby, XML-RPC, and SOAP. It will also demonstrate sample code for calling Java from Ruby and vice versa. The goal is to help Java programmers learn how Ruby can be used alongside or instead of Java in certain scenarios.
The document discusses extracting the Ruby on Rails framework from the Basecamp project at 37signals. It describes how Rails was built to fit the constraints of a small team with limited resources. Rails focuses on liberating good ideas and changing contexts while retaining core insights in order to appeal to smaller teams and companies rather than large enterprises.
This document discusses pursuing beauty in software development using Ruby on Rails. It notes that beauty can lead to happiness, which leads to productivity. When the code is beautifully designed and simple, it is obvious that it is correct. The document also lists several Ruby on Rails features and tools like migrations, plugins, testing, Action Mailer, and Liquid templates. It provides contact information for the author to answer any questions.
This document provides an overview of object-oriented programming (OOP) concepts like abstraction, encapsulation, inheritance and polymorphism. It discusses the evolution of OOP from C to C++ and Java. It highlights how Java addresses portability issues of earlier languages by introducing the write once run anywhere (WORA) paradigm and Java virtual machine (JVM). The document also gives a brief introduction to common Java programming elements like variables, expressions, control flow, methods and classes.
The document summarizes a presentation on Ruby on Rails given by Obie Fernandez. It introduces Ruby and Rails, discussing their object-oriented nature, conventions, and tools. It highlights Rails' productivity gains through conventions and generators. Challenges discussed include a learning curve and limited IDE support. The document concludes Rails is ready for many applications but not all, and the right developer attitude is important.
The document summarizes a presentation on Ruby and Ruby on Rails. It introduces Ruby as a dynamic, object-oriented scripting language similar to Smalltalk and Perl. It then discusses Ruby on Rails, describing it as a "kitchen sink" model-view-controller web application framework built with Ruby. Key aspects of Rails like ActiveRecord, views, and controllers are briefly explained.
Modern Webdevelopment With Ruby On RailsRobert Glaser
Ruby on Rails is a web application framework created in 2004 and extracted from the authors' work on Basecamp. It is a full-stack framework that provides default structures and tools for database access, templating, routing and more. The framework emphasizes conventions over configuration and follows patterns like MVC and REST to provide a pragmatic approach to building web applications. Testing and agile development practices are also core to how Rails applications are built.
This document discusses evolving the Java platform to better support dynamic languages running on the Java Virtual Machine (JVM). It describes several languages like Clojure, Groovy and Scala that already run on the JVM. It then outlines features missing from the JVM that would help these languages, such as dynamic invocation, lightweight method handles, and continuations. The document proposes an experimental "DaVinci Machine" to evolve the JVM by implementing these missing features. It uses the example of Ruby implementation JRuby to show current compiler pain points that could be addressed.
Ruby on Rails is a web application framework that is designed to make programming web applications easier and more enjoyable. It includes features like an object-relational mapper called Active Record that allows database rows to be represented as objects, conventions that reduce configuration, and support for test-driven development. Rails is built on Ruby, an interpreted object-oriented programming language, and aims to be programmer friendly and allow powerful applications to be built quickly. Several experts praise Rails for lowering the barriers to entry for programming and being a well-thought-out framework.
Yet another talk :)
This time in a lecture called “Markup Languages und Anwendungen”
Went pretty ok, but as usual I talked a little bit too fast ^_^
http://www.marc-seeger.de
Software Engineering Thailand: Programming with ScalaBrian Topping
Meet-up, May 28, 2015, Launchpad, Bangkok. http://www.meetup.com/Software-Engineering-Thailand/events/222548484/.
Apologies for the rendering quality not matching the presentation, I did these with Apple Keynote and Slideshare does not support this format. I will try to edit them when there is more time.
Thanks to Bangkok LaunchPad (https://www.facebook.com/launchpadhq) for generously hosting this event!
Those days, when it seemed, that web applications have overthrown standard “cumbersome” client apps, we’ll speak about present and future of consumer oriented desktop applications. This includes, but not restricted to patterns of LOB applications development with WPF, right multimedia support of DirectX bridge and new features, waiting for you in Windows 7. Also we’ll speak about subject oriented programming, will be introduced in NET. 4.0 and how to leverage it even today with the current version of Microsoft framework. tits will be shown during the session, thus restricted to mature audiences
JavaScript was originally created as LiveScript in 1995 and renamed to JavaScript. It is an interpreted scripting language that can be added to HTML pages to provide dynamic interactivity. JavaScript code is executed by the browser's JavaScript engine and does not need to be compiled. It allows manipulating the structure, style, and content of HTML documents, validating form data, detecting browser capabilities, and much more.
NetBeans is an integrated development environment (IDE) written in Java that provides support for developing applications in Ruby and Ruby on Rails. It offers features like code completion, refactoring, debugging and project management functionality. The IDE aims to provide a full-featured environment for developing both Ruby applications and Ruby on Rails web applications.
- The document is a presentation on Ajax given by Alex Russell that covers what Ajax is, how it works, when it should and should not be used, tools for Ajax development, debugging techniques, and the future of Ajax and the open web.
- It includes examples of building an auto-save feature with Ajax using plain JavaScript, Prototype, and Dojo and discusses language features of JavaScript.
- The presentation aims to provide enough knowledge and code examples to get started with Ajax development while addressing open web standards and browser compatibility.
The document discusses why Ruby and Rails are good choices for programming. Ruby is designed to save time and make programming fun and easy to read. Rails provides a full-stack framework that embraces Ruby's philosophy of freedom and productivity. It includes features like MVC, ORM, internationalization and more. Some potential weak points are hosting on Windows and lack of POSIX support, but overall Ruby and Rails provide coherency and maximize productivity and happiness for developers.
This document provides an introduction and overview of PHP and MySQL. PHP is a programming language used for building dynamic web sites. It allows embedding code within HTML pages to quickly create dynamic content. PHP is processed on the server side to produce HTML results. The document outlines PHP basics like syntax, variables, strings, operators, and conditional statements. It also discusses MySQL, the most popular database used with PHP. The document concludes with exercises for users to practice basic PHP concepts.
Creating a GraphQL API is more and more common for PHP developers. The task can seem complex but there are a lot of tools to help.
In this talk given at AFUP Paris PHP Meetup, I'm presenting GraphQL and why it is important. Then, I'm having a look at the existing libraries in PHP. Finally, I'm diving in the details of GraphQLite; a library that creates a GraphQL schema by analyzing your PHP code.
This document discusses object-relational mappers (ORMs) and active records, which bridge the gap between object-oriented languages and relational databases. It covers some of the tradeoffs of using ORMs, including performance impacts. It also discusses techniques for optimizing database queries from an ORM, such as managing indexes, eager loading, lazy loading and inviting the database to join data rather than doing joins client-side. The overall message is that ORMs provide benefits but also performance costs, and programmers should understand how their code will translate to database queries.
Browsers don't care about the programming language, server, or operating system used to build websites - they just display text. Ruby on Rails is a popular web application framework that uses conventions over configurations, allowing developers to focus on solving real problems rather than configuration issues. While constraints can feel limiting, they can also promote better architecture and happier developers.
Scala.js is a compiler that compiles Scala source code to equivalent Javascript code. That lets you write Scala code that you can run in a web browser, or other environments (Chrome plugins, Node.js, etc.) where Javascript is supported. This presentation is an introduction to ScalaJS.
The document provides information about advance web programming concepts including website development, server side scripting, and PHP. It discusses design mistakes to avoid in web development, static and dynamic website content, improving the online design experience, and online design decisions. It also covers installing WAMPSERVER for local development, PHP introduction and syntax, PHP control structures like if/else statements and loops, PHP functions and files, and PHP forms and data handling.
The document provides an introduction to Ruby on Rails, a web application framework built using the Ruby programming language. It discusses Ruby's object-oriented nature and conventions. Rails uses the MVC pattern and ActiveRecord pattern. Rails allows developers to build web apps faster by automatically generating the scaffolding for database access, controllers and views. The document recommends additional resources for learning more about Ruby and Rails.
The document discusses challenges with getting users to adopt new technologies like RSS and web 2.0 features. It notes that only a small percentage of internet users are aware of or use RSS, and many consume RSS feeds without realizing it through web portals. It also discusses how users are often not aware of new features or don't see the value in them. The document advocates talking to users to understand how technologies could fit into their lives and designing products with the intended users in mind from the beginning.
This document discusses various tools and techniques for testing JavaScript code, including:
1. Unit testing frameworks like Test.Unit that allow writing tests with assertions and automatically running tests.
2. Using Rake tasks to automate running tests and controlling browsers.
3. Behavior-driven development (BDD) techniques like RSpec that allow writing tests as should/is statements directly on objects.
4. Debugging tools like Firebug, Safari Web Inspector, and Microsoft Script Debugger for troubleshooting JavaScript issues.
This document discusses different approaches to sharing JavaScript rendering (RJS) code between controllers and views in a Rails application. It explores extracting the code to helpers and custom helpers to avoid duplication. It also discusses defining helpers at the page level and potential maintenance issues. The origins of the RJS API in Rails are reviewed to understand how update_page works and how it can be wrapped in a helper to promote reuse.
This document provides an overview of building a simple to-do list application in Rails over the course of four days. Day 1 covers generating the Rails application, setting up the database and web server, and generating a scaffold for the categories table. Day 2 analyzes the generated scaffold code and customizes it. Day 3 adds an items table, validations between tables, and more scaffolding. Day 4 links notes to items, adds navigation, and downloads the application. The goal is to demonstrate how to build a basic application with Rails and identify resources to continue learning.
The document discusses how motivation is the single greatest influence on performance and productivity. It advocates for optimizing happiness by creating beautiful code through conventions over configuration. Following conventions and constraints can increase flexibility and be liberating. The Ruby on Rails framework aims to provide structure, consistency, and beauty to increase productivity through agile practices like testing, migrations, and domain models.
The document discusses unobtrusive JavaScript and the UJS plugin for Rails. It describes separating JavaScript behavior from HTML content and CSS styling. The UJS plugin allows defining behaviors via CSS selectors and keeping scripts in external files. Examples are given of attaching remote behaviors to links and forms using the UJS plugin.
This document discusses CRUD (Create, Read, Update, Delete) operations and how they are commonly implemented in web applications using the Ruby on Rails framework. It argues that CRUD operations are often seen as simplistic or unworthy but they provide consistency, simplicity, and discoverability. CRUD is a design technique rather than a goal, and there are ways to implement CRUD operations beyond just "things" like relations, events, and states.
Recruiting in the Digital Age: A Social Media MasterclassLuanWise
In this masterclass, presented at the Global HR Summit on 5th June 2024, Luan Wise explored the essential features of social media platforms that support talent acquisition, including LinkedIn, Facebook, Instagram, X (formerly Twitter) and TikTok.
B2B payments are rapidly changing. Find out the 5 key questions you need to be asking yourself to be sure you are mastering B2B payments today. Learn more at www.BlueSnap.com.
Anny Serafina Love - Letter of Recommendation by Kellen Harkins, MS.AnnySerafinaLove
This letter, written by Kellen Harkins, Course Director at Full Sail University, commends Anny Love's exemplary performance in the Video Sharing Platforms class. It highlights her dedication, willingness to challenge herself, and exceptional skills in production, editing, and marketing across various video platforms like YouTube, TikTok, and Instagram.
Zodiac Signs and Food Preferences_ What Your Sign Says About Your Tastemy Pandit
Know what your zodiac sign says about your taste in food! Explore how the 12 zodiac signs influence your culinary preferences with insights from MyPandit. Dive into astrology and flavors!
LA HUG - Video Testimonials with Chynna Morgan - June 2024Lital Barkan
Have you ever heard that user-generated content or video testimonials can take your brand to the next level? We will explore how you can effectively use video testimonials to leverage and boost your sales, content strategy, and increase your CRM data.🤯
We will dig deeper into:
1. How to capture video testimonials that convert from your audience 🎥
2. How to leverage your testimonials to boost your sales 💲
3. How you can capture more CRM data to understand your audience better through video testimonials. 📊
Unveiling the Dynamic Personalities, Key Dates, and Horoscope Insights: Gemin...my Pandit
Explore the fascinating world of the Gemini Zodiac Sign. Discover the unique personality traits, key dates, and horoscope insights of Gemini individuals. Learn how their sociable, communicative nature and boundless curiosity make them the dynamic explorers of the zodiac. Dive into the duality of the Gemini sign and understand their intellectual and adventurous spirit.
The 10 Most Influential Leaders Guiding Corporate Evolution, 2024.pdfthesiliconleaders
In the recent edition, The 10 Most Influential Leaders Guiding Corporate Evolution, 2024, The Silicon Leaders magazine gladly features Dejan Štancer, President of the Global Chamber of Business Leaders (GCBL), along with other leaders.
Navigating the world of forex trading can be challenging, especially for beginners. To help you make an informed decision, we have comprehensively compared the best forex brokers in India for 2024. This article, reviewed by Top Forex Brokers Review, will cover featured award winners, the best forex brokers, featured offers, the best copy trading platforms, the best forex brokers for beginners, the best MetaTrader brokers, and recently updated reviews. We will focus on FP Markets, Black Bull, EightCap, IC Markets, and Octa.
Digital Transformation and IT Strategy Toolkit and TemplatesAurelien Domont, MBA
This Digital Transformation and IT Strategy Toolkit was created by ex-McKinsey, Deloitte and BCG Management Consultants, after more than 5,000 hours of work. It is considered the world's best & most comprehensive Digital Transformation and IT Strategy Toolkit. It includes all the Frameworks, Best Practices & Templates required to successfully undertake the Digital Transformation of your organization and define a robust IT Strategy.
Editable Toolkit to help you reuse our content: 700 Powerpoint slides | 35 Excel sheets | 84 minutes of Video training
This PowerPoint presentation is only a small preview of our Toolkits. For more details, visit www.domontconsulting.com
FIA officials brutally tortured innocent and snatched 200 Bitcoins of worth 4...jamalseoexpert1978
Farman Ayaz Khattak and Ehtesham Matloob are government officials in CTW Counter terrorism wing Islamabad, in Federal Investigation Agency FIA Headquarters. CTW and FIA kidnapped crypto currency owner from Islamabad and snatched 200 Bitcoins those worth of 4 billion rupees in Pakistan currency. There is not Cryptocurrency Regulations in Pakistan & CTW is official dacoit and stealing digital assets from the innocent crypto holders and making fake cases of terrorism to keep them silent.
Building Your Employer Brand with Social MediaLuanWise
Presented at The Global HR Summit, 6th June 2024
In this keynote, Luan Wise will provide invaluable insights to elevate your employer brand on social media platforms including LinkedIn, Facebook, Instagram, X (formerly Twitter) and TikTok. You'll learn how compelling content can authentically showcase your company culture, values, and employee experiences to support your talent acquisition and retention objectives. Additionally, you'll understand the power of employee advocacy to amplify reach and engagement – helping to position your organization as an employer of choice in today's competitive talent landscape.
1. Workin’ on the
Rails Road
Obie Fernandez
Original presentation delivered to the
Object Technology User Group
St. Paul / Minneapolis
September 20th 2005
2. Agenda
Introduction to Ruby Programming
Ruby on Rails Fundamentals and
Interactive Demonstration
Break
Working in Ruby and Rails
Is Rails Ready for Prime Time?
Questions and Answers
3. Questions and Slides
Ask questions at any time
Slides and samples will be
available online at
obiefernandez.com
I’ll show that address and others
again at the end
4. Introduction to
Ruby Programming
“Smalltalk was one of the main influences for
Ruby. Whenever you find a main difference
between Perl and Ruby there's a good chance
to find this feature in Smalltalk.”
RubyGarden
5. What is Ruby?
Object-Oriented scripting language
Conceptual similarities to Smalltalk
Many system and text manipulation
features like Perl
Emphasis on simplicity and design
elegance
6. Ruby is a Dynamic
Language
Completely Object-Oriented
All data is an object, no exceptions
Operators are methods
Dynamic Behavior
Possible to add new classes, add or redefine
methods at runtime
An instance of one class can behave
differently than another instance of the same
class at runtime
7. Powerful Features
Single Inheritance, but…
Modules provide namespaces and allow
‘mixin’ capability
A module is a collection of methods and
constants
Ruby has blocks
Code surrounded by do…end or { … }
They are true closures; get variable bindings
Are passed to methods quite often
8. Ruby Variables
Don’t need declaration
Variable scope determined by
naming convention
foo … local variable
@foo … instance variable
$foo … global variable
Foo or FOO … constant
9. Variable Assignment
An assignment sets the rvalue to the
lvalue
Then it returns the that value as the
result of the assignment expression
Assigning to a variable or constant is
hardwired into Ruby
Assigning to an object attribute is a
method call
Parallel assignment
10. Strings
String
Instances usually created with literal
expressions
Sequences of 8-bit bytes
Printable characters or not, doesn’t matter
Over 75 standard methods
Symbol
Denoted by colon, like :foobar
Basically an interned string, always the same
instance no matter where used in codebase
11. Regular Expressions
Ruby supports Perl-style regular expressions…
# Extract the parts of a phone number
phone = quot;123-456-7890quot;
if phone =~ /(d{3})-(d{3})-(d{4})/
ext = $1
city = $2
num = $3
End
12. Arrays and Hashes
Array
Ordered collection of references
Literal is list of objects between square
brackets
Hash
Used extensively in practice
Any type of object can be used as index
Elements are not ordered
Literal form is key/value pairs enclosed in {…}
using => to map keys to values
13. Numerics
Integer
Small integers are Fixnum, up to size of a
native machine word minus 1 bit
Big integers are Bignum, up to size of
available memory
Conversion happens automatically
Float
Real numbers
Uses native double-precision floating-point
representation
14. Ruby Methods
Only way to change an object’s state
Use def keyword and start with
lowercase letter
Use trailing ? for queries and ! for
dangerous methods
Use trailing = for methods that take
assignment
15. Writing Methods
Default values for parameters supported
Variable-length argument lists by placing
an asterisk on the last parameter
Methods accept blocks implicitly or via
the last parameter being prefixed with an
ampersand
Every called method returns the value of
the last expression. Explicit use of return
statement is optional
16. Calling Methods
Specify receiver, name of method
Parameters and block optional
Parentheses optional
Leaving off receiver defaults to
current object
No ‘keyword arguments’ but
commonly accomplished with
hashes
17. Access Control
Determined dynamically
Public is the default except for
initialize method
Protected
Access by any instance of class
Includes subclasses
Private methods can be called only
in the context of the current object
18. Conditionals
Boolean expressions
Any value that is not nil or the constant
false is true
&& and || operators are shorcircuiting
defined? operator checks its parameter
||= is a common idiom to assign a
default value to a nil element
19. If and Unless
Similar to other languages - if, then,
elsif, else, end
unless is negated form
then is mandatory only on a single-
line if statement
tack on to end of normal statement
to use as conditional modifiers
20. Iterators
while and until are built-in
for … in is syntactic sugar,
translated automatically to a call
to the each iterator method
Other iterators are times, upto,
downto, and step and work with
numerics
21. Exceptions
Ruby has hierarchy of exceptions
Catch them using begin, rescue, ensure, and end
Define multiple rescue clauses or specify more than
one exception to catch as parameters
Exception object is available as $! or use hash notation
to assign variable names on the rescue clause
Use retry after attempting to fix an exception to
rerun the begin clause
Throw exceptions in your own code by using a
raise statement
Subclass StandardError or one of its children
22. Memory Model
Garbage Collection
True mark-and-sweep
Works with all Ruby objects
Multithreading
In-process inside the interpreter
Completely portable
Some negatives like not taking
advantage of multi-processor hosts
23. More Language Features
Portable
OS independent threading
Can load extension libraries
dynamically
Library support
RubyGems package manager
Tons of high-quality open source
libraries available at RubyForge (similar
to CPAN for Perl)
24. Ruby Tools
The following tools are included
with the Ruby distribution
debugger
irb – interactive ruby shell
benchmark
profiler
rdoc
26. Ruby on Rails
Fundamentals
“Rails is a full-stack, open-source web
framework in Ruby for writing real-world
applications with joy and less code than most
frameworks spend doing XML sit-ups”
Rails Creator - David H. Hansson
27. What Is Rails?
‘Kitchen Sink’ MVC Web
Application Framework written
in Ruby
ActiveRecord API
ActionController API
Templating Engine
Scripts and lots of other stuff…
28. Big Productivity Gains
Convention over configuration
Everything is in Ruby
Imposes strong design
constraints
Generators for creating code
skeletons and scaffolding
29. Rails Models
ActiveRecord Model Classes
Encapsulate persistence logic
Contain business rules
Tightly coupled to database tables
Declare relationships to each other
30. ActiveRecord Basics
Extend ActiveRecord::Base
Don’t declare properties
Declare relationships to other
models with the following ‘macros’
belongs_to
has_many
has_and_belongs_to_many (joins)
31. Rails Views
User interface done with templates
HTML with Ruby snippets in .rhtml files
Easy XML generation in .rxml files
Lots of HTML and AJAX helper methods
Sophisticated layout and ‘partials’
functionality
34. Rails
Controllers
Process requests via action
methods that map to URL
Interact with model classes
Set any data needed by view as
field variables
Select view to render or redirect
35. Controller Basics
Extend ActionController:Base
Request parameters in ‘params’
Naming conventions mean Rails can
translate paramaters into a hashtable
Handles multi-dimensional data in
forms pretty easily
Web session in ‘session’ hash
Redirect scope available in ‘flash’
hash for next request only
37. Real Productivity Gains
Possible
Your results may vary!
How many developers on team?
Proficient with Ruby?
Proficient with Rails?
Greenfield project or trying to
adapt to legacy data sources?
38. Rails Doesn’t Make Data
Modeling Any Easier
Stabilize your schema before
ramping up UI development
Bootstrap your db schema with
a migration script
Write an exampledb rake task
39. Speaking of Rake
Dependency-based programming
So much better than Ant you’ll
want to use it on all your projects
Martin Fowler wrote a great
article about it at http://
martinfowler.com/articles/rake.html
40. Not much IDE support…
No Intellij for Ruby and none on the
horizon for awhile
Current Ruby editors are kind of crappy
Eclipse RDT is starting to improve but
not there yet (IMHO)
The nature of dynamically-typed
languages means you might want to
just use a good text-editor instead
41. … how to deal with it
Testing, testing, testing
Use IRB, the interactive console
Pair-programming very useful
Keep Pickaxe and Rails books handy
ri – command-line documentation
42. Unit Tests Crucial
Once you start getting beyond CRUD
features you better unit test
The lack of static typing will get you
if you’re not used to it
It’s a big namespace so watch out
for your code colliding with Rails
methods or magic
43. Learning Ruby
Think about syntax, cause your
editor won’t
Learn to use the debugger
instead of ‘puts’ing around
Blocks are very powerful. Learn
how to use them
44. Learning Rails
Don’t overcommit based on
initial enthusiasm
Easy to get started, but there is
a learning curve
Read the Rails book
45. You’ll Write Less Code
Let Rails do the heavy lifting for you
under the scenes
Ruby is significantly less verbose
than Java and C#
Take advantage of…
Convention over configuration
Ruby lends itself to writing DSL
46. Don’t Repeat Yourself
Refactor, refactor, refactor!
Move repetitive view code into helpers
Consolidate common page chunks into
partials
Rails has A LOT of built-in
functionality (which you won’t know
about as a beginner)
47. Don’t Reinvent the
Wheel
Form helpers are your friend
Rails ‘acts_as’ methods are very
useful
Look for RAA and RubyForge
libraries, particularly to
integrate to web services
48. ActiveRecord Reminder
“When you have this static view of the
database, expressed in terms of n
classes to match your n tables, then
you tend to solve your problems in
those precise terms, because the
code generated by the O/R code
generation tools will encourage (and
perhaps even enforce) such
behavior.” - Brad Wilson
49. Take Advantage of
ActiveRecord Flexibility
Remember ActiveRecord works at runtime
and doesn’t enforce those static views of
your data
The ActiveRecord pattern itself
encourages addition of meaningful finder
methods like find_specials
Custom SQL queries can cause additional
columns to get “tacked on” to returned
objects without extra effort.
(like for aggregate and other types of calculated columns
defined in your SQL select statement)
50. Belongs_to Table Must
Have the Foreign Key
This can really trip you up, even
though it’s repeated multiple times
in the docs
The term “belongs to” is admittedly
confusing
Consider it as “references” or “has
reference to”
51. Don’t Abuse HABTM
Speaking from experience…
has_and_belongs_to_many can be pretty
difficult to understand and use effectively
Prefer simple has_many/belongs_to
relationships where possible
Once you start adding attributes to the
join table, ask yourself if that join actually
wants to be a first-class object
52. ActionMailer Notes
ActionMailer works great for
sending email, particularly the
integration with templating
Receiving email is still
nightmarish depending on your
platform configuration
53. AJAX is Easier With
Rails but…
Some of the documentation is poor
You still have to understand
JavaScript to use it effectively
There are definite “dos and don’ts”
around where and why to use AJAX
54. Other Gotchas
Learning where it’s okay to use
symbols instead of strings
tricky
Lots of methods take hash of
parameters and it’s easy to
mistype one
‘Whiny Nil’ is annoying
55. Are Ruby and
Rails Ready for
Prime Time?
No simple answers, so
let’s discuss it…
56. The Future of Ruby
“It sure looks like more than a fad to me.” - Tim Bray
10 years of continual development and
refinement will continue
Ruby 2.0 is on the horizon
No Microsoft or Sun Microsystems
stupidity to ruin things
Compare with Python adoption rates
Dynamic languages in general gaining
wider acceptance in the enterprise
57. Road to Rails 1.0
80 issues pending (as of 9/20/2005)
http://dev.rubyonrails.com/report/9
Internationalization tops the list
Several issues address developer-
friendliness with error messages and
unknown parameters to API calls
Minor bugs with acts_as_ features
RC might be available in October ‘05
58. Softer Issues
Am I ready for a new language
and development style?
Is my team ready?
Is my company ready?
Do I have the right projects?
59. Common Apprehensions
Mostly concerns about ‘-ilities’
Maintainability
Future availability of Ruby programmers?
Quality/readability of code?
Platform support?
Scalability
Horizontal vs. Vertical scaling
Performance concerns
60. Is Ruby better than..?
Better at what?
Some situations need one tool, other
situations another tool.
Performance-wise Ruby is probably
slower than Java or C# in real-world
situations
Is it worth worrying about relative
performance?
61. Pragmatic Dave on J2EE
“Using the full might of a J2EE
stack to write a small stand-
alone application is using a
sledgehammer to crack a nut. But
I keep hearing the sound of nuts being
pulverized as developers seem to think
that using anything other than J2EE is
somehow unprofessional.”
62. More Pragmatic Dave
“I’d rather write in a language that let’s
me focus on the application, and
which lets me express myself clearly
and effectively.”
“A better algorithm will easily gain
back any marginal performance hit I
take for using a slower language.”
Posted on http://blogs.pragprog.com/
63. J2EE Backlash Fueling
Interest in Rails
“Enterprise Java, has grown
into a complex behemoth
that consists of layer upon
layer of complexity”
David Geary, author of the best-selling
book on Java Server Faces (JSF)
64. Web 2.0 and Rails
Fast time-to-market
Tight integration with AJAX libraries
New emphasis on focused,
interoperable applications
Less time coding infrastructure
means more emphasis on clean
design and elegance in all aspects of
the application
65. When should I use Rails?
Small developer-focused
applications
Opportunities to do parallel
development as proof of
productivity impact
Once you are comfortable with
Ruby and Rails programming
66. When not to use Rails!
Really large applications
Dealing with legacy databases.
Hibernate is much better for
“schemas-from-hell”
Unenthusiastic or mediocre
developers won’t “get it”
67. The Right Developer
Attitude is Crucial
“Agile teams get Ruby on Rails
sooner than traditional ones”
Ruby on Rails increases productivity
and sheer joy of development
Reality is some programmers simply
don’t care about that
68. Ruby on Rails and
Consulting Businesses
Expect web design shops to
continue moving into Rails and
away from PHP (it’s just too
much better not to do so)
Faster projects with less people
means larger consulting firms
might have trouble adapting!
69. Future of Ruby on Rails
Ruby is what makes Rails special, the
interest in general Ruby programming
will continue to expand rapidly
Tons of similar projects popping up, but
none with mindshare and critical mass of
Rails project
Integration of dynamic languages such as
Ruby with Semantic Web technologies
such as RDF holds significant promise
71. In Conclusion…
Thank you for coming to the presentation!
Rails has a large enthusiastic
community at rubyonrails.org
ThoughtWorks is seeking Ruby on
Rails enterprise projects
I blog regularly about Rails and agile
enterprise topics at
obiefernandez.com
I love getting email…
obiefernandez@gmail.com