volunteering atyouseeforit services

12
Volunteering to Develop IT solutions for Social Causes Web Application Programming in Open Source Technologies

Upload: yousee

Post on 01-Sep-2014

10.718 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Volunteering atyouseeforit services

Volunteering to Develop IT solutions for Social Causes

Web Application Programming in Open Source Technologies

Page 2: Volunteering atyouseeforit services

What is in this Presentation

Get ready to be a Yousee Technology Support Volunteer

How to install and learn PHP/MYSQL

How to use GITHub to collaboratively develop software.

Page 3: Volunteering atyouseeforit services

Overview

At YouSee we currently support development of Web Applications for Social Causes

Any OS can be used to develop applications, there is no preference.

Apache is the preferred Web Server

MySQL is the preferred DBMS

PHPMyAdmin is the preferred SQL Administration Tool

PHP is the preferred Language

Any editor can be used to type the source code (OS Specific)

GIT is the preferred Version Control System

Page 4: Volunteering atyouseeforit services

Using Windows as the OS

When using Windows as the OS WAMP Server should installed on your System -

WAMP Server is a free open source GPL server and can be downloaded at http://www.wampserver.com/en/.

Apache is included in WAMP Server

MySQL is included in WAMP Server

PHP is included in WAMP Server

PHPMyAdmin is included in WAMP Server

Page 5: Volunteering atyouseeforit services

Using Windows as the OS

WAMP Server shows up as an icon once you have installed it.

You can right-click on this icon to start and stop the server.

The server folder is called “wamp” and you can choose its location at the time of installation. Usually it is found under C:\Windows.

Any web application in development can be put as a folder under the wamp folder. For instance if the current web application to be developed is titled “education” it should be located as C:\Windows\wamp\education

Page 6: Volunteering atyouseeforit services

Using Windows as the OS

PHPMyAdmin is installed automatically with WAMP Server

It is a PHP/MYSQL application and at the time of WAMP Server installation the userid and password for this tool are set by you (the user).

Once WAMP is installed, start it (by right-clicking the icon on your shortcuts menu at the bottom-right of your screen)

Type http://localhost/PhpMyAdmin on the url bar of your browser and PHPMyAdmin tool login will show up

Once you login the tool is quite intuitive to perform various SQL functions including DDL (create Database, table, Alter etc) and DML commands.

Notepad++ is a fine editor for coding PHP programs because it can parse PHP and HTML language elements to show them on the screen. This helps in identifying in obvious coding errors such as matching braces or tags missing.

Page 7: Volunteering atyouseeforit services

Using Linux as the OS

On Linux PHP, MySQL and Apache have to be installed separately.

Usually PHP and Apache are already installed in many Linux distributions but if yours did not have it here's how you can install each of them -

Apache On Fedora/CentOS - yum install httpd

Apache On Red Hat - up2date httpd

Apache On Debian (Ubuntu, Mint) – apt-get install apache2

Command to Start Apache Service – httpd start or apache2 start

Page 8: Volunteering atyouseeforit services

Using Linux as the OS

PHP is usually installed in most linux distributions.

The way to find out if it is already installed is to create a file called phpversion.php in /var/www folder. Add the following text to this file - “<?php phpinfo();?>”.

Open the file in browser by typing “http://localhost/phpversion.php”

You should get a page display telling what version of PHP is installed.

If PHP is not installed on your system please contact one of the YouSee volunteers to walk you through the process of installation as it depends on the linux distribution you have.

Page 9: Volunteering atyouseeforit services

Using Linux as the OS

MySQL is usually installed in most linux distributions.

The way to find out if it is already installed is to run the command “mysql --version”. It returns the version of mysql installed on the system.

In most linux installations MySql automatically starts when the system boots. To manually start mysql services type “mysqld” or “mysql.server start” command. You can stop mysql services by typing “mysqladmin shutdown” or “mysql.server stop”.

If MySQL is not installed on your system please contact one of the YouSee volunteers to walk you through the process of installation as it depends on the linux distribution you have.

For PhpMyAdmin installation a PDF file will be sent to you that is to use. A YouSee volunteer working on linux can walk you through the install process should you need any help.

Editors to code PHP programs are again dependent on the linux distribution so contact a YouSee volunteer to know what suits the OS on your machine.

Page 10: Volunteering atyouseeforit services

Using GIT and GITHUB

GIT is an open source version control and configuration management system that is widely used to collaboratively develop applications. It is also supported by a cloud service called GITHUB that allows the management of repositories (code being developed) in a shared hosted space (that includes free hosting with certain limitations) .

You are encouraged to read about GIT and GITHUB. Here are a few suggested URLs to get aquainted – http://git-scm.com/book. There is an interactive tool online http://try.github.io/levels/1/challenges/7 that lets you try git commands to understand how they work.

If you are on Windows install GITHUB Client (http://windows.github.com/)

On Linux, install GIT using the following URL as reference http://git-scm.com/book/en/Getting-Started-Installing-Git.

Page 11: Volunteering atyouseeforit services

Using GIT and GITHUB

Go to www.github.com and create a user profile for yourself.

Fork the repository of the Project you have been assigned (the repository URL will be provided by a YouSee Volunteer who is a collaborator on the Project) . By forking you have created a copy of the repository in your account.

Add UCDS (a user in GITHUB and the administrator for all YouSee Repositories) as a collaborator to your forked project. This enables YouSee administrator to merge your changes into the master repository.

If you are on Windows you can clone the repository using the GIT Client that you installed. You can choose the directory where you want to clone the repository. If you do not choose the wamp folder you would have to copy the repository folder inside wamp folder to test it as a web application.

If you are on linux you can use the clone command to make a copy of the repository on your machine. You need to be connected to the Internet to be able to perform this operation. First you should go to the directory where you want to make code changes to this repository. If you do not choose the wamp folder you would have to copy the repository folder inside /var/www folder to test it as a web application.

Example of clone command – git clone https://github.com/youseevolunteer/youseelibrary.gitIn this command the term “youseevolunteer” refers to your user id and “youseelibrary.git” refers to the repository that you forked.

Page 12: Volunteering atyouseeforit services

Using GIT and GITHUB

Once you have made code changes and tested your changes on the local host you are ready to commit your changes into the GIT repository in the cloud.

On Windows committing your changes is a one step process using the GIT Client. Basically you have to click on Merge.

On Linux follow these steps to do push your changes from your local repository to your GITHUB repository.

Execute the add command – git add -u. This command adds all the modified files in your repository to a staging area.

Execute the commit command – git commit -m 'commit message'. This command records the snapshot of the staging area. The -m option lets us give a comment in the commit for audit tracing.

Execute the push command – git push https://github.com/YouSeeVolunteer/repositoryname.gitThis command pushes commit changes from the local repository to GITHUB repository. It needs Internet connection. In the example mentioned above “YouSeeVolunteer” refers to the user id and “repositoryname.git” refers to the repository name.

The administrator (GITHUB account UCDS) will log into GITHUB and merge your changes to the master repository thus completing the acceptance of your changes to an existing system.