AngularJS. CRUD Application example with AngularJS and Rails 4. Slides By: Jonathan McCarthy

Size: px
Start display at page:

Download "AngularJS. CRUD Application example with AngularJS and Rails 4. Slides By: Jonathan McCarthy"

Transcription

1 AngularJS CRUD Application example with AngularJS and Rails 4 1 Slides By: Jonathan McCarthy

2 Create a new Rails App For this example we will create an application to store student details. Create a new rails 4 app - rails new student_app Slides By: Jonathan McCarthy 2

3 Run the Application After creating the new application, cdange directory to the new project folder. - cd student_app Run the app - rails s Go to Slides By: Jonathan McCarthy 3

4 Create a Student Scaffold A student should have the following values: - Firstname - Lastname - Student Number - Address Run the following command to create the scaffold rails generate scaffold student firstname:string lastname:string student_num:string string Create the database (run the following command) - rake db:migrate Slides By: Jonathan McCarthy 4

5 Add some sample data Run the server (rails s), go to Add 5 students to the system Slides By: Jonathan McCarthy 5

6 Setup Angular Slides By: Jonathan McCarthy 6

7 Including Angular Go to: And download angular zip Create a new folder in assets/javascripts named angularexternal. Extract the zip folder contents to angularexternal Slides By: Jonathan McCarthy 7

8 Including jquery and Angular Update the application.html.erb template to look include the following: <script src=" <script src="/assets/angularexternal/angular.min.js"></script> <script src="/assets/angularexternal/angular-route.js"></script> <script src="/assets/angularexternal/angular-resource.min.js"></script> <script src="/assets/angular/controllers/student_controller.js"></script> It should look like: (next Slide) Slides By: Jonathan McCarthy 8

9 Including jquery and Angular Slides By: Jonathan McCarthy 9

10 Including Angular By adding the two gems in the previous step, this will add Angular to the web application. Update the template: ng-app="mycrudapp" <div class="maincontent" ng-view> <%= yield %> </div> Slides By: Jonathan McCarthy 10

11 Application.html.erb The template file should look as follows: Slides By: Jonathan McCarthy 11

12 Setup JS Angular files In the assets\javascripts directory, create a new folder named angular - mkdir angular - cd angular - mkdir controllers This will be used to contain the logic for the Angular functionality. Slides By: Jonathan McCarthy 12

13 Create a Angular Student Controller Create a new file named student_controller.js in the /assets/javascripts/angular/controllers folder. Add the following to the file: - var mycrudapp = angular.module('mycrudapp', ['ngroute', 'ngresource']); Slides By: Jonathan McCarthy 13

14 Factory and Providers The Factory is used to send and recieve information from out server side application. The usage of the Factory will create an object and prepoerties will be added to the object. When the object is passed to the controller, these prepoerties that are part of the object will be available in the controller for use through the Factory. See: Slides By: Jonathan McCarthy 14

15 Setup the Factory Add the following to student_controller.js mycrudapp.factory('students', ['$resource',function($resource){ return $resource('/students.json', {},{ query: { method: 'GET', isarray: true }, create: { method: 'POST' } }) }]); The first Factory is named Students. We can query students or create a new student. Slides By: Jonathan McCarthy 15

16 Setup the Factory Add the following to student_controller.js mycrudapp.factory('student', ['$resource', function($resource){ return $resource('/students/:id.json', {}, { show: { method: 'GET' }, update: { method: 'PUT', params: {id: '@id'} }, delete: { method: 'DELETE', params: {id: '@id'} } }); }]); The second Factory is named Student and allows us to show students, update an existing student and to delete a student. This is following Rails restful resources. Slides By: Jonathan McCarthy 16

17 student_controller.js The file student_controller.js should now look as follows: Slides By: Jonathan McCarthy 17

18 Routing in Angular $routeprovider provides routing functionality to the Angular application with minimal effort. $routeprovider is the provider for the $route service. The $route service allows us to easily link controllers, templates and the URL in the address bar. The $route service can be used preserve the back and forward navigation in the browser. Slides By: Jonathan McCarthy 18

19 Setup the Routes Add the following to student_controller.js // This is the Routes Section mycrudapp.config([ '$routeprovider', '$locationprovider', function($routeprovider, $locationprovider) { $routeprovider.when('/students',{ templateurl: '/templates/students/index.html', controller: 'StudentListCtr' }); $routeprovider.when('/students/new', { templateurl: '/templates/students/new.html', controller: 'StudentAddCtr' }); $routeprovider.when('/students/:id/edit', { templateurl: '/templates/students/edit.html', controller: 'StudentUpdateCtr' }); $routeprovider.otherwise({ redirectto: '/students' }); } ]); Slides By: Jonathan McCarthy 19

20 Create the Angular Templates For this simple CRUD example, we will create the following templates: - Index.html - New.html - Edit.html - _form.html The templates will be stored in the public folder in the Rails applcation. The next slide wil detail the setup of the templates. Slides By: Jonathan McCarthy 20

21 Create the Angular Templates In the rails projects public folder, create a new folder named templates and in this create a folder named students. Create 4 new files in the student with the following names: - index.html - new.html - edit.html - _form.html Slides By: Jonathan McCarthy 21

