| Lugano, 29.03.2014 Ruby on Rails.

Slides:



Advertisements
Similar presentations
More about Ruby Maciej Mensfeld Presented by: Maciej Mensfeld More about Ruby dev.mensfeld.pl github.com/mensfeld.
Advertisements

Apache Struts Technology
Ruby on Rails Model of MVC. Model-View-Controller Paradigm A way of organizing a software system Benefits: Isolation of business logic from the user interface.
Chapter 15 © 2010 by Addison Wesley Longman, Inc Origins and Uses of Ruby - Designed by Yukihiro Matsumoto; released in Use spread rapidly.
Language of the Month If it’s December, it must be Ruby! Adam Coffman and Brent Beer.
Classes & Objects Computer Science I Last updated 9/30/10.
Ruby on Rails Tutorial Peter Mosca April, Ruby on Rails Tutorial Ruby History Invented 12 years ago in Japan by Yukihiro Matsumoto Spent first 5.
Object-Oriented Analysis and Design
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Object-Oriented PHP (1)
Chapter Object-Oriented Practices. Agenda Object-Oriented Concepts Terminology Object-Oriented Modeling Tips Object-Oriented Data Models and DBMSs.
Object Oriented System Development with VB .NET
Creating Web Services with Ruby on Rails Robert Thew Internet and Web Systems II.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
PHP Scripting Language. Introduction “PHP” is an acronym for “PHP: Hypertext Preprocessor.” It is an interpreted, server-side scripting language. Originally.
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
C++ fundamentals.
The chapter will address the following questions:
UNIT-V The MVC architecture and Struts Framework.
Web Development Methodologies Yuan Wang(yw2326). Basic Concepts Browser/Server (B/S) Structure Keywords: Browser, Server Examples: Websites Client/Server.
A little engineering on Rails Robert W. Hasker. Goals Intro to the Rails framework ▫Basic concepts: MVC, Active Record ▫A bit of Ruby Using Rails to build.
RUBY ON RAILS Mark Zhang. In this talk  Overview of Ruby on Rails  Core ideas  Show a tiny bit of example code  Touch on several general web development/
Ruby on Rails Charles Severance Textbook: Build Your own Ruby on Rails Application by Patrick Lenz (ISBN: )
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Java Programming, 3e Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
UFCEUS-20-2 : Web Programming Lecture 5 : Object Oriented PHP (1)
MVC pattern and implementation in java
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
Ruby & rails by Nicholas Belotti. What is ruby Ruby is an object orientated scripting language. In Ruby...everything is an object! Ruby was released in.
Web Application Programming Carol Wolf Computer Science.
L. Grewe LAMP, WAMP and... Motivaiton Basic Web Systems with Delivery of Static and Dynamic Web Pages html, css, media javascript (“dynamic” on client.
Design Patterns Phil Smith 28 th November Design Patterns There are many ways to produce content via Servlets and JSPs Understanding the good, the.
1 An Introduction to the Development of Web Applications using Ruby on Rails with Ajax Ansgar Berhorn, B.Sc. and Mike Rowe, Ph.D.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 Message Analysis Table.
1 Dr Alexiei Dingli Web Science Stream Introducing Rails.
Ruby! Ronald L. Ramos. What is Ruby? Ruby is a scripting language designed by Yukihiro Matsumoto, also known as Matz. It runs on a variety of platforms,
3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 1 February 20, 2004 Lecture 3: Introduction to Software Analysis and.
CakePHP is an open source web development framework. It follows Model-View- Controller and is developed using PHP. IT is the basic for user to create.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
10 Reasons to Choose the Yii Framework. The development of Yii framework began on January 1, 2008.Yii framework It is an open source application that.
Website Development with PHP and MySQL Saving Data.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
Ruby/Ruby on Rails Yasushi Osonoi Open Dream corporation
Model View Controller MVC Web Software Architecture.
Ruby on Rails Evaluation – Cognitive Dimensions Joshua Sunshine
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Salman Marvasti Sharif University of Technology Winter 2015.
WHAT IS SERVER SIDE SCRIPTING? Server-side scripting is a web server technology in which a user's request is verified by running a script directly on the.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
APACHE STRUTS ASHISH SINGH TOMAR ast2124. OUTLINE Introduction The Model-View-Controller Design Pattern Struts’ implementation of the MVC Pattern Additional.
Apache Struts Technology A MVC Framework for Java Web Applications.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
Basics Components of Web Design & Development Basics, Components, Design and Development.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Intro To MVC Architecture.
Presented By P.SRIVIDYA 085D1A0552 Programming Language.
12. DISTRIBUTED WEB-BASED SYSTEMS Nov SUSMITHA KOTA KRANTHI KOYA LIANG YI.
Cake PHP – OOPS approach for PHP
Introduction The concept of a web framework originates from the basic idea that every web application obtains its foundations from a similar set of guidelines.
Introduction and Principles
Server Concepts Dr. Charles W. Kann.
Types of Programming Languages
PHP / MySQL Introduction
MVC Framework, in general.
5 Leading web development Framework is good for developing a Secure Website.
Object-Oriented PHP (1)
Web Application Development Using PHP
Presentation transcript:

| Lugano, Ruby on Rails

© RailsGirls Ticino 2014 – 2 INTRODUCTION THE BASICS THE BASICS – ROR DEVELOPING THE APPLICATION CONCLUSIONS

01. Introduction

© RailsGirls Ticino 2014 – 4 Introduction – The Background The programming language Ruby was creted by Yukihiro Matsumoto in 1993 But initially it wasn’t a great success! Unpopular for over a decade Originally the documentation only existed in Japanese!!! The turning point was in 2006 The year when the framework Ruby on Rails started gaining recognition

© RailsGirls Ticino 2014 – 5 Introduction – Some Features The programming language Ruby is: open source general purpose interpreted object oriented Ruby has borrowed a lot from other programming languages, such as: Smalltalk, Perl, Python, C, C++, PHP, Phyton... In fact, one of their first slogans was: ( Smalltalk + Perl ) / 2

© RailsGirls Ticino 2014 – 6 Introduction – What is Ruby On Rails (ROR) ? RUBY ON RAILS IS “... an Open-source web framework that’s optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration.” “... a breakthrough in lowering the barriers of entry to programming. Powerful web applications that formerly might have taken weeks or months to develop can be produced in a matter of days.” ( source: ) Ruby on Rails, or RoR, is an open source MVC (Model View Controller) framework based on Ruby. With Ruby on Rails, you can develop applications in a simple way minimising the part of coding that is usually repeated in every application. The pattern Model View Controller is a programming convention that makes the distinction between the data representation, the logic of the application and the content more clear. The applications developed in Ruby on Rails are especially suited for dynamic, flexible use with a continuous need for updating or future additions.

© RailsGirls Ticino 2014 – 7 Introduction - Why Ruby On Rails WHY CHOOSE RUBY ON RAILS FOR DEVELOPING? Simple Intuitive Scalable Fast Minimises code complexity The code is self explanatory Since it eliminates the dull parts of coding, there’s more time to concentrate on the essentials: the user’s idea of how the app should be. The strengths of RoR

© RailsGirls Ticino 2014 – 8 Introduction – Websites On Rails Twitter, SlideShare, GitHub, Basecamp, Shopify, Scribd, OneHub, Yellow Page, Ask.fm, Cookpad, Hulu, CrunchBase, Zendesk, MedHelp, Freckle, CrazyEgg, 43Things……………..

© RailsGirls Ticino 2014 – 9 Introduction – Who uses Rails

02. The basics

© RailsGirls Ticino 2014 – 11 Object Oriented Programming (OOP) Allows grouping definitions of data structures and procedures operating on them into restricted bits (classes) of the source code. In object oriented programming (OOP, Object Oriented Programming) an object may be sen as a container of data with attributes (data) and a group of methods (procedures) defined in its class. An object is an instance of a class It is assigned all the attributes and methods defined in its class. Features : Heritability Polymorphism Encapsuling The definition

© RailsGirls Ticino 2014 – 12 Object Oriented Programming (OOP) Heritability Teacher Student Person - name - surname - address +getName() +getAddress() +setData() This diagram shows how Teacher and Student derive from the class Person from which they inherit attributes and methods; they “extend” the class Person Superclass Subclasses - faculty - nrAvs

© RailsGirls Ticino 2014 – 13 Object Oriented Programming (OOP) Example Object Class class Person attr_accessor : name, :surname, :address def initialize (name, surname, = = = address end

03. The basics - ROR

© RailsGirls Ticino 2014 – 15 MVC The data (model) is separated from the interface (view) Model - Maintains the connection between the objects and the database, and is in charge of confirming, connecting, transactions and other processes. - Access to the data and the logic of the application - Indipendent of the view and the controller. View - Presentation of the data and interaction with the user - Only displays what is in the model Controller The logic of the application. - Coordinates the interaction between the user, the view and the model. - In charge of what is happening The Model View Controller pattern

© RailsGirls Ticino 2014 – 16 MVC 1. The browser sends a request 2. The controller interacts with the model 3. The controller calls the view 4. The view displays the information in the browser How It Works

© RailsGirls Ticino 2014 – 17 The Structure Of A Ruby on Rails Application The applications developed using Rails share a common feature; they are all organised according to the same structure. This is because the command rails generates a group of directories and files that follow a guideline that permits Rails to implement various things automatically (for instance loading and generating files as well as recognising them during runtime). This common structure also aids in understanding other developers’ code easily, as the projects are organised according to the same principles. The structure of the applications

© RailsGirls Ticino 2014 – 18 Naming conventions – Ruby on Rails Rails has configuration conventions to save the developer the trouble of having to specify e.g. the association between tables and classes. For the association between tables and classes to work, it’s enough that the tables are given the pluralised lowercase names of the classes. EXAMPLE : The table messages thus mapped to the class Message, authors to Author and topics to Topic. The mechanism of the ActiveRecord that takes care of the conversion is more intelligent than you’d think; for instance, it understands that the plural of \person” is \people" and the plural of \status” is \statuses". ModelsThe Contoller Views

04. Developing the application

05. Conclusions

© RailsGirls Ticino 2014 – 21 Tutorial

© RailsGirls Ticino 2014 – 22 Conclusions QUESTIONS

[ ] [facebook] Rails Girls Ticino THANK YOU