Introduction and Tools

advertisement
Course Overview
CS 4320, SPRING 2015
Course Mechanics
Description
Schedule
Resources
Academic Integrity Statement
Class notes page
Assignments page
Extras link and folder
1/7/2014
CS 4320, SPRING 2015
2
Description
This course introduces current technologies for modeling, designing, implementing, and
developing Web applications. Topics include developing for the server and the client,
programming frameworks, server administration and integration with databases. Practice will
involve platforms and language such as Linux, Python, PHP, Ruby and JavaScript.
1/7/2014
CS 4320, SPRING 2015
3
Schedule
Meets MWF, 11:00-11:50
2/23 Midterm exam
4/29 Last day of class
5/6, 10:30-12:30, Final Exam
1/7/2014
CS 4320, SPRING 2015
4
Resources
Link to resources on the home page and in the syllabus
Software
References
1/7/2014
CS 4320, SPRING 2015
5
Software Used
Linux Mint
MySQL
Python 3
◦
◦
◦
◦
Jinja2
MySQL Python interface
CherryPy
SQLAlchemy
Apache web server
Firefox browser
1/7/2014
CS 4320, SPRING 2015
6
References
While there are some texts available, especially for the Python language, they tend to be out of
date
We will use online resources
The amount of information available is far more than we will try to cover in this course
◦ The notes will provide guidance about what to choose, but you will need to go beyond the minimum
◦ Read judiciously
1/7/2014
CS 4320, SPRING 2015
7
Academic Integrity Statement
Assignment #0 is to print, sign and turn in a copy of the "Acknowledgment and Acceptance of
Academic Integrity Statement" form
1/7/2014
CS 4320, SPRING 2015
8
Class Notes Page
Class notes provide resources for each class
Notes for each day
Link to recording
Link to any projects from class
1/7/2014
CS 4320, SPRING 2015
9
Assignments Page
Assignments Page
All assignments are listed here with links to the assignment requirements
The page also provides the last assignment policy
1/7/2014
CS 4320, SPRING 2015
10
Extra Link and Folder
Link to the extra folder is in the left hand links list
This is delivered simply as a folder and subfolders
The main subfolders:
◦
◦
◦
◦
recordings: contains the recordings made in class
projects: contains archives of code and other artifacts developed in class
databases: contains scripts and data to set up sample databases
examples: contains examples that supplement the class. For example, some will be the starting point
for examples done in class
1/7/2014
CS 4320, SPRING 2015
11
Server Setup
CS 4320, SPRING 2015
1/7/2014
CS 4320, SPRING 2015
12
Server Only?
While you can develop on any platform, projects must be able to run in the Mint Linux
environment
This section begins with a discussion about setting up the minimal server environment needed
If you develop projects on Windows or Mac, there are some issues to be aware of when
deploying projects to Linux
Alternatively, the server system can be extended to support development
1/7/2014
CS 4320, SPRING 2015
13
A Basic Server
Mint Linux has almost everything needed for this course
Python
◦ Both Python 2 and Python 3 are installed
◦ Because Python 2 is the default (don’t try to change that!!!), reference /usr/bin/python3
Other software can be added most easily with the software management utility
◦ MySQL and MySQL workbench
◦ Apache
◦ Python packages (make sure to install the versions for python3
◦ Jinja2
◦ SQLAlchemy
◦ CherryPy
◦ Mysql connector
1/7/2014
CS 4320, SPRING 2015
14
Apache Web Server
Customized organization based on the Debian distribution
Directories
◦ /etc/apache2 contains configuration information
◦ /var/www/html contains web pages and other static resources
◦ /usr/lib/cgi-bin contains scripts to be run by the web server under CGI
Administrative commands
◦ a2enmod module-name
◦ A2dismod module-name
◦ service apache2 start/stop/restart
1/7/2014
CS 4320, SPRING 2015
15
Development
Environment
1/7/2014
CS 4320, SPRING 2015
16
IDE
PyCharm
◦ Will be used in class for demonstrations
◦ Posted examples will be PyCharm projects
Aptana
◦ Based on Eclipse
◦ Projects can be moved back and forth relatively easily between the IDE’s
1/7/2014
CS 4320, SPRING 2015
17
Windows Cautions
It is quite possible to develop in Windows, but there are some changes necessary in some scripts
when porting to Linux
Some Python scripts require a ‘she-bang’ line at the beginning
◦ This points to the Python interpreter
◦ In Windows this is
#!c:/Python34/python.exe
◦ In Linux Mint this is
#/usr/bin/python3
Windows uses CR and LF to end lines
◦ In Linux only a LF is used
◦ It seems that this is only a problem for Python scripts that use the ‘she-bang’ line
One way to fix these problems is to use the PyCharm editor on files in Linux Mint.
◦ The line-ending used is changed at the lower right corner of the window
1/7/2014
CS 4320, SPRING 2015
18
Mac
The Mac OS is based on a version of Unix, the BSD family
Porting from Mac to Linux should, therefore, be more straightforward
Note that Mac and non-Mint distributions of Linux will probably have the Python executable in a
different place.
Also, make sure that the Python version being used is 3, not 2
1/7/2014
CS 4320, SPRING 2015
19
Download