INF397 Full Stack Technologies View Schedule Print

Backend Overview

Static web server

Return only the contents of files

CGI Protocol

Common Gateway Interface - run a program to generate a response

Application Server

Language/Platform specific http implementations

  • CGI - PHP
  • webContainer - Java
  • USAPI - dotNet
  • uWSGI - Python
  • libUV - node.js


Execute code on shared cloud infrastructure

CLEAN application structure

CLEAN application structure

  • Use-cases encapsulate Domain/Business logic
  • Use-cases have input & output interfaces
  • Controllers initiate use-cases
  • Presenters observe use-case results

http server in node.js

          /* server.js */
          var http = require('http'),
              server = http.createServer(function (req, res) {
                  //server executes callback on every connection
                  res.send('Hello Web!');

          //start the server on port 8080
run the server from the console

      node server.js


  1. Parse the URL
  2. Select the most appropriate response strategy
  3. Execute it with on the request parameters

Express for Node.js

    //create new tasks'/task', (req, res) => {
       task = tasks.createTask(req.params);

     //get an existing task
     srv.get('/task/:id', (req, res) => {

     //toggle task done
     srv.put('/task/:id/toggle', (req, res) => {
       const task = tasks.get(;
       task.done = !task.done;

Flask for Python

    def show_entries():
      db_cursor = db.execute('SELECT title, text FROM entries')
      entries = db_cursor.fetchall()
      return render_template('show_entries.html', entries=entries)

    @app.route('/add', methods=['POST'])
    def add_entry():
      if not session.get('logged_in'):
      db.execute('INSERT INTO entries (title, text) VALUES (?, ?)',
                      [request.form['title'], request.form['text']])
      flash('New entry was successfully posted')
      return redirect(url_for('show_entries'))

Vert.x for Java

      public static void main(String[] args) {
        Router router = Router.router(vertx);



      private void handleListProducts(RoutingContext routingContext) {
        JsonArray results = new JsonArray();

        products.forEach((k, v) -> results.add(v));

          .putHeader("content-type", "application/json")


  • System take-ove (rootkit)
  • Code execution (SQL injection)
  • Data leak / loss (Ransomware)
  • Malicious communication (CSRF, DDOS)

Course Schedule:

week 1 03.02.2017 History of the web Fullstack Principles Development Processes Agile Processes DevOps Basics Git
week 2 10.02.2017 Frontend Overview Backend Overview Network Overview Testing JavaScript Overview JavaScript Tooling
week 3 17.02.2017 Web Architectures RESTful principles SOLID principles Web Components Continuous Integration
week 4 24.02.2017 Databases basics Using APIs Deployment Automation Monitoring In-class project consultations
week 5 17.03.2017 Project presentations
Final Test
Course Retrospective and Q&A