22 Form Explination <div class="form-group" ng-class="{'has-error' : submitted && studentform.firstname.$invalid}"> <label class="control-label col-md-3">first name <span class="required">* </span> </label> <div class="col-md-4"> <input type="text" name="firstname" class="formcontrol" ng-model="student.firstname" required placeholder="first name"/> </div> <p ng-show=" submitted && studentform.firstname. $invalid" class="help-block">first name is required.</p> </div> Slides By: Jonathan McCarthy 22

23 _form.html <div class="form-group" ng-class="{'has-error' : submitted && studentform.firstname.$invalid}"> <label class="control-label col-md-3">first name <span class="required">* </span> </label> <div class="col-md-4"> <input type="text" name="firstname" class="form-control" ng-model="student.firstname" required placeholder="first name"/> </div> <p ng-show=" submitted && studentform.firstname.$invalid" class="help-block">first name is required.</p> </div> <div class="form-group" ng-class="{'has-error' : submitted && studentform.lastname.$invalid}"> <label class="control-label col-md-3">last name <span class="required">* </span> </label> <div class="col-md-4"> <input type="text" name="lastname" class="form-control" ng-model="student.lastname" required placeholder="last name"/> </div> <p ng-show=" submitted && studentform.lastname.$invalid" class="help-block">last name is required.</p> </div> <div class="form-group" ng-class="{'has-error' : submitted && studentform. .$invalid}"> <label class="control-label col-md-3"> <span class="required">* </span> </label> <div class="col-md-4"> <input type=" " name=" " class="form-control" ng-model="student. " required placeholder="test@example.com"/> </div> <p ng-show="submitted && studentform. .$error.required" class="help-block"> is required.</p> <p ng-show="submitted && studentform. .$error. " class="help-block">enter valid </p> </div> <div class="form-group"> <label class="control-label col-md-3">student Number </label> <div class="col-md-4"> <input type="text" name="student_num" class="form-control" ng-model="student.student_num" placeholder=" "/> </div> <p ng-show="submitted && studentform.student_num.$invalid" class="help-block">student Number is required.</p> </div> <div class="form-group"> <div class="pull-left"> <a class="btn btn-default" href="/"> Back</a> <button type="submit" class="btn btn-primary" ng-click="submitted=true">submit</button> </div> </div> Slides By: Jonathan McCarthy 23

24 new.html <div class="col-md-10"> <form class="tab-pane active form-horizontal" id="first" name="studentform" novalidate ng-submit="save()"> <h3 class="block">add new student</h3> <div ng-include src="'/templates/students/_form.html'"></div> </form> </div> Slides By: Jonathan McCarthy 24

25 edit.html <div class="col-md-10"> <form class="tab-pane active form-horizontal" id="first" name="studentform" novalidate ng-submit="update()"> <h3 class="block">edit student</h3> <div ng-include src="'/templates/students/_form.html'"></div> </form> </div> Slides By: Jonathan McCarthy 25

26 index.html <br/> <div class="row"> <div class="col-md-12"> <a class="btn btn-primary" href="#/students/new">create a student</a> <h3 class="block">students</h3> <table class="table table-striped"> <tr> <th>first Name</th> <th>last Name</th> <th>student Number</th> <th> </th> <th></th> </tr> <tr ng-hide="students.length" > <td colspan="5">no students found, Please create one.</td> </tr> <tr ng-show="students.length" ng-repeat="student in students"> <td>{{student.firstname}}</td> <td>{{student.lastname}}</td> <td>{{student.student_num}}</td> <td>{{student. }}</td> <td> <a href="#/students/{{student.id}}/edit">edit</a> <a href="" ng-click="deletestudent(student.id)">remove</a> </td> </tr> </table> </div> </div>

27 Adding Controllers to the App Next we will add the Angular controllers to the application Slides By: Jonathan McCarthy 27

28 List Controller mycrudapp.controller("studentlistctr", ['$scope', '$http', '$resource', 'Students', 'Student', '$location', function($scope, $http, $resource, Students, Student, $location) { $scope.students = Students.query(); $scope.deletestudent = function (studentid) { if (confirm("are you sure you want to delete this student?")){ Student.delete({ id: studentid }, function(){ $scope.students = Students.query(); $location.path('/'); }); } }; }]); Slides By: Jonathan McCarthy 28

