Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction Backend Development

Introduction Backend Development

Lecture 1 Akirachix

Jacob Chencha

May 14, 2015
Tweet

More Decks by Jacob Chencha

Other Decks in Programming

Transcript

  1. What is backend development What is backend development • Typically

    interacts with other machines • Holds business logic • Runs on server 2
  2. Why backend development Why backend development • Protect your IP

    • Runs powerful machines • Easily scalable (if written right) • Serve many clients 3
  3. How How • Code written on remote machine • Typical

    languages include PHP, Python, Ruby, Java, JS 4
  4. Major Areas Major Areas • Database • Routing • Queuing

    • Validation • APIs (Interaction with frontend and other applications) Figure 1: sqllite 5
  5. Tools Tools • Languages : PHP, Python, Ruby, Java, JS

    • Editors: Netbeans, PHPStorm, SublimeText, VIM • Frameworks: Laravel, RoR, Django 6
  6. Task 1 Basic Computation Task 1 Basic Computation Create a

    html/cli program that takes in two numbers and outputs their sum. 8
  7. Task 1 Sample solution Task 1 Sample solution 1. Write

    out php file with the code <?php $sum=$_REQUEST[ val1 ]+$_REQUEST[ val2 ]; echo $sum; 2. Name the file add_two.php 3. Serve the file php -S 0.0.0.0:8888 -t . add_two.php 9
  8. Task 2 Sum numbers Task 2 Sum numbers Write script

    that takes in an integer and gives the sum of all numbers preceding it. The number itself inclusive. eg Given 5 The system would return 15, (5+4+3+2+1) 10
  9. Task 2 Suggested solution Task 2 Suggested solution <?php $number=$_REQUEST[

    number ]; $total=0; for ($i = 0; $i < $number; $i++) { $total+=$i; } echo $total; //Alternative solution echo "<hr>"; $total=$number * ($number-1) * 0.5; echo $total; The steps for serving this file are the same as previous 11
  10. Assignment Assignment Write a php application that accepts comma delimited

    string and gives us their average eg Accepts string such as “12,15,25” and prints out 17.33333 12