20/06/2014 1 CSCI110 Introduction to W3 Technologies 1 CSCI110: Me • I have to be here • Lecturer: – N.A.B. Gray 3.206 nabg@uow.edu.au 42213812 • Consultation time – Mon 12.30-14.30; Fri 9.30-11.30 2 CSCI110: You? Do you belong here? • CSCI110 – Elective subject 3 Any pre-/co- requisites? • CSCI114 as a co-requisite. • You need some programming experience – Variables, expressions, statements – Sequence, iteration, selection, function call – Language: Visual Basic, C#, Java, C++, or anything else in the "imperative" language group. • If you are currently enrolled in CSCI114 you should pick up what you need before you reach point in CSCI110 where it is needed. – If you tried and failed CSCI114 – take heart, PHP and Javascript are easier than C++ 4 CSCI110? • This subject introduces the technologies that underlie the World Wide Web and its commercial applications. … 5 Client: Browser program: Interprets HTML & CSS to layout a page Runs Javascript code Lets user fill in a form and handles submission of request data I n t e r n e t HTTP protocol (rules) define form of request and response messages sent across the network. Server: Dynamic content (individualized responses) generated by server side programs Web-server program handles requests for static resources (images, text pages, movie files etc) Server computer(s) 6 20/06/2014 2 CSCI110? • Topics include – an overview of internet communications covering basic protocols such as TCP/IP and HTTP, – an introduction to the web-browser/web-server client- server systems, – HTML/XHTML/XML markup languages, – web forms, – client side scripting technologies, – basics of relational databases, – and server side scripting languages. 7 CSCI110? • Students will build working web-sites with dynamic content. • Working in groups, students will explore the uses of one or more of the more elaborate framework applications for web- based collaboration (Web-2 technologies). 8 CSCI110 Introduction to W3 Technologies! 9 Objectives (official) … • On successful completion of this subject, students will be able to: – Configure and install a web server that provides controlled access to a document collection. – Create “webs” of documents and make appropriate use of “mark-up” languages for web- document display. – Use “client-side” scripting technologies to handle data validation, provide dynamic features in web pages, and enhance interactivity. – …. 10 Objectives (official) … • On successful completion of this subject, students will be able to: – ... – Define simple tables in a relational database and manipulate data using SQL. – Implement server-side scripts that handle input from forms displayed in web browsers. – Create simplified versions of e-Commerce web sites. – Exploit framework applications such as “Wikis”, “Bulletin Boards”, shared diaries etc that are built on top of basic W3 technologies. 11 Objectives (unofficial) … • You can do something useful! – Your web skills will not be great but should be enough for you to administer a website and develop minor web-applications for some small organization • You should have had some fun – First year computer science is a bit … boring. • You spend your time playing with strings and trees. • You fight with C++ (a very good programming language – for expert programmers). • You have nothing to show off to parents, siblings, friends, … – CSCI110 is meant to be an opportunity to enjoy some practical computing with visible and effective results. 12 20/06/2014 3 Unofficial objective • Quite a few students who have completed CSCI110 have been able to get small scale contracting work on web projects and have earned themselves a little money 13 CSCI110: Spring 2013 • Lectures: – Monday 9.30-11.30 35.G45 – Friday 12.30-13.30 35.G45 • Laboratory: – Thursday, 2 labs total 14 Don't ask • Lecturers cannot change the times of lectures to suit students – Scheduling is an enormous exercise undertaken centrally. • Lecturers cannot get you into a full laboratory! – What do you want them to do? • Shoot one of the students enrolled in that laboratory to make space. • Tell a student enrolled in that laboratory that you are more important and that they need to shift to make room for you. • Ask building and grounds to quickly build an extension to the lab so that we can fit in more computers. 15 CSCI110 Administrivia etc etc 16 Organization etc 1. How assessed? 2. References and texts 3. Topics 4. Subject outline 5. Where to find lecture notes and assignments 6. Forming a group 7. Laboratory 17 Overall Assessment • Assessment –Individual Exercises and Assignments • Exercise – just follow the instructions, demonstrate in the laboratory, get easy marks • Assignment – independent work –Small group assignment –Exam Assessment 18 20/06/2014 4 ASSESSMENT ITEMS % OF FINAL MARK GROUP/ INDIVIDUAL DUE DATE Exercise 1: simple HTML and CSS 2 Individual Laboratory class week 2 Assignment 1: simple HTML and CSS 8 Individual August 22nd Exercise 2: basic client side scripting with Javascript 2 Individual Laboratory class week 4 Assignment 2: simple Javascript 8 Individual September 5th Exercise 3: basic server side scripting with PHP 4 Individual Laboratory class week 6 Exercise 4: persistent data and MySQL 4 Individual Laboratory class week 8 Assignment 3: PHP and MySQL 14 Individual October 10th Exercise 5: advanced CSS and Javascript 2 Individual Laboratory class week 10 Assignment 4: PHP application 16 Group Wednesday October 29th Examination 40 Individual Scheduled by the University 19 Dates • Dates for assignments are “provisional” -might have to be adjusted, announcements in lectures. • Exercises – – Exercises really should be done in weeks specified – as they help for work on assignments. • The exercises have deadlines – after the deadline the exercise is not worth any marks 20 Dates – overlap A3 & A4 • You will need to start on some of the preliminary work for A4 (the group assignment) in week 10 (or proceeding week of session break) while still finishing of your A3 – Group organisation etc etc 21 Exercises same as 2010/2011/2012/2013 • Yes (well, some minor changes e.g. xdebug in E3) • They are just exercises … – Very explicit • Do this • Do this • Now do this • … • You could acquire a friend’s work from last year and show it off; Won’t learn much that way; Won’t be able to do the assignment; 22 Exercises & Assignments Learn to use a modern integrated development environment Create a small web 23 Exercises and Assignments Client side scripting with Javascript Serve the web – Server-side programming in PHP Work with a database 24 20/06/2014 5 Exercises and Assignments Build web applications Built using PHP & MySQL Yes, it’s a toy application; or “model” application. It’s a simplified version of the real thing. Once you’ve built something like this you can continue on and develop real custom applications. 25 Exercises and Assignments Build an application using Drupal e.g. build a web site for a departmental seminar series – different users – seminar coordinator, research group leaders, research group members and guests; different users see different parts of web-site. So – a real application; not a toy. Drupal? It is an application, built in PHP, that helps you quickly build web sites with considerable if rather standardised functionality. 26 No fun Javascript • In 2012 and 2013, the Javascript assignment required development of a simple game like – Space Invaders – Pin ball • But too many students decided that was too much work and didn’t bother • So we’ve gone back to simpler (boring) tasks 27 Group assignment • Real software applications are built by groups, not individuals. • Normal assignments – with plagiarism rules prohibiting collaboration – aren't the best training for practical software development (though may test individual abilities). • Group assignment is meant to provide some early experience in group work, something that will be developed further in CSCI222 and the main CSCI321 project subjects. – Probably will prove a rather easy 16% Assessment 28 Low weighting for examination • Examinations are not the best way of assessing skills in tasks that should take weeks with a carefully planned, iterative development process: – Developing a web-site, – Writing any kind of major computer application. • Exams – "Tell me some facts that you memorized last night" • In the age of Google, why memorize anything. Google knows everything. Google is there waiting to remind you. – Code written in haste and under-pressure is invariably bad code • code written in exams is bad code. Assessment 29 Exam • Exam – Because Faculty likes exams – Because it does require some work by individual done under circumstances where "sub-contracting" isn't possible. – "Sub contracting" • Individual assignments- – Sometimes subcontracted to Rentacoder or friends • Group assignments- – Individuals let group carry them, get awarded same overall group mark • Result: 49/50 for continuous assessment component, 2/50 for examination component. Assessment 30 20/06/2014 6 Assignments? A student perspective ... • Lecturer: – Obviously a misanthropic sadist – Devises complicated convoluted exercise that does nothing but take time to complete, and bears no relation to any realistic application – Sets an unreasonable completion schedule – Arranges a (concealed) test data set calculated to break all implementations based on reasonable interpretations of specification Assessment 31 Assignments? A student perspective ... • So, “correct student response” – hastily write code that might run once, hopefully surviving all the contrived test data, and that will then be thrown away – Maybe solicit contributions from colleagues – Maybe outsource to a programmer in India – if “demonstration” required, well --- mostly fake it – no commitment to work produced Assessment 32 Assessment: a training process, not a matter of jumping through hoops • Exercises and assignments have been devised to give you practical experience that will help you develop skills that will be useful. • If you cheat on assignments, the only person that you cheat is yourself. – Well not quite true, you also cheat your colleagues by devaluing the degree. • Decide what you hope to get from the subject – If it simply a pass in a 6cp subject to help get your degree then you should plan to leave the University and get your degree the same way as Justice Einfeld reputedly got his PhD in jurisprudence (send $400 to “degree” awarding institute in Fresno California) Assessment 33 Much quicker and cheaper than doing a conventional degree. Pity some employers seem to think the degrees not worth the paper they are printed on. Possible degree vendors "Life Experience" based degrees http://en.wikipedia.org/wiki/Suffield_Universityhttp://en.wikipedia.org/wiki/Glendale_University These places exist (at least on the Internet) Assessment 34 Assignment reports • You develop a working web-site. • Not practical for markers to explore and assess your web-site. • Instead – You write a report detailing what you built, including • Some design information, explanations for your choices etc • Code (PHP, CSS stylesheets, SQL create table statements etc) • Evidence for it working – Screenshots – Sometimes, server logs illustrating data traffic – Sometimes, listings of created data tables – Report (prepared in word processor) converted to PDF – PDF file submitted for assessment. Assessment 35 By the way … • The Integrated Development Environment (IDE) used in the laboratories formats and highlights code for you. • You can get listing with formatting and highlighting by using "Print as HTML" option. • The resulting HTML file can be opened with OpenOffice/Writer or Word – the formatting and colour highlighting of your code will be retained. • There is a screenshot tool in the applications menu offered by the operating system. Assessment 36 20/06/2014 7 Assignment submission-1 • Assignments will require reports, prepared as word processor documents and converted to PDF • Reports submitted electronically – Submission system runs on the Solaris Unix system for CS undergraduates – "banshee" – You have to transfer your report file to the banshee computer (use ssh/ftp, the Ubuntu systems in labs will let you open a directory on banshee and visually drag a file across) – Use ssh to log in to banshee and run the turnin command. Assessment 37 Assignment reports • They serve a secondary purpose! • You put them in a portfolio of work that you can present to a prospective employer – “Here are some of the sites that I have already developed” • You should already be thinking about creating a portfolio of work that supplements the CV that you submit for job applications 38 Assignment reports • Make the reports good – Well presented, well structured (index, sections etc) – Explanation of task – Evidence for your solution working – Details of your solution • Overview • Structure – Code (possibly in appendices) 39 turnin Computer in lab 3.127 Running Ubuntu Your PDF file Copy using secure ftp (Ubuntu lets you link to banshee file system and copy by visually dragging file) Banshee server turnin program xterm terminal on Ubuntu machine, lets you give Unix commands on banshee File systemEach year, our Unix support staff fail to re-initialize file system and turnin fails when first used. Remind me to check that they've done the set up this year! 40 There is a note with more details … 41 Assignment submission-2 • Assignments 1…3: individual submission from each student. • Assignments 4: – Single report (PDF file) submitted by group (electronic submission) – In addition, the group must prepare and submit a hard-copy one page supplementary report that has been signed by all group members; this supplementary report details the level of contribution by each group member to the group project. Assessment 42 20/06/2014 8 Assignment submission 3 • Electronic: – Transfer file to your home directory on "banshee" computer – Use ssh to start terminal session on banshee – Use turnin turnin –c csci110 –a 1 A1.pdf – -c csci110 (the subject) – -a (1,2,3,4) the assignment – A1.pdf/A2.pdf/A3.pdf the submission Assessment 43 Late submission? Speak to the hand! Assessment 44 Late submission • Well maybe for assignments 1…3 (the individual assignments) – Limited period of grace to submit late at a penalty in marks – No submissions after final late submission day (even if you were ill!) – Don’t ask – just use late submission (1late – late submit folders for corresponding assignments) – If you have “special consideration” approved through University mechanism (registered via SOLS/SMP), this will cancel late penalty Assessment 45 Assignment submission 4 • Turnin – Not chatty • No little email congratulating you on submitting an assignment • No compiler output (compile a PDF file into what?) – You want to check your file is there: use turnout command to confirm file presence – Suggestion: Don’t upload a corrupt PDF file! Read your uploaded file on Unix to make sure it is valid. Markers charge “Handling fee” (in marks) if they have to ask you to submit a second copy Assessment 46 Assignment submission 5 • Group assignments: – Single group PDF report submitted electronically • Introduction page identifies group and its members – One page group peer assessment document submitted in hard copy • Specifies relative contributions of each member • Is signed by each member • Original submitted in lecture period • Each group member has photocopy • The “relative contributions”, as agreed by all group members, determine any mark adjustments for those individuals whose contributions were less than average Assessment 47 Individual contributions to group • Use scheme similar to that which has been used in some 300-level SE subjects – Project assigned a mark – Individuals • “contributed” 100% of group mark • “limited contribution” 50% of group mark • “almost no contribution” 10% of group mark • “no contribution” 0% of group mark – If group agrees, they can assign different percentages – e.g. Tom, Dick, 100%, Sue 80%, Harry 5% Sorry – but you can’t get 200% of group mark just because your colleagues rated as “almost no contribution”! Assessment 48 20/06/2014 9 Individual contributions to group • In practice, most groups seem to prefer to say "everyone contributed" • If the group is happy to have everyone get the same mark then, rather than handing in a signed document saying that, a group leader can simply send me an email with subject header like – "CSCI110/A2: Group 29: equal contributions from all" Assessment 49 Assignment return • Markers write short note explaining your mark • Marks appear on SOLS (SMP) • Markers’ notes email-ed back to you by lecturer – Markers unix identifier will be in notes, contact marker if you wish to discuss issues Assessment 50 Books? • Plenty of books available on PHP/MySQL development, none strongly recommended. • Really, not worth your while paying $100+ on some text book. • Most of the material that you need is available free on the Internet. References and texts 51 Tutorial sites • www.wdvl.com • www.w3schools.com • www.onlamp.com • www.ibm.com/developerworks • www.oracle.com/technology/index.html • www.zend.com/en/community/ • dev.mysql.com/ • www.php.net/ References and texts 52 Topics • CSCI110 has two strands? – Well kind of at the start of the session; – “Theory strand” – 2 hour lectures – Computer networking – Markup languages – Data Modelling, Databases, SQL – etc – “Practical issues” – 1 hour lectures – Integrated development environment – HTML, CSS, Javascript, practical issues – Group work issues – Etc – It's mainly a matter of covering material so you can start on exercises and assignments – not always the most logical ordering. Topics and subject schedule 53 Lecture “timetable” (?) Topics and subject schedule Week Topic 1-4 Internet basics, the web and its protocols, HTML and CSS 5-7 Basics of client-side and server-side scripting with Javascript and PHP 8-9 Persistent data, MySQL database system 10 More advanced CSS, and Javascript 11-13 Supporting technologies 54 20/06/2014 10 Subject outline • It's on the web! Subject outline 55 Resources • Lectures – PDF files with slides from lectures should be found at http://www.uow.edu.au/~nabg/110 • (Most of the files should be there from start of session; just have minor updates from last years slides.) • Assignments – See above • Supplementary materials – /share/cs-pub/110 Resources 56 WebCT/eLearning/Muddle/…¶ • Not really used • Muddle site consists just of links back to www.uow.edu.au/~nabg/110 • (I was using computer systems for distributing course materials etc years and years before WebCT etc invented; I’m happier using the standard Unix facilities! As you are all CS students (not wimpy IS-IT students or other inferior types) you are of course capable of accessing the materials via normal Unix commands.) Resources ¶System used at UOW changes its name every few years. 57 Groups • The groups for assignments A4 should have five members each. • Formation of groups is your responsibility. • You will have to submit details of group membership a few weeks into session – you will be reminded in due time. Groups 58 A balanced group is a healthy group • Try to get a balanced group – “manager” – “chief designer/programmer” – “systems administrator” – “content supplier, ....” – Pizza boy • Common for groups to end up with a member who cannot be bothered to make a contribution (or, sometimes, is prepared to contribute but others don’t want that buggy code) – Use him/her to get pizzas etc on all night last minute development sessions • Part of mark for group assignments relates to process – you need to be organized and show that you are organized! • Groups that fail to be established on time start with a penalty mark! Groups 59 Laboratory component • Linux (Ubuntu) – MySQL database – Apache 2 – PHP 5 – NetBeans IDE (and Java, which NetBeans depends on) – Can easily be replicated on own Ubuntu system (some parts will be installed as standard already) • All this software runs equally well on Windows – Installation on a Windows system is your responsibility, no technical support provided! – It is preferred that students come into laboratories and use the pre-configured Ubuntu systems (rather than hide in their homes hacking on Windows) Laboratory 60 20/06/2014 11 Public Service Announcements 61 Health and security issues • I’m supposed to tell you that – If building on fire, earthquakes occurring, terrorists raiding, alien invasions from outer- space, … – Then leave building in orderly fashion and assemble outside. – See little map at theatre entrance for location of assembly area. • You’ve been told 62 Example map only – see map on wall for assembly area for this theatre. 63 Any questions? 64