This document describes how to access a MySQL database from Ruby by using a SOA gateway to create web services from the MySQL tables. It involves installing Ruby and MySQL, populating the MySQL database with sample data, creating a ODBC connection, using the SOA gateway to generate WSDLs and web services from the MySQL tables, and writing a Ruby script to call the web services and retrieve data from the MySQL database via SOAP.
This document provides an introduction to accessing databases using JDBC and MySQL. It discusses how JDBC allows Java programs to connect to and query databases in a vendor-neutral way. It also describes how to install and start the MySQL database server and client programs. It provides examples of connecting to MySQL via JDBC, selecting databases, viewing table schemas, running queries, and manipulating tables by creating, dropping, and creating temporary tables from query results.
Spring Web Services allows creating web services using a contract-first approach. It provides components for defining data contracts with XSD, service contracts with WSDL, and implementing endpoints with annotated classes. Shared abstractions like WebServiceMessage and MessageContext provide common client and server functionality, while the MessageDispatcher handles dispatching requests to endpoints. The framework supports various transports including HTTP, JMS, and email.
This document summarizes common Ruby on Rails security issues and best practices for addressing them. It covers potential information leaks from application setup and deployment, cross-site scripting vulnerabilities from unsanitized user input, session fixation issues, cross-site request forgery problems, SQL injection protection, preventing JavaScript hijacking, securing mass assignment, and security risks related to third-party Rails plugins. The document provides explanations of each issue and recommendations for configuration and code changes to enhance the security of Rails applications.
Secured hosting and maintenance of e-commerce websites has become the need of the hour. Modern day websites are highly vulnerable to threats such as hacking, phishing, pharming, denial of access etc. Magento is considered to be one of the most secured e-commerce platform that is easy to install and ready to use. The inbuilt security features of Magento and the additional benefits of AWS makes it the safest and secured platform for modern applications.
Magento is an open source cloud based digital commerce platform that empowers merchants to integrate digital and physical shopping experiences. Magento enterprise edition provides an engaging shopping experience to the users by providing personalized content, fast checkout and a seamless shopper experience. However, in order to ensure the integrity of the user experience and sensitive customer data, it is important to follow security and deployment best practices. stackArmor’s cybersecurity and cloud deployment experts have developed a proven and full-stack methodology to help protect and secure applications and data. The diagram below provides an overview of the key layers and security countermeasures.
AWS offers a wide variety of configuration and deployment choices requiring infrastructure, systems engineering and AWS engineering expertise. The cloud experts at stackArmor, have developed an easy to use deployment automation harness called StackBuilderTM. StackBuilderTM allows users to quickly deploy and use their Magento e-commerce website hosted on AWS. StackBuilder’s intelligent cloud deployment engine takes care of instance selection, AWS VPC configuration and software installation. The fully managed Magento service includes patching, vulnerability management, continuous monitoring, data encryption, and recovery & backup support.
stackArmor StackBuilder provides a rich and easy to use consumer-grade experience for non-technical users to jumpstart their projects by answering a series of simple questions. StackBuilder’s intelligent provisioning and capacity estimation engine leverages the rich set of services provided by the AWS cloud platform including wide variety of EC2 instances, Virtual Private Cloud (VPC), Auto Scaling Groups, Clustering and Elastic Load Balancers (ELB) amongst others. The user of StackBuilderTM does not have to go through the various steps associated with configuring and setting up the AWS infrastructure as they are handled automatically. This allows the user to focus on his project without waiting for costly consultants or the need for cloud infrastructure expertise.
This document discusses configuring claims-based authentication in SharePoint 2010. It involves 3 main steps:
1. Creating a web application in SharePoint Central Administration and enabling forms-based authentication.
2. Configuring the ASP.NET membership provider and role manager by modifying the web.config files for the web application, Central Administration site, and Security Token Service.
3. Adding users to the SQL database using a membership seeding tool and testing authentication with the users.
BISP is committed to provide BEST learning material to the beginners and advance learners.In the same series, we have prepared a complete end-to end Hands-on Guide for WebLogicAdministration. The document focuses on detailed information about WebLogic Admin Consoleand Scripting tool. Join our professional training program and learn from experts
This document provides instructions for setting up a production WebLogic Server configuration with high availability and failover capabilities. It describes how to create a WebLogic domain with an administration server and two managed servers configured in a cluster. The domain is created using the domain configuration wizard in both graphical and command line modes. The administration server and both managed servers are started and configured on separate machines. The environment is tested by accessing the administration console and verifying the running states of the servers.
Horizontal clustering involves running multiple Java application servers across two or more separate physical machines, with the application servers divided between the machines - for example, having the admin server and two managed servers on one machine and two additional managed servers on a second machine. The document then provides step-by-step instructions for installing WebLogic server on both machines, creating a domain across the machines, assigning managed servers to clusters on each machine, and starting up the node managers and servers on each machine to complete the horizontal cluster configuration.
This document provides an introduction to accessing databases using JDBC and MySQL. It discusses how JDBC allows Java programs to connect to and query databases in a vendor-neutral way. It also describes how to install and start the MySQL database server and client programs. It provides examples of connecting to MySQL via JDBC, selecting databases, viewing table schemas, running queries, and manipulating tables by creating, dropping, and creating temporary tables from query results.
Spring Web Services allows creating web services using a contract-first approach. It provides components for defining data contracts with XSD, service contracts with WSDL, and implementing endpoints with annotated classes. Shared abstractions like WebServiceMessage and MessageContext provide common client and server functionality, while the MessageDispatcher handles dispatching requests to endpoints. The framework supports various transports including HTTP, JMS, and email.
This document summarizes common Ruby on Rails security issues and best practices for addressing them. It covers potential information leaks from application setup and deployment, cross-site scripting vulnerabilities from unsanitized user input, session fixation issues, cross-site request forgery problems, SQL injection protection, preventing JavaScript hijacking, securing mass assignment, and security risks related to third-party Rails plugins. The document provides explanations of each issue and recommendations for configuration and code changes to enhance the security of Rails applications.
Secured hosting and maintenance of e-commerce websites has become the need of the hour. Modern day websites are highly vulnerable to threats such as hacking, phishing, pharming, denial of access etc. Magento is considered to be one of the most secured e-commerce platform that is easy to install and ready to use. The inbuilt security features of Magento and the additional benefits of AWS makes it the safest and secured platform for modern applications.
Magento is an open source cloud based digital commerce platform that empowers merchants to integrate digital and physical shopping experiences. Magento enterprise edition provides an engaging shopping experience to the users by providing personalized content, fast checkout and a seamless shopper experience. However, in order to ensure the integrity of the user experience and sensitive customer data, it is important to follow security and deployment best practices. stackArmor’s cybersecurity and cloud deployment experts have developed a proven and full-stack methodology to help protect and secure applications and data. The diagram below provides an overview of the key layers and security countermeasures.
AWS offers a wide variety of configuration and deployment choices requiring infrastructure, systems engineering and AWS engineering expertise. The cloud experts at stackArmor, have developed an easy to use deployment automation harness called StackBuilderTM. StackBuilderTM allows users to quickly deploy and use their Magento e-commerce website hosted on AWS. StackBuilder’s intelligent cloud deployment engine takes care of instance selection, AWS VPC configuration and software installation. The fully managed Magento service includes patching, vulnerability management, continuous monitoring, data encryption, and recovery & backup support.
stackArmor StackBuilder provides a rich and easy to use consumer-grade experience for non-technical users to jumpstart their projects by answering a series of simple questions. StackBuilder’s intelligent provisioning and capacity estimation engine leverages the rich set of services provided by the AWS cloud platform including wide variety of EC2 instances, Virtual Private Cloud (VPC), Auto Scaling Groups, Clustering and Elastic Load Balancers (ELB) amongst others. The user of StackBuilderTM does not have to go through the various steps associated with configuring and setting up the AWS infrastructure as they are handled automatically. This allows the user to focus on his project without waiting for costly consultants or the need for cloud infrastructure expertise.
This document discusses configuring claims-based authentication in SharePoint 2010. It involves 3 main steps:
1. Creating a web application in SharePoint Central Administration and enabling forms-based authentication.
2. Configuring the ASP.NET membership provider and role manager by modifying the web.config files for the web application, Central Administration site, and Security Token Service.
3. Adding users to the SQL database using a membership seeding tool and testing authentication with the users.
BISP is committed to provide BEST learning material to the beginners and advance learners.In the same series, we have prepared a complete end-to end Hands-on Guide for WebLogicAdministration. The document focuses on detailed information about WebLogic Admin Consoleand Scripting tool. Join our professional training program and learn from experts
This document provides instructions for setting up a production WebLogic Server configuration with high availability and failover capabilities. It describes how to create a WebLogic domain with an administration server and two managed servers configured in a cluster. The domain is created using the domain configuration wizard in both graphical and command line modes. The administration server and both managed servers are started and configured on separate machines. The environment is tested by accessing the administration console and verifying the running states of the servers.
Horizontal clustering involves running multiple Java application servers across two or more separate physical machines, with the application servers divided between the machines - for example, having the admin server and two managed servers on one machine and two additional managed servers on a second machine. The document then provides step-by-step instructions for installing WebLogic server on both machines, creating a domain across the machines, assigning managed servers to clusters on each machine, and starting up the node managers and servers on each machine to complete the horizontal cluster configuration.
New Flash Builder 4 WSDL and HTTP Connectorsrtretola
This document provides instructions for setting up a Java SDK and Tomcat server on Windows and Mac OS X systems in order to run a Flash Builder project. It describes downloading and configuring a Java SDK by setting the JAVA_HOME environment variable. It then explains how to navigate to the Tomcat directory in the command line and start the server using specific commands for Windows and Mac. The document tests that the server is running properly by accessing certain URLs and describes how a crossdomain.xml policy file works to allow access to remote data services. It concludes by outlining the initial steps to create a new Flash Builder project and connect to REST data from an XML service using MXML and ActionScript.
Creating and connecting to odi master and work repositoriesAbdoulaye M Yansane
1) The document outlines the steps to create an Oracle Data Integrator (ODI) Master repository and Work repository connected to an Oracle database.
2) It describes creating the database schema and user for each repository, connecting to the repositories, and testing the connections.
3) Key steps include using SQL commands to create the Master and Work repository schemas, providing connection details to create each repository in ODI, and disconnecting from the Master and connecting to the Work repository.
WebLogic FAQs provide answers to common questions about Oracle WebLogic Server. The document includes questions about what WebLogic Server is, its basic components like domains and managed servers, how administration servers and managed servers interact, and how to configure and use WebLogic Server clusters. Additional questions cover topics like multicast and unicast communication, development versus production modes, and how to start and stop WebLogic Server instances.
This document discusses device application development using Windows Azure. It covers storage, identity, communications, and platform services when building applications with a device-cloud architecture. Specific topics covered include storage options in Windows Azure, approaches to managing identity, device-initiated and cloud-initiated communications, and frameworks for building applications. Code samples and usage statistics are also provided.
Session tracking maintains the state of users between HTTP requests in servlets. Common techniques include cookies, hidden form fields, URL rewriting, and HTTP sessions. Cookies store data on the client side in the browser cache while HTTP sessions store data on the server side. Cookies have limitations on size and security while sessions can store unlimited data securely on the server but end when the browser closes. Both techniques allow servlets to identify returning users and maintain state across requests.
Overview of JAX-WS technology for web services (Java API for XML Web Services).
JAX-WS is the core Java web service technology for Java EE applications.
It provides a unified client and server-side API for writing SOAP/WSDL based web services.
JAX-WS is platform independent. Many Java platforms like Glassfish, Axis2 or CXF support JAX-WS.
Thus services developed with JAX-WS on one platform can be easily ported to another platform.
JAX-WS is based on annotations like @WebService thus greatly simplifying the development of web services.
POJOs (Plain Old Java Objects) can be simply annotated with JAX-WS annotations thus turning these into web service implementations.
JAX-WS is the core web service technology according to JSR-224 affording basic web service functionality.
WSIT (Web Service Interoperability Technology) sits on top of JAX-WS and adds enhanced functionality like security, reliability and transactions.
WSIT is the standard Java WS protocol stack beyond basic WS functionality (SOAP, WSDL) to achieve interoperability between Java and .Net (for more complex applications that go beyond simple WS requests).
JAX-WS is a Java framework for creating and consuming web services. It allows developers to create web services using Java annotations or a contract-first approach by defining services in WSDL. JAX-WS handles generating the necessary artifacts like WSDL and XSD. Services are deployed as a WAR file and configured using web.xml and sun-jaxws.xml. Clients can be generated using wsimport to call the web service operations.
This presentation describe how you can use standard web techniques like Ajax and JSON to work with data in your existing IBM Domino (formerly Lotus Domino) database. It shows how to use jQuery and Bootstrap to build a modern web interface, and explains how to create your own REST API on the Domino server to serve up and process data.
This document provides an overview of integrating existing Domino data with modern websites using jQuery and Bootstrap. It discusses using Bootstrap and jQuery to build web interfaces that retrieve data from Domino via Ajax calls. Lotusscript agents are used to generate JSON data from Domino views and documents. Examples are provided of building a contact database interface with Bootstrap that displays contacts in a table, loads detail views, and allows editing and saving contacts back to the Domino database.
My presentation at MWLUG 2015. I show how to build and connect a modern looking website, built with HTML, CSS, and Javascript/jQuery, to your existing IBM Domino backend data using Ajax and JSON and some simple Lotusscript code.
DWR (Direct Web Remoting) allows JavaScript code in a browser to call Java functions on a web server as if they were local functions. It consists of Java server-side libraries and a servlet, as well as JavaScript libraries. DWR handles converting parameters and return values between JavaScript and Java. It also handles low-level XMLHttpRequest handling. DWR dynamically generates a JavaScript proxy class that matches a Java class, allowing remote method calls. Utility functions in DWR help update web pages with the results.
The document discusses server-side programming and Java 2 Enterprise Edition (J2EE). It explains what J2EE is, its architecture and components. It describes the lifecycle of a servlet, including initialization, request handling, and destruction. It also discusses session management techniques in servlets like using cookies, URL rewriting, and hidden form fields to track user requests across multiple pages. Exception handling using request dispatchers is also covered.
Server side programs can be written using different server-side technologies , such as Common Gateway Interface (CGI) , Active Server Pages (ASP) and Servlets.
CGI scripts are written in C , C++ or perl programming languages .
In case of an application server using CGI script to process client request , the server creates a separate instance of the CGI script to process the request.
As a result, the efficiency of the server is affected when there is large number of concurrent requests.
JAX-WS is the replacement and next generation to JAX-RPC and makes web services development much easier using annotations and much less configuration. JAX-WS is useful for people building webservices/SOA based infrastructure as JAX-WS makes the web service development much easier and is a big gain for developer productivity.
The session uses a web service for temperature conversion example to build both the client side and Server side artifacts. Also on the server side both Servlet based and EJB3.0 based web service development will be demonstrated. JAXB concepts will be used to demonstrate the examples.
The session uses Eclipse Ganymede and Jboss 5.0. However JAX-WS being the standard, the code will smoothly work on any JavaEE based compliant servers.
This document provides a tutorial for distributing Rails applications by packaging them into standalone executables. It outlines the necessary ingredients like Ruby, Rails, SQLite. It then describes the steps to setup the environment, create a SQLite database, develop the Rails app, create a Ruby archive (RBA) of the application using Tar2RubyScript, and finally generate a standalone executable using RubyScript2Exe. Some adjustments are needed to the code to properly handle database file paths when running as an RBA versus a normal Rails application. Following these steps allows one to distribute a complete Rails application in a single executable without any other dependencies.
JRuby in Action provides an overview of JRuby and Ruby on Rails. JRuby allows developers to run Ruby code on the Java Virtual Machine, providing access to Java libraries and improved performance over CRuby. Ruby on Rails is a full-stack web framework that follows conventions over configurations and the Don't Repeat Yourself principle. The presentation demonstrates building a simple blog application in Ruby on Rails and deploying Rails applications to Java application servers using JRuby.
This document provides a tutorial for using Ruby with the Enlightenment Foundation Libraries (EFL) for building graphical user interfaces. It begins with an introduction to EFL and why the author chose it. The tutorial then covers first steps like installing Ruby-EFL and writing a basic "Hello World" program. It demonstrates how to create rectangles, handle events like resizing and mouse clicks, and improve the Evas drawing class to simplify rectangle creation. The goal is to help readers understand and start developing with the Ruby-EFL bindings.
This document provides instructions for labs 5 and 6 of the IELM 511 course, which teach how to create and populate a database using phpMyAdmin. The labs will have students create tables in a MySQL database called "bank" using phpMyAdmin's GUI and SQL commands, and populate the tables with data. Basic PHP scripts are also demonstrated to connect to and interact with the MySQL database.
This document provides a tutorial for setting up a many-to-many relationship in Rails. It describes creating Expense and Tag models with a join table, generating scaffolds, and customizing views and controllers to display tags as checkboxes for selection when creating or editing an expense. The controller is updated to handle the tag selections by finding Tag objects by ID and associating them with the expense on create/update.
This document provides instructions for several labs on testing a timeclock application using Ruby. It discusses exploring the timeclock interface by making mistakes, testing command results using an assert_equal function, using the Test::Unit framework for testing, working with arrays and hashes, and testing the timeclock application's web services interface.
This document provides instructions for installing Ruby on Rails on Ubuntu Linux. It discusses downloading and installing Ruby, the RubyGems package manager, Rails and other dependencies like MySQL. It also gives an overview of Ruby and Rails, highlighting features like object orientation, automatic memory management and the MVC framework. Example Ruby code is shown demonstrating language features. Links to resources for learning Rails are provided at the end.
New Flash Builder 4 WSDL and HTTP Connectorsrtretola
This document provides instructions for setting up a Java SDK and Tomcat server on Windows and Mac OS X systems in order to run a Flash Builder project. It describes downloading and configuring a Java SDK by setting the JAVA_HOME environment variable. It then explains how to navigate to the Tomcat directory in the command line and start the server using specific commands for Windows and Mac. The document tests that the server is running properly by accessing certain URLs and describes how a crossdomain.xml policy file works to allow access to remote data services. It concludes by outlining the initial steps to create a new Flash Builder project and connect to REST data from an XML service using MXML and ActionScript.
Creating and connecting to odi master and work repositoriesAbdoulaye M Yansane
1) The document outlines the steps to create an Oracle Data Integrator (ODI) Master repository and Work repository connected to an Oracle database.
2) It describes creating the database schema and user for each repository, connecting to the repositories, and testing the connections.
3) Key steps include using SQL commands to create the Master and Work repository schemas, providing connection details to create each repository in ODI, and disconnecting from the Master and connecting to the Work repository.
WebLogic FAQs provide answers to common questions about Oracle WebLogic Server. The document includes questions about what WebLogic Server is, its basic components like domains and managed servers, how administration servers and managed servers interact, and how to configure and use WebLogic Server clusters. Additional questions cover topics like multicast and unicast communication, development versus production modes, and how to start and stop WebLogic Server instances.
This document discusses device application development using Windows Azure. It covers storage, identity, communications, and platform services when building applications with a device-cloud architecture. Specific topics covered include storage options in Windows Azure, approaches to managing identity, device-initiated and cloud-initiated communications, and frameworks for building applications. Code samples and usage statistics are also provided.
Session tracking maintains the state of users between HTTP requests in servlets. Common techniques include cookies, hidden form fields, URL rewriting, and HTTP sessions. Cookies store data on the client side in the browser cache while HTTP sessions store data on the server side. Cookies have limitations on size and security while sessions can store unlimited data securely on the server but end when the browser closes. Both techniques allow servlets to identify returning users and maintain state across requests.
Overview of JAX-WS technology for web services (Java API for XML Web Services).
JAX-WS is the core Java web service technology for Java EE applications.
It provides a unified client and server-side API for writing SOAP/WSDL based web services.
JAX-WS is platform independent. Many Java platforms like Glassfish, Axis2 or CXF support JAX-WS.
Thus services developed with JAX-WS on one platform can be easily ported to another platform.
JAX-WS is based on annotations like @WebService thus greatly simplifying the development of web services.
POJOs (Plain Old Java Objects) can be simply annotated with JAX-WS annotations thus turning these into web service implementations.
JAX-WS is the core web service technology according to JSR-224 affording basic web service functionality.
WSIT (Web Service Interoperability Technology) sits on top of JAX-WS and adds enhanced functionality like security, reliability and transactions.
WSIT is the standard Java WS protocol stack beyond basic WS functionality (SOAP, WSDL) to achieve interoperability between Java and .Net (for more complex applications that go beyond simple WS requests).
JAX-WS is a Java framework for creating and consuming web services. It allows developers to create web services using Java annotations or a contract-first approach by defining services in WSDL. JAX-WS handles generating the necessary artifacts like WSDL and XSD. Services are deployed as a WAR file and configured using web.xml and sun-jaxws.xml. Clients can be generated using wsimport to call the web service operations.
This presentation describe how you can use standard web techniques like Ajax and JSON to work with data in your existing IBM Domino (formerly Lotus Domino) database. It shows how to use jQuery and Bootstrap to build a modern web interface, and explains how to create your own REST API on the Domino server to serve up and process data.
This document provides an overview of integrating existing Domino data with modern websites using jQuery and Bootstrap. It discusses using Bootstrap and jQuery to build web interfaces that retrieve data from Domino via Ajax calls. Lotusscript agents are used to generate JSON data from Domino views and documents. Examples are provided of building a contact database interface with Bootstrap that displays contacts in a table, loads detail views, and allows editing and saving contacts back to the Domino database.
My presentation at MWLUG 2015. I show how to build and connect a modern looking website, built with HTML, CSS, and Javascript/jQuery, to your existing IBM Domino backend data using Ajax and JSON and some simple Lotusscript code.
DWR (Direct Web Remoting) allows JavaScript code in a browser to call Java functions on a web server as if they were local functions. It consists of Java server-side libraries and a servlet, as well as JavaScript libraries. DWR handles converting parameters and return values between JavaScript and Java. It also handles low-level XMLHttpRequest handling. DWR dynamically generates a JavaScript proxy class that matches a Java class, allowing remote method calls. Utility functions in DWR help update web pages with the results.
The document discusses server-side programming and Java 2 Enterprise Edition (J2EE). It explains what J2EE is, its architecture and components. It describes the lifecycle of a servlet, including initialization, request handling, and destruction. It also discusses session management techniques in servlets like using cookies, URL rewriting, and hidden form fields to track user requests across multiple pages. Exception handling using request dispatchers is also covered.
Server side programs can be written using different server-side technologies , such as Common Gateway Interface (CGI) , Active Server Pages (ASP) and Servlets.
CGI scripts are written in C , C++ or perl programming languages .
In case of an application server using CGI script to process client request , the server creates a separate instance of the CGI script to process the request.
As a result, the efficiency of the server is affected when there is large number of concurrent requests.
JAX-WS is the replacement and next generation to JAX-RPC and makes web services development much easier using annotations and much less configuration. JAX-WS is useful for people building webservices/SOA based infrastructure as JAX-WS makes the web service development much easier and is a big gain for developer productivity.
The session uses a web service for temperature conversion example to build both the client side and Server side artifacts. Also on the server side both Servlet based and EJB3.0 based web service development will be demonstrated. JAXB concepts will be used to demonstrate the examples.
The session uses Eclipse Ganymede and Jboss 5.0. However JAX-WS being the standard, the code will smoothly work on any JavaEE based compliant servers.
This document provides a tutorial for distributing Rails applications by packaging them into standalone executables. It outlines the necessary ingredients like Ruby, Rails, SQLite. It then describes the steps to setup the environment, create a SQLite database, develop the Rails app, create a Ruby archive (RBA) of the application using Tar2RubyScript, and finally generate a standalone executable using RubyScript2Exe. Some adjustments are needed to the code to properly handle database file paths when running as an RBA versus a normal Rails application. Following these steps allows one to distribute a complete Rails application in a single executable without any other dependencies.
JRuby in Action provides an overview of JRuby and Ruby on Rails. JRuby allows developers to run Ruby code on the Java Virtual Machine, providing access to Java libraries and improved performance over CRuby. Ruby on Rails is a full-stack web framework that follows conventions over configurations and the Don't Repeat Yourself principle. The presentation demonstrates building a simple blog application in Ruby on Rails and deploying Rails applications to Java application servers using JRuby.
This document provides a tutorial for using Ruby with the Enlightenment Foundation Libraries (EFL) for building graphical user interfaces. It begins with an introduction to EFL and why the author chose it. The tutorial then covers first steps like installing Ruby-EFL and writing a basic "Hello World" program. It demonstrates how to create rectangles, handle events like resizing and mouse clicks, and improve the Evas drawing class to simplify rectangle creation. The goal is to help readers understand and start developing with the Ruby-EFL bindings.
This document provides instructions for labs 5 and 6 of the IELM 511 course, which teach how to create and populate a database using phpMyAdmin. The labs will have students create tables in a MySQL database called "bank" using phpMyAdmin's GUI and SQL commands, and populate the tables with data. Basic PHP scripts are also demonstrated to connect to and interact with the MySQL database.
This document provides a tutorial for setting up a many-to-many relationship in Rails. It describes creating Expense and Tag models with a join table, generating scaffolds, and customizing views and controllers to display tags as checkboxes for selection when creating or editing an expense. The controller is updated to handle the tag selections by finding Tag objects by ID and associating them with the expense on create/update.
This document provides instructions for several labs on testing a timeclock application using Ruby. It discusses exploring the timeclock interface by making mistakes, testing command results using an assert_equal function, using the Test::Unit framework for testing, working with arrays and hashes, and testing the timeclock application's web services interface.
This document provides instructions for installing Ruby on Rails on Ubuntu Linux. It discusses downloading and installing Ruby, the RubyGems package manager, Rails and other dependencies like MySQL. It also gives an overview of Ruby and Rails, highlighting features like object orientation, automatic memory management and the MVC framework. Example Ruby code is shown demonstrating language features. Links to resources for learning Rails are provided at the end.
This document provides instructions on how to access a MySQL database from a Java application using a SOA Gateway as a web service. It describes setting up the required software components, including MySQL, Java, Apache Axis2, and the SOA Gateway. It then demonstrates creating web services from the MySQL tables using the SOA Gateway, generating Java classes from the WSDLs, and writing Java code to call the web services to perform simple queries and display the results in a graphical user interface. Examples of simple single query code and more complex code using Swing components are provided.
This document provides an overview of accessing databases using JDBC and MySQL. It discusses how JDBC allows Java programs to connect to and query databases. It also describes MySQL, a popular open-source database server that supports JDBC. The document demonstrates starting and connecting to MySQL, selecting databases, viewing schema and data, and performing basic operations like creating, dropping, and querying tables.
This document provides an introduction to accessing databases using JDBC and MySQL. It discusses how JDBC allows Java programs to connect to and query databases in a vendor-neutral way. It also describes how to install and start the MySQL database server and client programs. It provides examples of connecting to MySQL via JDBC, selecting databases, viewing table schemas, running queries, and manipulating tables by creating, dropping, and creating temporary tables from query results.
This document provides an introduction to accessing databases using JDBC and MySQL. It discusses how JDBC allows Java programs to connect to and query databases in a vendor-neutral way. It also describes how to install and start the MySQL database server and client programs. It provides examples of connecting to MySQL from Java using JDBC, viewing database and table schemas, running queries, and manipulating tables by creating, dropping, and selecting data into temporary tables.
This document provides an introduction to accessing databases using JDBC and MySQL. It discusses how JDBC allows Java programs to connect to and query databases in a vendor-neutral way. It also describes how to install and start the MySQL database server and client programs. It provides examples of connecting to MySQL via JDBC, selecting databases, viewing table schemas, running queries, and creating, dropping, and manipulating tables.
The document provides information about installing and configuring MySQL database on Linux and Windows systems. It discusses downloading and installing MySQL using RPM packages on Linux and running the installer on Windows. It also covers verifying the MySQL installation, setting the root password, creating user accounts, and configuring the MySQL configuration file. The document then provides an overview of important MySQL commands and functions for connecting to and manipulating data in MySQL databases from PHP scripts.
1) The document discusses deploying a Spring Boot application on AWS Elastic Beanstalk using a MySQL database hosted on RDS. It provides step-by-step instructions for building the sample application, configuring the Elastic Beanstalk environment, and modifying the application to connect to the RDS database using environment variables.
2) The application is successfully deployed and the REST API is tested using cURL commands. Users and data are successfully added, retrieved, and displayed in HAL format with pagination.
3) Elastic Beanstalk provides an easy way to deploy production-ready Spring Boot applications to AWS, launching required resources across services like EC2, RDS, and ELB, while still providing control over the
The document discusses MySQL Shell and how it can help database administrators (DBAs) with common tasks like deploying architectures, preparing upgrades, dumping and loading data, and managing users. MySQL Shell provides tools like the Admin API for configuring MySQL clusters and replicasets, an upgrade checker utility to validate upgrades to MySQL 8.0, and parallel dump and load functionality to backup, migrate, and reset data.
Guide - Migrating from Heroku to AWS using CloudFormationRob Linton
Step by step guide to migrating from Heroku to Amazon AWS using AWS CloudFormation.
Presented at the Australian AWS User Group in Melbourne at the October Meetup.
This document provides instructions for installing and configuring MySQL on Linux. The key steps are:
1. Install MySQL using the RPM file and optionally install client and development RPMs.
2. Configure security by setting a root password for MySQL and the local machine to prevent security risks.
3. Test the installation by starting the MySQL client program and checking that you can see the databases.
4. Inform applications of database details like the name, client server IP, and special user for the application to access the data.
This document provides an overview of MySQL, including:
1) MySQL is an open-source relational database management system that is popular for web applications.
2) The document reviews database terminology and covers installing and configuring MySQL on Linux and Windows.
3) Administrative tasks like starting/stopping the MySQL server, creating user accounts, and using MySQL commands are described.
The document provides an overview of MySQL, including that it is a fast, multi-threaded SQL database server written in C/C++ that works across many operating systems. It discusses installing and using MySQL, creating and populating databases and tables, and performing queries.
The document provides an overview of MySQL, including:
- MySQL is a fast, multi-threaded, multi-user SQL database server.
- It is open source and dual licensed, and supports many operating systems.
- The document discusses installing and connecting to MySQL, and provides examples of basic queries.
How To Create RDS Database for WordPress in AWS on RHEL 7 or CentOS 7VCP Muthukrishna
The document provides step-by-step instructions for creating an RDS database in AWS for a WordPress site. The key steps include:
1. Launching the RDS console and clicking "Get Started Now" to begin the process.
2. Selecting MySQL as the database engine and configuring settings like the instance class, storage, and security parameters.
3. Downloading an SSL certificate for secure connectivity and configuring database options like the database name and port.
4. Completing additional advanced settings for the VPC, subnet group, and security before launching the DB instance.
MySQL is an open-source relational database management system. It stores data in separate tables and uses SQL for querying and modifying the data. MySQL has a client-server architecture and supports different storage engines. Common tools for interacting with MySQL include the mysql command line client, mysqldump for backups, and graphical tools like phpMyAdmin.
This document provides information about installing and configuring MySQL database. It discusses installing MySQL on Linux/UNIX and Windows platforms. It also covers adding users and granting privileges in MySQL, basic security guidelines for MySQL including securing connections, and troubleshooting common installation issues. Key topics include the GRANT command for adding users, common privilege types like SELECT, INSERT, and UPDATE, and the two-step authentication process in MySQL.
Session presented at Oracle Developer Live - MySQL, 2020. Recording available at https://developer.oracle.com/developer-live/mysql/
Abstract:
MySQL Shell is the new, advanced command-line client and editor for MySQL. It sends SQL statements to MySQL server, supports both the classic MySQL protocol and the newer X protocol, and provides scripting capabilities for JavaScript and Python. But there's more to MySQL Shell than meets the eye. It delivers a natural and powerful interface for all DevOps tasks related to MySQL by providing APIs for development and administration. This session covers MySQL Shell's core features, along with demonstrations of how to use the various APIs and how to extend MySQL Shell. We’ll address the regular interaction with databases, the built-in tools that make DBAs and developers’ lives easier, the easy and flawless set up of HA architectures, and the plugins and extensions framework.
This document provides a tutorial for distributing Rails applications by packaging them into standalone executables. It outlines the necessary ingredients like Ruby, Rails, SQLite. It then describes the steps to setup the environment, create a SQLite database, develop the Rails app, create a Ruby archive (RBA) of the application using Tar2RubyScript, and finally generate a standalone executable using RubyScript2Exe. Some adjustments are needed to the code to properly handle database file paths when running as an RBA versus a normal Rails app. Following these steps allows one to distribute a complete Rails application in a single executable without any other dependencies.
This document provides a help and tutorial for TopStyle Pro version 3.11. It covers getting started with TopStyle, editing style sheets and HTML/XHTML, working with colors, previews, validation, site management, reports, mappings, customization, and third-party integration. It also includes appendices on CSS basics and tips, TopStyle tips and tricks, style sheet resources, keyboard shortcuts, and regular expressions.
TopStyle Help & <b>Tutorial</b>tutorialsruby
This document provides a table of contents for the TopStyle Pro Help & Tutorial, which teaches how to use the TopStyle software for editing style sheets and HTML/XHTML documents. It lists over 50 sections that provide explanations and instructions for features like creating and opening files, editing styles, working with colors, previews, validation, site management, reports and customizing the software. The document was created by Giampaolo Bellavite from the online help provided with TopStyle version 3.11.
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>tutorialsruby
This document provides the course outline for IMD 210 Fundamentals of Scripting Languages at The Art Institute of Atlanta during the Spring 2005 quarter. The course focuses on integrating programming concepts with interface design using scripting languages like JavaScript and CSS. It will cover topics like DOM, CSS layout, JavaScript variables, conditionals, and events. Students will complete 4 assignments including redesigning existing websites, and there will be weekly quizzes, a midterm, and final exam. The course is worth 4 credits and meets once a week for class and lab.
This document provides the course outline for IMD 210 Fundamentals of Scripting Languages at The Art Institute of Atlanta during the Spring 2005 quarter. The course focuses on integrating programming concepts with interface design using scripting languages like JavaScript and CSS. It will cover topics like DOM, CSS layout, JavaScript variables, conditionals, and events. Students will complete 4 assignments including redesigning existing websites, and there will be weekly quizzes, a midterm, and final exam. The course is worth 4 credits and meets once a week for class and lab.
The group aims to bridge gaps between peer-to-peer database architectures and scaling multimedia information retrieval. They develop a probabilistic multimedia database system with abstraction layers for applications and researchers. They also research challenges of peer-to-peer networks for distributed data management. Both lines are supported by the MonetDB platform to exploit custom hardware and adaptive query optimization. The goal is a modular solution linking theoretical optimal solutions to application demands under resource limitations.
Standardization and Knowledge Transfer – INS0tutorialsruby
The group aims to bridge gaps between peer-to-peer database architectures and scaling multimedia information retrieval. They develop a probabilistic multimedia database system with abstraction layers and a flexible model. They also research challenges of peer-to-peer networks for distributed data management. Both lines are supported by the MonetDB platform to exploit custom hardware and adaptive query optimization. The goal is a modular solution linking theoretical optimal solutions to application demands under resource limitations.
This document provides an introduction to converting HTML documents to XHTML, including the basic syntax changes needed like making all tags lowercase and closing all tags. It provides examples of correct XHTML markup for different tags. It also explains the new DOCTYPE declaration and shows a sample well-formed XHTML document incorporating all the discussed changes. Resources for learning more about XHTML are listed at the end.
This document provides an introduction to converting HTML documents to XHTML, including the basic syntax changes needed like making all tags lowercase and closing all tags. It provides examples of correct XHTML markup for different tags. It also explains the new DOCTYPE declaration and shows a sample well-formed XHTML document incorporating all the discussed changes. Resources for learning more about XHTML are listed at the end.
XHTML is a markup language that provides structure and semantics to web pages. It is based on XML and is more strict than HTML. XHTML pages must have a document type definition, html and head tags, and a body where the visible content goes. Common XHTML tags include paragraphs, lists, links, images, and divisions to logically separate content. While XHTML provides structure, CSS is used to style pages and control visual presentation by defining rules for tags. CSS rules are defined in external style sheets to keep presentation separate from structure and content.
XHTML is a markup language that provides structure and semantics to web pages. It is based on XML and is more strict than HTML. XHTML pages must have a document type definition, html and head tags, and a body where the visible content goes. Common XHTML tags include paragraphs, lists, links, images, and divisions to logically separate content. While XHTML provides structure, CSS is used to style pages and control visual presentation through rules that target specific XHTML elements.
This document discusses how to create and use external cascading style sheets (CSS) in Dreamweaver. It provides steps to:
1. Open the CSS Styles tab in Dreamweaver and create a new external CSS stylesheet using a sample text style.
2. Save the stylesheet and link it to a new HTML page to style elements like headings, text sizes, and boxes.
3. Edit existing styles by selecting a tag in the CSS Styles panel and modifying properties directly, or by clicking the tag and using the pencil icon to edit in a window. This allows customizing styles globally across all linked pages.
This document provides an overview of how to create and use cascading style sheets (CSS) in Dreamweaver. It describes the different types of style sheets, including external and internal style sheets. It outlines the steps to create an external style sheet in Dreamweaver using the CSS Styles panel and provides instructions for linking the external style sheet to an HTML page. The document demonstrates how to experiment with predefined styles and how to edit, add, and delete styles in the CSS stylesheet.
This document appears to be a weekly update from an intro to computer science course. It includes summaries of classmates' demographics, comfort levels, and prior experience. It also discusses time spent on problem sets and recommends upcoming courses in CS51 and CS61. Finally, it recommends reading on TCP/IP, HTTP, XHTML, CSS, PHP, SQL and using the bulletin board for questions.
This document appears to be a weekly update from an intro to computer science course. It includes summaries of classmates' demographics, comfort levels, and prior experience. It also discusses time spent on problem sets and recommends upcoming courses in CS51 and CS61. Finally, it recommends reading on topics like TCP/IP, HTTP, XHTML, CSS, PHP, SQL and using bulletin boards, and includes images related to these topics.
The document discusses how to use Cascading Style Sheets (CSS) with Corvid Servlet Runtime templates to control formatting and layout. CSS allows separating design from content, making templates simpler and easier to maintain. It also enables adapting appearance for different devices. The document provides examples of using CSS classes to style template elements and explains how to set up a demo system using the included CSS and templates.
The document discusses how to use Cascading Style Sheets (CSS) with Corvid Servlet Runtime templates to control formatting and layout. CSS allows separating design from content, making templates simpler and easier to maintain. It also enables customization of appearance for different devices. The document provides examples of how to apply CSS classes and rules to Corvid template elements to control fonts, colors, positioning and more.
The document provides an introduction to CSS and how it works with HTML to control the presentation and styling of web page content. It explains basic CSS concepts like selectors, properties and values, and how CSS rules are used to target specific HTML elements and style them. Examples are given of common CSS properties and selectors and how they can be used to style elements and format the layout of web pages.
The document introduces CSS and how it works with HTML to separate content from presentation, allowing the styling of web pages through rules that target HTML elements. It explains CSS syntax and various selectors like type, class, ID, and descendant selectors. Examples are provided of how CSS can be used to style properties like color, font, padding, and layout of elements on a page.
Cascading Style Sheets (CSS) allow users to define how HTML elements are presented on a page. CSS enables changing the appearance and layout of an entire website by editing just one CSS file. CSS uses selectors to apply styles to HTML elements via properties and values. Styles can be defined internally in HTML or externally in CSS files. CSS can control text formatting, colors, spacing, positioning and more to achieve visual consistency across web pages.
Cascading Style Sheets (CSS) allow users to define how HTML elements are presented on a page. CSS enables changing the appearance and layout of an entire website by editing just one CSS file. CSS uses selectors to apply styles to HTML elements via properties and values. Styles can be defined internally in HTML or externally in CSS files. CSS can control text formatting, colors, spacing, positioning and more to achieve visual consistency across web pages.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Zilliz
Join us to introduce Milvus Lite, a vector database that can run on notebooks and laptops, share the same API with Milvus, and integrate with every popular GenAI framework. This webinar is perfect for developers seeking easy-to-use, well-integrated vector databases for their GenAI apps.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Speck&Tech
ABSTRACT: A prima vista, un mattoncino Lego e la backdoor XZ potrebbero avere in comune il fatto di essere entrambi blocchi di costruzione, o dipendenze di progetti creativi e software. La realtà è che un mattoncino Lego e il caso della backdoor XZ hanno molto di più di tutto ciò in comune.
Partecipate alla presentazione per immergervi in una storia di interoperabilità, standard e formati aperti, per poi discutere del ruolo importante che i contributori hanno in una comunità open source sostenibile.
BIO: Sostenitrice del software libero e dei formati standard e aperti. È stata un membro attivo dei progetti Fedora e openSUSE e ha co-fondato l'Associazione LibreItalia dove è stata coinvolta in diversi eventi, migrazioni e formazione relativi a LibreOffice. In precedenza ha lavorato a migrazioni e corsi di formazione su LibreOffice per diverse amministrazioni pubbliche e privati. Da gennaio 2020 lavora in SUSE come Software Release Engineer per Uyuni e SUSE Manager e quando non segue la sua passione per i computer e per Geeko coltiva la sua curiosità per l'astronomia (da cui deriva il suo nickname deneb_alpha).
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Accessing_MySQL_from_Ruby
1. Accessing MySQL from Ruby
Contents
1. Introduction .................................................................................................................................... 2
2. Prerequisites ................................................................................................................................... 2
3. Setup ............................................................................................................................................... 2
3.1. Populate MySQL Database ...................................................................................................... 2
3.2. Set up ODBC Access ................................................................................................................ 3
4. Discovery ......................................................................................................................................... 4
4.1. Web Service Creation using SOA Gateway ............................................................................. 4
4.2. Accessing the WSDL ................................................................................................................ 6
5. Accessing a Web Service with Ruby ................................................................................................ 8
Ruby Editor.......................................................................................................................................... 8
Ruby Code ........................................................................................................................................... 8
Debugging Code .................................................................................................................................. 9
6. Conclusion ..................................................................................................................................... 10
7. Appendix ....................................................................................................................................... 10
Accessing MySQL from Ruby Author: John O’Mahony, Risaris Ltd
2. 1. Introduction
In this tutorial we will show you how to build a Ruby application to access MySQL via the SOA
Gateway.
2. Prerequisites
It is assumed that you are running the 3 components, MySQL, Ruby and the SOA Gateway on
Windows.
It is assumed you already have a SOA Gateway server and Control Centre installed. See here for
more info about installing the SOA Gateway.
3. Setup
Download the latest binaries for Ruby from the Ruby downloads page, install it
according to the install.txt document in the Ruby distribution library. For this tutorial I downloaded
Ruby 1.8.6 One-Click Installer and followed the default options.
You will also need a MySQL database. Again, the Open Source version (known as the MySQL
Community Server) can be freely downloaded from the MySQL website. See this link for download,
and here to step you through the installation and configuration.
3.1.Populate MySQL Database
Now that you’ve got MySQL installed and configured, you will need to populate it with some
demo data. For this we use the RisarisBank sample. This is available here.
Save this file to “C:TempRisarisBank.sql”
Connect to the MySQL Server using the mysql command.
E.g shell> mysql –u root –p
This command connects to the server using the MySQL root account to make sure that
you'll have permission to create the RisarisBank database. The -p option tells mysql
to prompt you for the root password. Enter the password when prompted. (Remember
that the MySQL root account is not the same as the operating system root account
and probably will have a different password.)
Create the RisarisBank database.
mysql> CREATE DATABASE RisarisBank;
mysql> use RisarisBank;
Load the contents of RisarisBank.sql into the RisarisBank database. E.g.
mysql> SOURCE c:TempRisarisBank.sql
After the SOURCE command finishes, you can view your new tables.
Accessing MySQL from Ruby Author: John O’Mahony, Risaris Ltd
3. mysql> SHOW TABLES;
mysql> DESCRIBE CustomerInformation;
mysql> DESCRIBE Branch;
etc …
3.2.Set up ODBC Access
The final thing to do with your MySQL Database is to set up an ODBC DSN which will be used by
the SOA Gateway to access this database.
Click Start, Control Panel, Administrative Tools, Data Sources (ODBC)
From the resulting screen, choose the “System DSN” Tab.
Click Add
From the list of data source drivers, select “MySQL ODBC 3.51 Driver”.
If you do not see this driver in the list, you need to install the MySQL Connector. See here for
more information. We recommend installing v3.51.
Click Finish, and a window will appear allowing you to enter the DSN information. Add the
following:
Data Source Name: RisarisBank
Description: The Risaris Bank Sample in MySQL
Server: localhost
User: root
Password: *** your MySQL root password ***
Database: RisarisBank (select from the drop down list)
Accessing MySQL from Ruby Author: John O’Mahony, Risaris Ltd
4. All other options can be left as-is. Click OK.
4. Discovery
At this stage you’ve got Ruby installed, and a MySQL database with some sample data in it. In this
section we’ll show you how to create web services from each of the MySQL tables. These web
services can be used by the Ruby language (and many others) to give you direct real-time access to
your MySQL Data.
4.1.Web Service Creation using SOA Gateway
Start your SOA Gateway Control Centre. See here for an introduction to the Control Centre.
In your servers view, right click the entry which represents your local SOA Gateway Server. Select
“Create New Web Services”.
Accessing MySQL from Ruby Author: John O’Mahony, Risaris Ltd
5. From the next dialog, choose “MySQL Driver”. If you do not see have a MySQL Driver in the list,
see how to create one here.
Click Next.
The next screen gives you the ability to add information about your DSN
Accessing MySQL from Ruby Author: John O’Mahony, Risaris Ltd
6. Enter the above information and click Discover.
The wizard will display all the tables it finds at this (RisarisBank) DSN.
Click “Select All”, and click “Import”.
The wizard will create web services from each one of these tables.
You’ve just created 8 Web Services from your 8 MySQL Tables!
4.2.Accessing the WSDL
Web Service Description Language (WSDL) is a standard, XML-based language that is used to
describe a Web Service.
For each of the 8 web services you’ve created in the previous section, the SOA Gateway provides
you with a WSDL to describe the Web Service. The WSDL itself is usually interpreted by a web
Accessing MySQL from Ruby Author: John O’Mahony, Risaris Ltd
7. service client, such as Ruby, but it is useful to know where to find the WSDL for each of your
Web Services.
As WSDL is XML-based, it will open in your browser of choice. To see the WSDL for one of your
Risaris Bank web services, do the following in your SOA Gateway Control Centre:
Click on the web service you are interested in, for example the “branch” web service.
The properties for this web service should appear in your Properties View. If you do not
see the Properties view, select Window -> Show View -> Other -> General -> Properties
and click OK.
In the properties view, there is a link to your WSDL. Click it to open the WSDL in a
browser.
Accessing MySQL from Ruby Author: John O’Mahony, Risaris Ltd
8. You can view the WSDL for the other web services by clicking the link from their properties
view.
This WSDL is the starting point for using Web Services, and can be used time and again by
different web service clients.
5. Accessing a Web Service with Ruby
We will use a Ruby script to access our new Risaris Bank Web Services via the WSDL. Those familiar
with Ruby will probably want to change the script provided but it can be run with minimum changes
described below. The whole script is provided in APPENDIX A.
Ruby Editor
Use the editor provided, SciTE.exe, which is located in folder scite where you installed Ruby.
Copy the code from Appendix A and save the code as the filename RBCustomerTutorial.rb (as in
example below).
Hit F5 and the results will appear in the right-hand pane:
Ruby Code
Depending on your MySQL settings you will have to change the username/password provided in
the on_simple_outbound method. In this example the user is root with no password.
"<UsernameToken><Username>root</Username><Password></Password></UsernameToken>"
Accessing MySQL from Ruby Author: John O’Mahony, Risaris Ltd
9. Note also the WSDL URL http://localhost:56000/customerinformation?WSDL. Again depending
on your SOA Gateway configuration you may need to change the server/port number.
In this example provided we are issuing a list request on the customer information table in the
RisarisBank database. The list request can handle a wilcarded customer number key:
param = {"CustomerNumber" => "1*"}
result = soap.list(param)
Finally we can query the result for the customer’s first name:
for cust in (result. customerinformationRoot.customerinformationGroup)
print(cust.firstName, "n")
end
Obviously this can be replaced by any of the column names in the customer information table.
Debugging Code
The code provided should work off the bat. However, depending on your MySQL configuration,
the RisarisBank tables may not be in lowercase as in our example e.g. customerinformation
versus CustomerInformation. If this is the case the code will not work as is and all occurrences of
customerinformation should be replaced by CustomerInformation.
The p and puts functions are useful for checking the content of variables. For example p result
after the result = soap.list(param) call gives the following information and is useful for checking
column names for adding new code.
#<SOAP::Mapping::Object:0x3240c04
{}customerinformationRoot=#<SOAP::Mapping::Object:0x3240ad8
{}customerinformationGroup=[#<SOAP::Mapping::Object:0x32409ac
{}CustomerNumber="1" {}FirstName="Casper" {}Surname="Ankergren"
{}AddressLine1="34 Green Street" {}AddressLine2="Crosses Street"
{}City="Mansfield" {}Postcode="MA5 9AJ" {}DateOfBirth="30/05/1978">,
#<SOAP::Mapping::Object:0x323f4bc {}CustomerNumber="10"
{}FirstName="Grenville" {}Surname="Dekker" {}AddressLine1="22 Uttoxter
New Road" {}AddressLine2="Chaddesden" {}City="Leeds" {}Postcode="LS4
9WB" {}DateOfBirth="21/10/1974">, #<SOAP::Mapping::Object:0x323e0b2
{}CustomerNumber="11" {}FirstName="Jane" {}Surname="Freeman"
{}AddressLine1="3 Portland Street" {}AddressLine2="Lichfield"
{}City="Gloucester" {}Postcode="GL4 8KD" {}DateOfBirth="26/10/1980">,
#<SOAP::Mapping::Object:0x323ccb2 {}CustomerNumber="12"
{}FirstName="Dale" {}Surname="Rolling" {}AddressLine1="The Hunters Rest"
{}AddressLine2="Branston" {}City="Preston" {}Postcode="PR4 4HG"
{}DateOfBirth="06/12/1989">, #<SOAP::Mapping::Object:0x323b8b2
{}CustomerNumber="13" {}FirstName="Arnold" {}Surname="Corrigan"
{}AddressLine1="14 Anderson Street" {}AddressLine2="Allestree"
{}City="Derby" {}Postcode="DE6 8FT" {}DateOfBirth="10/06/1970">,
#<SOAP::Mapping::Object:0x323a4b2 {}CustomerNumber="14"
{}FirstName="Alfred" {}Surname="Summerscale" {}AddressLine1="3701 S.
Accessing MySQL from Ruby Author: John O’Mahony, Risaris Ltd
10. George Mason" {}AddressLine2="Melbourne" {}City="Bath" {}Postcode="BA6
8UU" {}DateOfBirth="07/08/1982">, #<SOAP::Mapping::Object:0x32390b2
{}CustomerNumber="15" {}FirstName="Peter" {}Surname="Spiegel"
{}AddressLine1="11663 Charter Oak Co" {}AddressLine2="Foremark"
{}City="Manchester" {}Postcode="M98 4GT" {}DateOfBirth="29/12/1971">,
#<SOAP::Mapping::Object:0x3237cb2 {}CustomerNumber="16"
{}FirstName="John" {}Surname="Sviridov" {}AddressLine1="3319 Rosemere
Court" {}AddressLine2="Brailsford" {}City="Leeds" {}Postcode="LS8 5QQ"
{}DateOfBirth="12/06/1984">, #<SOAP::Mapping::Object:0x32368b2
{}CustomerNumber="17" {}FirstName="Sarah" {}Surname="Hall"
{}AddressLine1="4 Denmark Lane" {}AddressLine2="East Bridgford"
{}City="Portsmouth" {}Postcode="PO9 7QN" {}DateOfBirth="12/02/1983">,
#<SOAP::Mapping::Object:0x32354b2 {}CustomerNumber="18"
{}FirstName="Elspeth" {}Surname="Jones" {}AddressLine1="12375 W. Ohio
Circle" {}AddressLine2="Risley" {}City="Birmingham" {}Postcode="B93 1IO"
{}DateOfBirth="28/08/1986">, #<SOAP::Mapping::Object:0x32340b2
{}CustomerNumber="19" {}FirstName="Nigel" {}Surname="Wyllis"
{}AddressLine1="14 Borough Road" {}AddressLine2="Ockbrook"
{}City="Leeds" {}Postcode="LS8 2WL" {}DateOfBirth="29/04/1981">]>>
6. Conclusion
This tutorial shows how to access MySQL from Ruby using the SOA Gateway. As you can see, you
have built a powerful application that uses Web Services to retrieve information in real-time.
7. Appendix
require 'soap/wsdlDriver'
require 'soap/header/simplehandler'
# A handler to add authentication parameters to the SOAP header.
class AutheticationHeaderHandler < SOAP::Header::SimpleHandler
@@HEADER_NAME = 'Security'
def initialize(namespace)
super(XSD::QName.new(namespace, @@HEADER_NAME))
end
def on_simple_outbound
#Change the username/password below to reflect your own environment
"<UsernameToken><Username>root</Username><Password></Password></UsernameTok
en>"
Accessing MySQL from Ruby Author: John O’Mahony, Risaris Ltd
11. end
end
wsdl_url = "http://localhost:56000/customerinformation?WSDL"
soap = SOAP::WSDLDriverFactory.new(wsdl_url).create_rpc_driver
soap.wiredump_file_base = "soapresult"
soap.headerhandler <<
AutheticationHeaderHandler.new("http://www.risaris.com/security")
param = {"CustomerNumber" => "1*"}
result = soap.list(param)
for cust in (result.customerinformationRoot.customerinformationGroup)
print(cust.firstName, "n")
end
Accessing MySQL from Ruby Author: John O’Mahony, Risaris Ltd