29 Add Controller mycrudapp.controller("studentaddctr", ['$scope', '$resource', 'Students', '$location', function($scope, $resource, Students, $location) { $scope.student = {} $scope.save = function () { if ($scope.studentform.$valid){ console.log('here' + $scope.student); //Students.create({student: $scope.student}, function(){ Students.create($scope.student, function(){ $location.path('/'); }, function(error){ console.log(error) }); } } }]); Slides By: Jonathan McCarthy 29

30 Update Controller mycrudapp.controller("studentupdatectr", ['$scope', '$resource', 'Student', '$location', '$routeparams', function($scope, $resource, Student, $location, $routeparams) { $scope.student = Student.get({id: $routeparams.id}) $scope.update = function(){ if ($scope.studentform.$valid){ console.log('here2' + $scope.student); Student.update($scope.student,function(){ $location.path('/'); }, function(error) { console.log(error) }); } }; }]); Slides By: Jonathan McCarthy 30

31 Where to place the controller code Add the code for the controllers to the student_controller.js Slides By: Jonathan McCarthy 31

32 CSRF Edit application_controller.rb Update /app/controllers/application_controller.rb to look as follows. The changes will allow Rails to work with the Angular app. class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception after_filter :set_csrf_cookie_for_ng def set_csrf_cookie_for_ng cookies['xsrf-token'] = form_authenticity_token if protect_against_forgery? end protected def verified_request? super form_authenticity_token == request.headers['x-xsrf-token'] end end Slides By: Jonathan McCarthy 32

33 Update Routes.rb Update routes.rb to look as follows: Rails.application.routes.draw do resources :students root 'students#index' end Slides By: Jonathan McCarthy 33

34 Run the App Run the application and test the functionality. Slides By: Jonathan McCarthy 34

35 Questions Slides By: Jonathan McCarthy 35

AngularJS. CRUD Application example with AngularJS and Rails 4. Slides By: Jonathan McCarthy

AngularJS. CRUD Application example with AngularJS and Rails 4. Slides By: Jonathan McCarthy AngularJS CRUD Application example with AngularJS and Rails 4 1 Slides By: Jonathan McCarthy Create a new Rails App For this example we will create an application to store student details. Create a new

More information

3 Days Training Program

3 Days Training Program 3 Days Training Program What is AngularJS? A JavaScript framework for creating dynamic web applications Open Source GitHub: https://github.com/angular/angular.js MIT License Uses jquery jquery 1.7.1 or

More information

Making a live edit contact list with Coldbox REST & Vue.js

Making a live edit contact list with Coldbox REST & Vue.js Tweet Making a live edit contact list with Coldbox REST & Vue.js Scott Steinbeck Mar 28, 2016 Today we will be making a contact database that you can quickly and easily manage using ColdBox and Vue.js.

More information

Single Page Applications

Single Page Applications Single Page Applications Mendel Rosenblum Web Apps and Browsers Web apps run in browsers (by definition) Users are use to browsing in browsers Browser maintains a history of URLs visited Back button -

More information

What is AngularJS. à Javascript Framework à MVC à for Rich Web Application Development à by Google

What is AngularJS. à Javascript Framework à MVC à for Rich Web Application Development à by Google AngularJS What is AngularJS à Javascript Framework à MVC à for Rich Web Application Development à by Google Why AngularJS Other frameworks deal with HTML s shortcomings by either abstracting away HTML,

More information

Tim Roes. Android- & inovex in Karlsruhe. GDG Karlsruhe Co-Organizer.

Tim Roes. Android- & inovex in Karlsruhe. GDG Karlsruhe Co-Organizer. AngularJS Workshop Tim Roes Android- & Web-Developer @ inovex in Karlsruhe GDG Karlsruhe Co-Organizer www.timroes.de/+ Matthias Reuter Web-Developer @ inovex in Karlsruhe @gweax Multipage Application

More information

AngularJS. Beginner's guide - part 2

AngularJS. Beginner's guide - part 2 AngularJS Beginner's guide - part 2 Summary of the previous lesson 1. To add AngularJS to an empty page: a) Download the script angular.js from https://angularjs.org/ b) Link it in the header

More information

ADDING INPUTS FORM FACTORY V2

ADDING INPUTS FORM FACTORY V2 1 Example input This tutorial will guide you through creation of a simple text input field. I will use form-factorysnippets-extension module but you can use any module with dependency on Form Factory.

More information

Building JSR-286 portlets using AngularJS and IBM Web Experience Factory

Building JSR-286 portlets using AngularJS and IBM Web Experience Factory Building JSR-286 portlets using AngularJS and IBM Web Experience Factory Overview This article illustrates how to build JSR-286 portlets using AngularJS framework and IBM Web Experience Factory (WEF) for

More information

AngularJS AN INTRODUCTION. Introduction to the AngularJS framework

AngularJS AN INTRODUCTION. Introduction to the AngularJS framework AngularJS AN INTRODUCTION Introduction to the AngularJS framework AngularJS Javascript framework for writing frontend web apps DOM manipulation, input validation, server communication, URL management,

More information

Working Bootstrap Contact form with PHP and AJAX

Working Bootstrap Contact form with PHP and AJAX Working Bootstrap Contact form with PHP and AJAX Tutorial by Ondrej Svestka Bootstrapious.com Today I would like to show you how to easily build a working contact form using Boostrap framework and AJAX

More information

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. AngularJS

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. AngularJS I AngularJS About the Tutorial AngularJS is a very powerful JavaScript library. It is used in Single Page Application (SPA) projects. It extends HTML DOM with additional attributes and makes it more responsive

More information

Rails: MVC in action

Rails: MVC in action Ruby on Rails Basic Facts 1. Rails is a web application framework built upon, and written in, the Ruby programming language. 2. Open source 3. Easy to learn; difficult to master. 4. Fun (and a time-saver)!

More information

Spring Data JPA, Spring Boot, Oracle, AngulerJS 적용게시판실습 게시판리스트보기.

Spring Data JPA, Spring Boot, Oracle, AngulerJS 적용게시판실습 게시판리스트보기. Spring Data JPA, Spring Boot, Oracle, AngulerJS 적용게시판실습 http://ojc.asia, http://ojcedu.com 게시판리스트보기 Spring JDBC 또는 MyBatis로만들때보다쉽고빠르게작성할수있다. 스프링컨트롤러는 RestController를적용했으며, 뷰페이지에 Bootstrap 및 AngulerJS 적용했다.

More information

CSCI-2320 Web Programming: Ruby on Rails

CSCI-2320 Web Programming: Ruby on Rails CSCI-2320 Web Programming: Ruby on Rails Mohammad T. Irfan Plan u Model-View-Controller (MVC) framework of web programming u Ruby on Rails 1 Ruby on Rails u Developed by David Hansson released 2004 u MVC

More information

Project Part 2 (of 2) - Movie Poster And Actor! - Lookup

Project Part 2 (of 2) - Movie Poster And Actor! - Lookup Getting Started 1. Go to http://quickdojo.com 2. Click this: Project Part 2 (of 2) - Movie Poster And Actor! - Lookup This is an extension of what you did the last time (the Movie Poster lookup from Week

More information

Lecture 7. Action View, Bootstrap & Deploying 1 / 40

Lecture 7. Action View, Bootstrap & Deploying 1 / 40 Lecture 7 Action View, Bootstrap & Deploying 1 / 40 Homeworks 5 & 6 Homework 5 was graded Homework 6 was due last night Any questions? 2 / 40 How would you rate the di culty of Homework 6? Vote at http://pollev.com/cis196776

More information

Advantages: simple, quick to get started, perfect for simple forms, don t need to know how form model objects work

Advantages: simple, quick to get started, perfect for simple forms, don t need to know how form model objects work 1 Forms 1.1 Introduction You cannot enter data in an application without forms. AngularJS allowed the user to create forms quickly, using the NgModel directive to bind the input element to the data in

More information

AngularJS Intro Homework

AngularJS Intro Homework AngularJS Intro Homework Contents 1. Overview... 2 2. Database Requirements... 2 3. Navigation Requirements... 3 4. Styling Requirements... 4 5. Project Organization Specs (for the Routing Part of this

More information

AngularJS - Walkthrough

AngularJS - Walkthrough AngularJS - Walkthrough Setting up Yeoman and its generatorangular Assuming that you have installed node.js, you can install yeoman as follows: npm install -g yo npm install -g generator-angular Now, we

More information

Rails: Views and Controllers

Rails: Views and Controllers Rails: Views and Controllers Computer Science and Engineering College of Engineering The Ohio State University Lecture 18 Recall: Rails Architecture Wiring Views and Controllers A controller is just an

More information

Dingle Coderdojo 6. Project Part 2 (of 2) - Movie Poster And Actor! - Lookup. Week 6

Dingle Coderdojo 6. Project Part 2 (of 2) - Movie Poster And Actor! - Lookup. Week 6 Dingle Coderdojo 6 Week 6 Project Part 2 (of 2) - Movie Poster And Actor! - Lookup This is an extension of what you did the last time (the Movie Poster lookup from Week 5). Make sure you ve finished that

More information

ADVANCED JAVASCRIPT #8

ADVANCED JAVASCRIPT #8 ADVANCED JAVASCRIPT #8 8.1 Review JS 3 A conditional statement can compare two values. Here we check if one variable we declared is greater than another. It is true so the code executes. var cups = 15;

More information

JSON POST WITH PHP IN ANGULARJS

JSON POST WITH PHP IN ANGULARJS JSON POST WITH PHP IN ANGULARJS The POST method is used to insert the data. In AngularJS, we should post the form data in JSON format to insert into the PHP file. The PHP server side code used to get the

More information

A conditional statement can compare two values. Here we check if one variable we declared is greater than another. It is true so the code executes.

A conditional statement can compare two values. Here we check if one variable we declared is greater than another. It is true so the code executes. ANGULARJS #7 7.1 Review JS 3 A conditional statement can compare two values. Here we check if one variable we declared is greater than another. It is true so the code executes. var cups = 15; var saucers

More information

By the end of this Angular 6 tutorial, you'll learn by building a real world example application:

By the end of this Angular 6 tutorial, you'll learn by building a real world example application: Throughout this Angular 6 tutorial, we'll learn to build a full-stack example web application with Angular 6, the latest version of Angular The most popular framework/platform for building mobile and desktop

More information

AngularJS Introduction

AngularJS Introduction AngularJS Introduction Mendel Rosenblum AngularJS JavaScript framework for writing web applications Handles: DOM manipulation, input validation, server communication, URL management, etc. Considered opinionated

More information

THE HITCHHIKERS GUIDE TO. Harper Maddox CTO, EdgeTheory 30 September 2014

THE HITCHHIKERS GUIDE TO. Harper Maddox CTO, EdgeTheory 30 September 2014 THE HITCHHIKERS GUIDE TO! Harper Maddox CTO, EdgeTheory 30 September 2014 DON T PANIC ENJOYMENT OF ANGULAR Services, Modules promises, directives Angular RULEZ I m doing it wrong @#$% Taken from Alicia

More information

Input and Validation. Mendel Rosenblum. CS142 Lecture Notes - Input

Input and Validation. Mendel Rosenblum. CS142 Lecture Notes - Input Input and Validation Mendel Rosenblum Early web app input: HTTP form tag Product: Deluxe:

More information

ANGULARJS - MOCK TEST ANGULARJS MOCK TEST II

ANGULARJS - MOCK TEST ANGULARJS MOCK TEST II http://www.tutorialspoint.com ANGULARJS - MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to AngularJS Framework. You can download these sample mock tests

More information

Introduction to AngularJS

Introduction to AngularJS CHAPTER 1 Introduction to AngularJS Google s AngularJS is an all-inclusive JavaScript model-view-controller (MVC) framework that makes it very easy to quickly build applications that run well on any desktop

More information

Angular 2 Programming

Angular 2 Programming Course Overview Angular 2 is the next iteration of the AngularJS framework. It promises better performance. It uses TypeScript programming language for type safe programming. Overall you should see better

More information

Table of Contents EVALUATION COPY

Table of Contents EVALUATION COPY Table of Contents What is Ruby on Rails?... 1-2 Overview of Rails Components... 1-3 Installing Rails... 1-5 A Simple Rails Application... 1-6 Starting the Rails Server... 1-8 Static Pages Within a Rails

More information

ANGULARJS INTERVIEW QUESTIONS

ANGULARJS INTERVIEW QUESTIONS ANGULARJS INTERVIEW QUESTIONS http://www.tutorialspoint.com/angularjs/angularjs_interview_questions.htm Copyright tutorialspoint.com Dear readers, these AngularJS Interview Questions have been designed

More information

This project will use an API from to retrieve a list of movie posters to display on screen.

This project will use an API from   to retrieve a list of movie posters to display on screen. Getting Started 1. Go to http://quickdojo.com 2. Click this: Project Part 1 (of 2) - Movie Poster Lookup Time to put what you ve learned to action. This is a NEW piece of HTML, so start quickdojo with

More information

UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2016 EXAMINATIONS. CSC309H1 S Programming on the Web Instructor: Ahmed Shah Mashiyat

UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2016 EXAMINATIONS. CSC309H1 S Programming on the Web Instructor: Ahmed Shah Mashiyat UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2016 EXAMINATIONS CSC309H1 S Programming on the Web Instructor: Ahmed Shah Mashiyat Duration - 2 hours Aid Sheet: Both side of one 8.5 x 11" sheet

More information

Comprehensive Angular 2 Review of Day 3

Comprehensive Angular 2 Review of Day 3 Form Validation: built in validators: added to template: required minlength maxlength pattern form state: state managed through NgModel classes: control has been visited: ng-touched or ng-untouched control

More information

INTRODUCTION TO WEB DEVELOPMENT IN C++ WITH WT 4

INTRODUCTION TO WEB DEVELOPMENT IN C++ WITH WT 4 INTRODUCTION TO WEB DEVELOPMENT IN C++ WITH WT 4 Roel Standaert FOSDEM 2018 https://www.webtoolkit.eu/wt CONTENTS What is Wt? A simple Hello world Creating a larger application, with: Templates Style sheets

More information

Day 3: 26/April/2012 Scaffolding Generation of Skeletons; Test run Memopad

Day 3: 26/April/2012 Scaffolding Generation of Skeletons; Test run Memopad Day 3: 26/April/2012 Scaffolding Generation of Skeletons; Test run Memopad p Generate WEB screens of the MemoPad Database Application n Setting up for Database Connection n Automatic generation of DB Files

More information

Advanced Angular & Angular 6 Preview. Bibhas Bhattacharya

Advanced Angular & Angular 6 Preview. Bibhas Bhattacharya Advanced Angular & Angular 6 Preview Bibhas Bhattacharya Agenda Lazy loading modules Using Bootstrap with Angular Publish/subscribe with the RxJS Subject API What's new in Angular 6 Lazy Loading Modules

More information

Courslets, a golf improvement web service. Peter Battaglia

Courslets, a golf improvement web service. Peter Battaglia Courslets, a golf improvement web service Peter Battaglia Discussion Project Overview Design and Technologies Utilized Rails and REST URLs, URLs, URLs Rails and Web Services What s s exposed as a service?

More information

User manual Scilab Cloud API

User manual Scilab Cloud API User manual Scilab Cloud API Scilab Cloud API gives access to your engineering and simulation knowledge through web services which are accessible by any network-connected machine. Table of contents Before

More information

FatModel Quick Start Guide

FatModel Quick Start Guide FatModel Quick Start Guide Best Practices Framework for ASP.Net MVC By Loma Consulting February 5, 2016 Table of Contents 1. What is FatModel... 3 2. Prerequisites... 4 Visual Studio and Frameworks...

More information

Jquery Ajax Json Php Mysql Data Entry Example

Jquery Ajax Json Php Mysql Data Entry Example Jquery Ajax Json Php Mysql Data Entry Example Then add required assets in head which are jquery library, datatable js library and css By ajax api we can fetch json the data from employee-grid-data.php.

More information

User Authentication and Session Control

User Authentication and Session Control User Authentication and Session Control CITS3403 Web & Internet Technologies Includes material from Agile Web Development with Rails, 3rd Ed, 2008 and 4 th Ed 2011, 2012 The Pragmatic Programmers. Slides

More information

Lecture 4. Ruby on Rails 1 / 49

Lecture 4. Ruby on Rails 1 / 49 Lecture 4 Ruby on Rails 1 / 49 Client-Server Model 2 / 49 What is it? A client (e.g. web browser, phone, computer, etc.) sends a request to a server Request is an HTTP request Stands for HyperText Transfer

More information

Source. Developer Guide / forms

Source. Developer Guide / forms Developer Guide / forms Controls (input, select, textarea) are a way for user to enter data. Form is a collection of controls for the purpose of grouping related controls together. Form and controls provide

More information

Contents in Detail. Foreword by Xavier Noria

Contents in Detail. Foreword by Xavier Noria Contents in Detail Foreword by Xavier Noria Acknowledgments xv xvii Introduction xix Who This Book Is For................................................ xx Overview...xx Installation.... xxi Ruby, Rails,

More information

Nagaraju Bende

Nagaraju Bende AngularJS Nagaraju Bende Blog Twitter @nbende FaceBook nbende http://angularjs.org Agenda Introduction to AngularJS Pre-Requisites Why AngularJS Only Getting Started MV* pattern of AngularJS Directives,

More information

LAMPIRAN-LAMPIRAN A. Source Code 1) Sample Controller pada HomeController.php

LAMPIRAN-LAMPIRAN A. Source Code 1) Sample Controller pada HomeController.php 67 LAMPIRAN-LAMPIRAN A. Source Code 1) Sample Controller pada HomeController.php

More information

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB Unit 8 HTML Forms and Basic CGI Slides based on course material SFU Icons their respective owners 1 Learning Objectives In this unit you will

More information

Rails: Associations and Validation

Rails: Associations and Validation Rails: Associations and Validation Computer Science and Engineering College of Engineering The Ohio State University Lecture 17 Schemas, Migrations, Models migrations models database.yml db:migrate db:create

More information

c360 Web Connect Configuration Guide Microsoft Dynamics CRM 2011 compatible c360 Solutions, Inc. c360 Solutions

c360 Web Connect Configuration Guide Microsoft Dynamics CRM 2011 compatible c360 Solutions, Inc.   c360 Solutions c360 Web Connect Configuration Guide Microsoft Dynamics CRM 2011 compatible c360 Solutions, Inc. www.c360.com c360 Solutions Contents Overview... 3 Web Connect Configuration... 4 Implementing Web Connect...

More information

AngularJS Examples pdf

AngularJS Examples pdf AngularJS Examples pdf Created By: Umar Farooque Khan 1 Angular Directive Example This AngularJS Directive example explain the concept behind the ng-app, ng-model, ng-init, ng-model, ng-repeat. Directives

More information

Lecture 8. Validations & Sessions 1 / 41

Lecture 8. Validations & Sessions 1 / 41 Lecture 8 Validations & Sessions 1 / 41 Advanced Active Record 2 / 41 More Complex Queries Arel provides us with a number of methods to query our database tables So far, we've only used find which limits

More information

Creating Web Pages Using HTML

Creating Web Pages Using HTML Creating Web Pages Using HTML HTML Commands Commands are called tags Each tag is surrounded by Some tags need ending tags containing / Tags are not case sensitive, but for future compatibility, use

More information

Responsive Web Design and Bootstrap MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

Responsive Web Design and Bootstrap MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University Responsive Web Design and Bootstrap MIS 2402 Konstantin Bauman Department of MIS Fox School of Business Temple University Exam 3 (FINAL) Date: 12/06/18 four weeks from now! JavaScript, jquery, Bootstrap,

More information

AngularJS Fundamentals

AngularJS Fundamentals AngularJS Fundamentals by Jeremy Zerr Blog: http://www.jeremyzerr.com LinkedIn: http://www.linkedin.com/in/jrzerr Twitter: http://www.twitter.com/jrzerr What is AngularJS Open Source Javascript MVC/MVVM

More information

Lecture 4. Ruby on Rails 1 / 52

Lecture 4. Ruby on Rails 1 / 52 Lecture 4 Ruby on Rails 1 / 52 Homeworks 2 & 3 Grades were released for homework 2 Homework 3 was due last night Everyone got a style freebie since my default setup ignores spec files and I didn't change

More information

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML UI Course (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) HTML: Introduction The World Wide Web (WWW) and history of HTML Hypertext and Hypertext Markup Language Why HTML Prerequisites Objective

More information

Front-End UI: Bootstrap

Front-End UI: Bootstrap Responsive Web Design BootStrap Front-End UI: Bootstrap Responsive Design and Grid System Imran Ihsan Assistant Professor, Department of Computer Science Air University, Islamabad, Pakistan www.imranihsan.com

More information

Unit V- Client and Server Side Frameworks

Unit V- Client and Server Side Frameworks Web Technology Unit V- Client and Server Side Frameworks By Prof. B.A.Khivsara Note: The material to prepare this presentation has been taken from internet and are generated only for students reference

More information

Data Presentation and Markup Languages

Data Presentation and Markup Languages Data Presentation and Markup Languages MIE456 Tutorial Acknowledgements Some contents of this presentation are borrowed from a tutorial given at VLDB 2000, Cairo, Agypte (www.vldb.org) by D. Florescu &.

More information

TUTORIAL CRUD CODEIGNITER

TUTORIAL CRUD CODEIGNITER TUTORIAL CRUD CODEIGNITER With MySQL Tutorial ini saya dedikasikan untuk yang baru terjun di framework codeigniter, dan para pemula yang ingin belajar secara otodidak. Crud merupakan kewajiban dasar yang

More information

Lazy Loading Techniques

Lazy Loading Techniques Lazy Loading Techniques Introduction Nir Kaufman AngularJS infrastructures - lazy loading techniques: 1. Introducing the lazy loading challenges with AngularJS 2. Review a working demo project overview

More information

User manual Scilab Cloud API

User manual Scilab Cloud API User manual Scilab Cloud API Scilab Cloud API gives access to your engineering and simulation knowledge through web services which are accessible by any network-connected machine. Table of contents Before

More information

AngularJS. Beginner's guide - part 1

AngularJS. Beginner's guide - part 1 AngularJS Beginner's guide - part 1 AngularJS: 2 AngularJS: Superheroic JavaScript MVW Framework 3 AngularJS: Superheroic JavaScript MVW Framework 4 AngularJS: Superheroic JavaScript MVW Framework Javascript

More information

Manual Html A Href Onclick Submit Form

Manual Html A Href Onclick Submit Form Manual Html A Href Onclick Submit Form JS HTML DOM. DOM Intro DOM Methods HTML form validation can be done by a JavaScript. If a form field _input type="submit" value="submit" /form_. As shown in a previous

More information

COM401 Software Engineering Laboratory

COM401 Software Engineering Laboratory Computer Engineering Department COM401 Software Engineering Laboratory November 04, 2014 LAB-3: Rails Introduction Time: 2 lab hours Objectives: Practice with Ruby Symbols Routes MVC pattern CRUD operations

More information

Integrating the Quotation page with your site

Integrating the Quotation page with your site Integrating the with your site Introduction Until June 2014, for customers to obtain a quote for your service, it was necessary to redirect the customer to the Instant-Quote.co site. This is no longer

More information

Dynamic Web Development

Dynamic Web Development Dynamic Web Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie MODULES, VIEWS, CONTROLLERS & ROUTES PART 2 Sec8on

More information

Paythru Remote Fields

Paythru Remote Fields Paythru Remote Fields Paythru Remote Fields are an alternative integration method for the Paythru Client POST API. The integration consists of contructing a basic javascript configuration object and including

More information

PSUG National Information Exchange. Users Helping Users

PSUG National Information Exchange. Users Helping Users PSUG National Information Exchange Users Helping Users PowerQueries And the Data Export Manager By Jim Parsons jparsons@vcschools.org goo.gl/j2uyqn Shared Folder: https://goo.gl/j2uyqn Name: Jim Parsons

More information

Summary 4/5. (contains info about the html)

Summary 4/5. (contains info about the html) Summary Tag Info Version Attributes Comment 4/5

More information

CS 155 Project 2. Overview & Part A

CS 155 Project 2. Overview & Part A CS 155 Project 2 Overview & Part A Project 2 Web application security Composed of two parts Part A: Attack Part B: Defense Due date: Part A: May 5th (Thu) Part B: May 12th (Thu) Project 2 Ruby-on-Rails

More information

Documentation for Import Station

Documentation for Import Station Documentation for Import Station Table of Contents Page 2 of 45 Table of Contents Table of Contents Import Station Setup Download Linux configuration Register translations Configure connection Launch the

More information

Produced by. Agile Software Development. Eamonn de Leastar

Produced by. Agile Software Development. Eamonn de Leastar Agile Software Development Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie Pacemaker

More information

ngphotos (Grails + AngularJS)

ngphotos (Grails + AngularJS) ngphotos (Grails + AngularJS) Robert Pastel, 9/12/2015, 9/13/2015, 9/14/2015, 9/15/2015, 10/18/2015, 12/24/2015, 3/19/2016 Stephen Radachy, 9/30/2015, 11/4/15, 11/11/15, 11/15/15 The goal of the ngphotos

More information

Ten good practices for ASP.NET MVC applications

Ten good practices for ASP.NET MVC applications Ten good practices for ASP.NET MVC applications Dino Esposito JetBrains dino.esposito@jetbrains.com @despos facebook.com/naa4e Options for Web development Fully serverside Fully clientside Hybrid SPA And

More information

Web Focused Programming With PHP

Web Focused Programming With PHP Web Focused Programming With PHP May 20 2014 Thomas Beebe Advanced DataTools Corp (tom@advancedatatools.com) Tom Beebe Tom is a Senior Database Consultant and has been with Advanced DataTools for over

More information

Description: This feature will enable user to send messages from website to phone number.

Description: This feature will enable user to send messages from website to phone number. Web to Phone text message Description: This feature will enable user to send messages from website to phone number. User will use this feature and can send messages from website to phone number, this will

More information

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6 CS 350 COMPUTER/HUMAN INTERACTION Lecture 6 Setting up PPP webpage Log into lab Linux client or into csserver directly Webspace (www_home) should be set up Change directory for CS 350 assignments cp r

More information

aint framework Documentation

aint framework Documentation aint framework Documentation Release 1.0prototype Alexander Steshenko Sep 27, 2017 Contents 1 Introduction 3 1.1 Overview................................................. 3 1.2 Installation................................................

More information

JavaScript Framework: AngularJS

JavaScript Framework: AngularJS บทท 8 JavaScript Framework: AngularJS ว ชา เทคโนโลย เว บ (รห สว ชา 04-06-204) ว ตถ ประสงค การเร ยนร เพ อให ผ เร ยนม ความร ความเข าใจเก ยวก บ JavaScript Framework: AngularJS เพ อให ผ เร ยนสามารถนาเสนอการดาเน

More information

Guide to Integrate. ADSelfService Plus with. Outlook Web App.

Guide to Integrate. ADSelfService Plus with. Outlook Web App. Guide to Integrate ADSelfService Plus with Outlook Web App Contents Document Summary 1 ADSelfService Plus Overview 1 ADSelfService Plus Integration with Outlook Web App 1 Steps Involved 2 Step 1: Locate

More information

A WEB APPLICATION FOR ONLINE POLLING. A Thesis. Presented to the. Faculty of. San Diego State University. In Partial Fulfillment

A WEB APPLICATION FOR ONLINE POLLING. A Thesis. Presented to the. Faculty of. San Diego State University. In Partial Fulfillment A WEB APPLICATION FOR ONLINE POLLING A Thesis Presented to the Faculty of San Diego State University In Partial Fulfillment of the Requirements for the Degree Master of Science in Computer Science by Ashok

More information

Chapter6: Bootstrap 3. Asst.Prof.Dr. Supakit Nootyaskool Information Technology, KMITL

Chapter6: Bootstrap 3. Asst.Prof.Dr. Supakit Nootyaskool Information Technology, KMITL Chapter6: Bootstrap 3 Asst.Prof.Dr. Supakit Nootyaskool Information Technology, KMITL Objective To apply Bootstrap to a web site To know how to build various bootstrap commands to be a content Topics Bootstrap

More information

Mixed Signals Using Fusion s Signals API

Mixed Signals Using Fusion s Signals API Mixed Signals Using Fusion s Signals API One of my favorite features in Fusion is the Signals API a RESTful, flexible, easily implemented mechanism for capturing interesting user events, like (but not

More information

Mastering Modern Payments

Mastering Modern Payments Mastering Modern Payments Using Stripe with Rails by Pete Keen Sample Chapter State and History So far in our little example app we can buy and sell downloadable products using Stripe. We're not keeping

More information

Databases/JQuery AUGUST 1, 2018

Databases/JQuery AUGUST 1, 2018 Databases/JQuery AUGUST 1, 2018 Databases What is a Database? A table Durable place for storing things Place to easily lookup and update information Databases: The M in MVC What is a Database? Your Model

More information

Front End Programming

Front End Programming Front End Programming Mendel Rosenblum Brief history of Web Applications Initially: static HTML files only. Common Gateway Interface (CGI) Certain URLs map to executable programs that generate web page

More information

CP215 Application Design

CP215 Application Design CP215 Application Design Microsoft HoloLens developer preorder: $3,000 Tech News! Tech News! Microsoft HoloLens developer preorder: $3,000 Raspberry Pi 3 with Wi-Fi and Bluetooth built-in: $35 Hacker's

More information

Learn to Build Awesome Apps with Angular 2

Learn to Build Awesome Apps with Angular 2 Learn to Build Awesome Apps with Angular 2 Strong grasp on how to construct and compose features in Angular 2 Agenda Review Challenge Component Driven Architecture Template Driven Forms Server Communication

More information

CSC 405 Computer Security. Web Security

CSC 405 Computer Security. Web Security CSC 405 Computer Security Web Security Alexandros Kapravelos akaprav@ncsu.edu (Derived from slides by Giovanni Vigna and Adam Doupe) 1 The XMLHttpRequest Object Microsoft developers working on Outlook

More information

Connecting Angular and CFML

Connecting Angular and CFML Connecting Angular and CFML Trip Ward About Me Senior Technical Specialist at ICF Owner & Chief Consultant at Trir Software Software Architecture and Development ColdFusion(1998), Java, jquery, HTML5,

More information

About Me. Name: Jonathan Brown. Job: Full Stack Web Developer. Experience: Almost 3 years of experience in WordPress development

About Me. Name: Jonathan Brown. Job: Full Stack Web Developer. Experience: Almost 3 years of experience in WordPress development About Me Name: Jonathan Brown Job: Full Stack Web Developer Experience: Almost 3 years of experience in WordPress development Getting started With the REST API and Angular JS Folder Structure How to setup

More information

thymeleaf #thymeleaf

thymeleaf #thymeleaf thymeleaf #thymeleaf Table of Contents About 1 Chapter 1: Getting started with thymeleaf 2 Remarks 2 Versions 2 Examples 2 Configuration 2 Using checkboxes 3 Ajax form submition with Jquery 4 Replacing

More information

Getting Started with

Getting Started with Getting Started with Meganadha Reddy K. Technical Trainer NetCom Learning www.netcomlearning.com Agenda How websites work Introduction to JavaScript JavaScript Frameworks Getting Started : Angular JS Q&A

More information

The Hypertext Markup Language (HTML) Part II. Hamid Zarrabi-Zadeh Web Programming Fall 2013

The Hypertext Markup Language (HTML) Part II. Hamid Zarrabi-Zadeh Web Programming Fall 2013 The Hypertext Markup Language (HTML) Part II Hamid Zarrabi-Zadeh Web Programming Fall 2013 2 Outline HTML Structures Tables Forms New HTML5 Elements Summary HTML Tables 4 Tables Tables are created with

More information

Frontend Frameworks. SWE 432, Fall 2016 Design and Implementation of Software for the Web

Frontend Frameworks. SWE 432, Fall 2016 Design and Implementation of Software for the Web Frontend Frameworks SWE 432, Fall 2016 Design and Implementation of Software for the Web Today How do we build a single page app without dying? MVC/MVVM (AngularJS) For further reading: Book: Learning

More information