API Testing in Your CI Pipeline

Total Page:16

File Type:pdf, Size:1020Kb

API Testing in Your CI Pipeline API Testing in your CI Pipeline [email protected] www.container-solutions.com Jason Smith Senior Engineer Container Solutions @jasonrichardsmi @containersoluti The Three Things ● Specifications ● Testing your API ● Mocking your API www.container-solutions.com [email protected] The Three Things ● Specifications ● Testing your API ● Mocking your API www.container-solutions.com [email protected] 19 Nov 1863 www.container-solutions.com [email protected] Now www.container-solutions.com [email protected] IDL (Interface Description Language) J. R. Nestor W. A. Wulf D. A. Lamb August 1981 Carnegie-Mellon University Computer Science Department www.container-solutions.com [email protected] IDL (Interface Description Language) In order to work together harmoniously, ... programs ... must have a precise and compatible definition of the data structures they use to communicate with each other. www.container-solutions.com [email protected] IDL (Interface Description Language) ● Precision ● Representation Independence ● Language Independence ● Maintainability ● Communication Form www.container-solutions.com [email protected] SOAP WSDL www.container-solutions.com [email protected] REST Tony Tam recounts the history of Swagger and the Open API Initiative www.container-solutions.com [email protected] REST Not standardized... www.container-solutions.com [email protected] OpenAPI Specification Formerly Swagger Open API Initiative(Linux Foundation) www.container-solutions.com [email protected] Other Major Players API Blueprint RAML www.container-solutions.com [email protected] YAML! www.container-solutions.com [email protected] So many tools sswagger-js lua-Spore Mojolicious::Plugin::Swagger2 bootprint-swagger swagger-jack swagger-ui NSwag cakephp-swagger Dredd hapi-swagger swagger-tools Swashbuckle Swagger-PHP ember-swagger-ui Swagger Validation swagger-editor Swashbuckle.AspNetCore SwaggerAssertions generator-openapi-repo swagger-node-client swagger-core AutoRest php-swaggerize-fastroute-library intellij-swagger ratify swagger-parser SwaggerProvider SwaggerGen linter-swagger swagger-express swagger-codegen NSwag Jane OpenAPI ReDoc NelmioApiDocBundle swagger-node QSwag gossi/swagger swagger-commander Restler validator-badge SwaggerWcf calcinai/strut swagger-confluence swagger-assert ring-swagger Nancy.Swagger falsy swagger-diff Swaggervel compojure-api a127 pyramid-swagger swagger.ed django-rest-swagger fnhouse-swagger api-spec-converter flask-restplus SwagDefGen django-tastypie-swagger pedestal-swagger blueoak-server pyswagger vscode-apielements flask-restful-swagger swagger1st express-openapi flex ember-swagger-ui swagger-docs Friboo fleek-parser Flasgger commandcar source2swagger swagger-sdk fleek-response flask-swagger SwagGen swagger_engine cbSwagger fleek-router bravado swagger-mock-validator Scalatra swaggerize fleek-validator bravado-core Spectacle spray-swagger cowboy-swagger fury-adapter-swagger swagger-spec-validator octohipster Api-doc PhoenixSwagger generator-swaggerize swagger-py-codegen swagger-docs-cfml gform-admin go-swagger got-swag Connexion swagger swagger-cli-client goa hapi-swaggered pecan-swagger go-restful Swagger2Postman grpc-gateway hippie-swagger swagger-parser Sashay swagger2 oas-nodegen swagger-tester beego servant-swagger pokemock swagger-aggregator Swagger spec generator assertj-swagger sails-swagger swagger-stub restapidoc binder-swagger-java serverless_swagger bottle-swagger swaggydoc dropwizard-swagger swagger-jsdoc prance swagger4spring-web elide swagger-mongodb Apivore swagger-jaxrs-doclet jooby-swagger swagger-tools grape-swagger swaggerj4 restlet-framework swaggerize-express swagger-blocks swaggerapi springfox swaggerize-hapi swagger_engine swagger-validator swagger-codegen-maven-plugin swagmock svelte swagger-ajax-client swagger2markup Swagger Express Middleware rspec-rails-swagger swagger-angular-client swagger2markup-gradle-plugin Swagger Parser rswag swagger-client-generator swagger-maven-plugin test2doc.js sbt-swagger-codegen swagger-validate swagger-codegen-gradle-plugin koa-joi-swagger play-swagger ServiceStack swagger-request-validator Raisin Fintrospect fubumvc-swagger Swagger Parser Swagger2 SwagGen dotswaggen Jester - Jolie rEST routER Swagger2::Client APIs.guru Swagger Framework www.container-solutions.com [email protected] The Repo https://github.com/ContainerSolutions/DreddDemo www.container-solutions.com [email protected] + = https://github.com/ContainerSolutions/DreddDemo www.container-solutions.com [email protected] The API Swagger Editor Swagger UI https://github.com/ContainerSolutions/DreddDemo www.container-solutions.com [email protected] Simple Server Go (Gorilla Mux) Special Handlers https://github.com/ContainerSolutions/DreddDemo www.container-solutions.com [email protected] Special Handlers authMiddleware NopeHandler https://github.com/ContainerSolutions/DreddDemo www.container-solutions.com [email protected] The Three Things ● Specifications ● Testing your API ● Mocking your API www.container-solutions.com [email protected] Dredd https://github.com/apiaryio/dredd “Dredd reads your API description and step by step validates whether your API implementation replies with responses as they are described in the documentation.” www.container-solutions.com [email protected] Dredd dry-run: null hookfiles: dredd/hooks.js language: nodejs sandbox: false server: ./main dredd.yml server-wait: 2 init: false custom: {} names: false only: [] reporter: [] output: [] header: [] ... www.container-solutions.com [email protected] Dredd Hooks ● POST > /items Requires Auth ● GET > /nope returns error www.container-solutions.com [email protected] Dredd $dredd www.container-solutions.com [email protected] www.container-solutions.com [email protected] Makefile builddredd: @docker build -t dreddtest -f dredd/DockerDredd . dreddtest: builddredd @docker run\ -e "DEMOSHASALT=test_salt"\ dreddtest www.container-solutions.com [email protected] Run the test $make dreddtest www.container-solutions.com [email protected] Circle-CI machine: services: - docker test: override: - make dreddtest www.container-solutions.com [email protected] Travis-CI language: go go: 1.6 services: - docker script: - make dreddtest www.container-solutions.com [email protected] Results https://travis-ci.org/ContainerSolutions/DreddDemo https://circleci.com/gh/ContainerSolutions/DreddDemo https://semaphoreci.com/jasonrichardsmith/dredddemo http://54.72.105.103:8080/job/DreddDemo/ www.container-solutions.com [email protected] The Three Things ● Specifications ● Testing your API ● Mocking your API www.container-solutions.com [email protected] Mocking your api www.container-solutions.com [email protected] Pokemock https://github.com/mobilcom-debitel/pokemock Drakov https://github.com/Aconex/drakov www.container-solutions.com [email protected] www.container-solutions.com [email protected] Pokemock FROM node:7-alpine RUN npm install -g pokemock COPY apispec/spec.yml . COPY pokemock/runpokemock.sh . ENTRYPOINT /bin/sh runpokemock.sh www.container-solutions.com [email protected] Let’s make it public https://sloppy.io/ www.container-solutions.com [email protected] Those tests Badges www.container-solutions.com [email protected] What you get from the start ● A formal contract ● API testing ● A mock for consumer testing www.container-solutions.com [email protected] Thank You! Jason Smith Senior Engineer Container Solutions @jasonrichardsmi.
Recommended publications
  • Automatic Test Generation of REST Apis Automatiserad Testgenerering Av REST API
    Linköping University | Department of Computer and Information Science Master’s thesis, 30 ECTS | Datateknik 2020 | LIU-IDA/LITH-EX-A--20/068--SE Automatic Test Generation of REST APIs Automatiserad testgenerering av REST API Axel Karlsson Supervisor : Anders Fröberg Examiner : Erik Berglund External supervisor : Linus Lindholm Linköpings universitet SE–581 83 Linköping +46 13 28 10 00 , www.liu.se Upphovsrätt Detta dokument hålls tillgängligt på Internet - eller dess framtida ersättare - under 25 år från publicer- ingsdatum under förutsättning att inga extraordinära omständigheter uppstår. Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner, skriva ut enstaka ko- pior för enskilt bruk och att använda det oförändrat för ickekommersiell forskning och för undervis- ning. Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säker- heten och tillgängligheten finns lösningar av teknisk och administrativ art. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i sådant sammanhang som är kränkande för upphovsman- nens litterära eller konstnärliga anseende eller egenart. För ytterligare information om Linköping University Electronic Press se förlagets hemsida http://www.ep.liu.se/. Copyright The publishers will keep this document online on the Internet - or its possible replacement - for a period of 25 years starting from the date of publication barring exceptional circumstances. The online availability of the document implies permanent permission for anyone to read, to down- load, or to print out single copies for his/hers own use and to use it unchanged for non-commercial research and educational purpose.
    [Show full text]
  • Lightweight Django USING REST, WEBSOCKETS & BACKBONE
    Lightweight Django USING REST, WEBSOCKETS & BACKBONE Julia Elman & Mark Lavin Lightweight Django LightweightDjango How can you take advantage of the Django framework to integrate complex “A great resource for client-side interactions and real-time features into your web applications? going beyond traditional Through a series of rapid application development projects, this hands-on book shows experienced Django developers how to include REST APIs, apps and learning how WebSockets, and client-side MVC frameworks such as Backbone.js into Django can power the new or existing projects. backend of single-page Learn how to make the most of Django’s decoupled design by choosing web applications.” the components you need to build the lightweight applications you want. —Aymeric Augustin Once you finish this book, you’ll know how to build single-page applications Django core developer, CTO, oscaro.com that respond to interactions in real time. If you’re familiar with Python and JavaScript, you’re good to go. “Such a good idea—I think this will lower the barrier ■ Learn a lightweight approach for starting a new Django project of entry for developers ■ Break reusable applications into smaller services that even more… the more communicate with one another I read, the more excited ■ Create a static, rapid prototyping site as a scaffold for websites and applications I am!” —Barbara Shaurette ■ Build a REST API with django-rest-framework Python Developer, Cox Media Group ■ Learn how to use Django with the Backbone.js MVC framework ■ Create a single-page web application on top of your REST API Lightweight ■ Integrate real-time features with WebSockets and the Tornado networking library ■ Use the book’s code-driven examples in your own projects Julia Elman, a frontend developer and tech education advocate, started learning Django in 2008 while working at World Online.
    [Show full text]
  • Guide to Secure Software Development in Ruby
    Fedora Security Team Secure Ruby Development Guide Guide to secure software development in Ruby Ján Rusnačko Secure Ruby Development Guide Fedora Security Team Secure Ruby Development Guide Guide to secure software development in Ruby Edition 1 Author Ján Rusnačko [email protected] Copyright © 2014 Ján Rusnačko. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. The original authors of this document, and Red Hat, designate the Fedora Project as the "Attribution Party" for purposes of CC-BY-SA. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. For guidelines on the permitted uses of the Fedora trademarks, refer to https://fedoraproject.org/wiki/ Legal:Trademark_guidelines. Linux® is the registered trademark of Linus Torvalds in the United States and other countries. Java® is a registered trademark of Oracle and/or its affiliates. XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
    [Show full text]
  • WEB2PY Enterprise Web Framework (2Nd Edition)
    WEB2PY Enterprise Web Framework / 2nd Ed. Massimo Di Pierro Copyright ©2009 by Massimo Di Pierro. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600, or on the web at www.copyright.com. Requests to the Copyright owner for permission should be addressed to: Massimo Di Pierro School of Computing DePaul University 243 S Wabash Ave Chicago, IL 60604 (USA) Email: [email protected] Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created ore extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages. Library of Congress Cataloging-in-Publication Data: WEB2PY: Enterprise Web Framework Printed in the United States of America.
    [Show full text]
  • Magnetic Silica Particles Functionalized with Guanidine Derivatives For
    www.nature.com/scientificreports OPEN Magnetic silica particles functionalized with guanidine derivatives for microwave‑assisted transesterifcation of waste oil Petre Chipurici1,6, Alexandru Vlaicu1,2,6, Ioan Călinescu1, Mircea Vînătoru1, Cristina Busuioc1, Adrian Dinescu3, Adi Ghebaur1,4, Edina Rusen1, Georgeta Voicu1, Maria Ignat5 & Aurel Diacon1* This study aimed to develop a facile synthesis procedure for heterogeneous catalysts based on organic guanidine derivatives superbases chemically grafted on silica‑coated Fe3O4 magnetic nanoparticles. Thus, the three organosilanes that were obtained by reacting the selected carbodiimides (N,N′‑ dicyclohexylcarbodiimide (DCC), N,N′‑diisopropylcarbodiimide (DIC), respectively 1‑ethyl‑3‑(3‑ dimethylaminopropyl) carbodiimide (EDC) with 3‑aminopropyltriethoxysilane (APTES) were used in a one‑pot synthesis stage for the generation of a catalytic active protective shell through the simultaneous hydrolysis/condensation reaction with tetraethyl orthosilicate (TEOS). The catalysts were characterized by FTIR, TGA, SEM, BET and XRD analysis confrming the successful covalent attachment of the organic derivatives in the silica shell. The second aim was to highlight the capacity of microwaves (MW) to intensify the transesterifcation process and to evaluate the activity, stability, and reusability characteristics of the catalysts. Thus, in MW‑assisted transesterifcation reactions, all catalysts displayed FAME yields of over 80% even after 5 reactions/activation cycles. Additionally, the infuence of FFA content on the catalytic activity was investigated. As a result, in the case of Fe3O4@ SiO2‑EDG, a higher tolerance towards the FFA content can be noticed with a FAME yield of over 90% (for a 5% (weight) vs oil catalyst content) and 5% weight FFA content. Biodiesel can represent a suitable renewable alternative for the direct replacement of standard diesel fuels derived from petroleum sources1,2.
    [Show full text]
  • Flask Documentation Release 0.7Dev July 14, 2014
    Flask Documentation Release 0.7dev July 14, 2014 Contents I User’s Guide1 1 Foreword3 1.1 What does “micro” mean?...........................3 1.2 A Framework and an Example........................4 1.3 Web Development is Dangerous.......................4 1.4 The Status of Python 3.............................4 2 Installation7 2.1 virtualenv....................................7 2.2 System Wide Installation...........................8 2.3 Living on the Edge...............................9 2.4 easy_install on Windows............................9 3 Quickstart 11 3.1 A Minimal Application............................ 11 3.2 Debug Mode.................................. 12 3.3 Routing..................................... 13 3.4 Static Files.................................... 17 3.5 Rendering Templates.............................. 17 3.6 Accessing Request Data............................ 19 3.7 Redirects and Errors.............................. 22 3.8 Sessions..................................... 22 3.9 Message Flashing................................ 23 3.10 Logging..................................... 24 3.11 Hooking in WSGI Middlewares....................... 24 4 Tutorial 25 4.1 Introducing Flaskr............................... 25 4.2 Step 0: Creating The Folders......................... 26 4.3 Step 1: Database Schema........................... 27 4.4 Step 2: Application Setup Code........................ 27 i 4.5 Step 3: Creating The Database........................ 29 4.6 Step 4: Request Database Connections.................... 30 4.7 Step
    [Show full text]
  • Original.Pdf
    Rails Security Primer I am not a software security expert CVE? Common Vulnerabilities and Exposures Vulnerability A weakness that an attacker can use to exploit a system Exploit A piece of software that exploits a vulnerability to achieve unintended or unanticipated behavior CVE-2012-5664 SQL Injection Vulnerability SQL Injection Vulnerability …but only exploitable if you used Authlogic or find_by_* methods in a certain way A cookie like { "session_id" => "41414141", "user_credentials" => "Phenoelit", "user_credentials_id" => { :select=> " *,\"Phenoelit\" as persistence_token from users -- " } } …would create a query like this User.find_by_id(params[:user_credendtials_id]) …would create a query like this User.find_by_id(params[:user_credendtials_id]) User.find_by_id({:select =>"*,\"Phenoelit\" as persistence_token from users --"}) …would create a query like this User.find_by_id(params[:user_credendtials_id]) User.find_by_id({:select =>"*,\"Phenoelit\" as persistence_token from users --"}) SELECT *,"Phenoelit" as persistence_token from users -- FROM "users" WHERE "users"."id" IS NULL LIMIT 1 Blood in the water… CVE-2013-0155 CVE-2013-0156 CVE-2013-0269 CVE-2013-0333 CVE-2013-0155 "Unsafe Query Generation Risk in Ruby on Rails" def reset_password if (@user = User.find_by_token(params[:token])) @user.reset_password! render :json => 'Success' else render :json => 'Failure' end end # POST to http://localhost:3000/users/ reset_password with "{\"token\":[null]}" CVE-2013-0156 "Multiple vulnerabilities in parameter parsing in Action Pack" Content-Type:
    [Show full text]
  • Wepgw003 High-Level Applications for the Sirius Accelerator Control System
    10th Int. Particle Accelerator Conf. IPAC2019, Melbourne, Australia JACoW Publishing ISBN: 978-3-95450-208-0 doi:10.18429/JACoW-IPAC2019-WEPGW003 HIGH-LEVEL APPLICATIONS FOR THE SIRIUS ACCELERATOR CONTROL SYSTEM X. R. Resende ∗, F. H. de Sá, G. do Prado, L. Liu, A. C. Oliveira, Brazilian Synchrotron Light Laboratory (LNLS), Campinas, Brazil Abstract the sequence we detail the architecture of the HLA and its Sirius is the new 3 GeV low-emittance Brazilian Syn- current development status. Finally we describe how the chrotron Light source under installation and commissioning integration of the CS has been evolving during machine at LNLS. The machine control system is based on EPICS commissioning and end the paper with conclusion remarks and when the installation is complete it should have a few on what the next steps are in HLA development and testing. hundred thousand process variables in use. For flexible inte- gration and intuitive control of such sizable system a con- CONTROL SYSTEM OVERVIEW siderable number of high-level applications, input/output The Sirius accelerator control system (SCS) is based on controllers and graphical user interfaces have been devel- EPICS [3], version R3.15. All SCS software components oped, mostly in Python, using a variety of libraries, such are open-source solutions developed collaboratively using as PyEpics, PCASPy and PyDM. Common support service git version control and are publicly available in the Sirius applications (Archiver Appliance, Olog, Apache server, a organization page [4] at Github. mongoDB-based configuration server, etc) are used. Matlab The naming system used in Sirius for devices and CS prop- Middle Layer is also an available option to control EPICS erties is based on ESS naming system [5].
    [Show full text]
  • Azure Forum DK Survey
    #msdkpartner #msdkpartner Meeting Ground Rules Please post your questions in the chat – We aim to keep QnA at the end of each session Please mute yourself to ensure a good audio experience during presentations This meeting will be recorded #msdkpartner Today's Agenda 08:30 - 08:35​ Welcome​ 08:35 - 09:15 Best of Build 09:15 - 10:00​ Top 5 Reasons to chose azure (vs. on-premise) 10:05 - 10:25​ Azure in SMB ​ 10:25 - 10:30​ Closing #msdkpartner #msdkpartner Hello! I’m Sherry List Azure Developer Engagement Lead Microsoft You can find me at @SherrryLst | @msdev_dk DevOps with Azure, GitHub, and Azure DevOps 500M apps and microservices will be written in the next five years Source: IDC Developer Velocity 100x 200x 7x 8x faster to set up a more frequent fewer failures on more likely to have dev environment code deployments deployments integrated security Source: DORA / Sonatype GitHub Actions for Azure https://github.com/azure/actions Azure Pipelines AKS & k8s support YAML CI Pipelines YAML CD Pipelines Elastic self-hosted agents Community and Collaboration In modern applications 90% of the code comes Your Code from open source Open Source Most of that code lives on GitHub Sign up for Codespaces Preview today https://github.co/codespaces Security and Compliance 70 Security and Compliance 12 56 10 42 7 LOC (M) LOC 28 5 Security Issues (k) Issues Security 14 2 Lines of code Security threats 0 0 Apr Jul Oct Jan Apr Jul Oct Jan Apr Jul Oct Jan Apr Jul Oct Jan Apr Jul Oct Jan Apr 2015 2015 2015 2016 2016 2016 2016 2017 2017 2017 2017 2018 2018 2018
    [Show full text]
  • Web Development Frameworks Ruby on Rails VS Google Web Toolkit
    Bachelor thesis Web Development Frameworks Ruby on Rails VS Google Web Toolkit Author: Carlos Gallardo Adrián Extremera Supervisor: Welf Löwe Semester: Spring 2011 Course code: 2DV00E SE-391 82 Kalmar / SE-351 95 Växjö Tel +46 (0)772-28 80 00 [email protected] Lnu.se/dfm Abstract Web programming is getting more and more important every day and as a consequence, many new tools are created in order to help developers design and construct applications quicker, easier and better structured. Apart from different IDEs and Technologies, nowadays Web Frameworks are gaining popularity amongst users since they offer a large range of methods, classes, etc. that allow programmers to create and maintain solid Web systems. This research focuses on two different Web Frameworks: Ruby on Rails and Google Web Toolkit and within this document we will examine some of the most important differences between them during a Web development. Keywords web frameworks, Ruby, Rails, Model-View-Controller, web programming, Java, Google Web Toolkit, web development, code lines i List of Figures Figure 2.1. mraible - History of Web Frameworks....................................................4 Figure 2.2. Java BluePrints - MVC Pattern..............................................................6 Figure 2.3. Libros Web - MVC Architecture.............................................................7 Figure 2.4. Ruby on Rails - Logo.............................................................................8 Figure 2.5. Windaroo Consulting Inc - Ruby on Rails Structure.............................10
    [Show full text]
  • A Web-Based System for Executing Interactive Scala Programming Exercises in Browser
    Aalto University School of Science Master's Programme in Information Networks Anastasia Lipi¨ainen A Web-Based System for Executing Interactive Scala Programming Exercises in Browser Master's Thesis Espoo, November 27, 2016 Supervisor: Professor Lauri Malmi Advisors: Otto Sepp¨al¨aD.Sc. (Tech) Juha Sorva D.Sc. (Tech) Aalto University School of Science ABSTRACT OF Master's Programme in Information Networks MASTER'S THESIS Author: Anastasia Lipi¨ainen Title: A Web-Based System for Executing Interactive Scala Program- ming Exercises in Browser Date: November 27, 2016 Pages: vii + 120 Major: Information Networks Code: SCI3047 Supervisor: Professor Lauri Malmi Advisors: Otto Sepp¨al¨aD.Sc. (Tech), Juha Sorva D.Sc. (Tech) When first introduced to programming, students are often assigned to write mere code snippets that only produce a numerical output with the help of a simple control structure. The students are left unimpressed as they fail to see the real utility that learning to program holds. By assigning students real-world programming problems, such as games and media computation exercises, we showcase real applications for programming. At the beginning of their first programming course, students are already used to working with modern, interactive, and visually impressive interfaces. However, they cannot be expected to produce the graphical user interfaces required to take the full advantage of media content. Previously, we have distributed interfaces implemented with Swing as program code for local execution; the practise does not allow the easy updating of assignment related code and achieving a usable interface is tiresome with the use of Swing. To address the issues of the current process, we developed a web-based system that allows the execution of interactive Scala programs in a browser.
    [Show full text]
  • The Lift Approach
    Science of Computer Programming 102 (2015) 1–19 Contents lists available at ScienceDirect Science of Computer Programming www.elsevier.com/locate/scico Analyzing best practices on Web development frameworks: The lift approach ∗ María del Pilar Salas-Zárate a, Giner Alor-Hernández b, , Rafael Valencia-García a, Lisbeth Rodríguez-Mazahua b, Alejandro Rodríguez-González c,e, José Luis López Cuadrado d a Departamento de Informática y Sistemas, Universidad de Murcia, Campus de Espinardo, 30100 Murcia, Spain b Division of Research and Postgraduate Studies, Instituto Tecnológico de Orizaba, Mexico c Bioinformatics at Centre for Plant Biotechnology and Genomics, Polytechnic University of Madrid, Spain d Computer Science Department, Universidad Carlos III de Madrid, Spain e Department of Engineering, School of Engineering, Universidad Internacional de La Rioja, Spain a r t i c l e i n f oa b s t r a c t Article history: Choosing the Web framework that best fits the requirements is not an easy task for Received 1 October 2013 developers. Several frameworks now exist to develop Web applications, such as Struts, Received in revised form 18 December 2014 JSF, Ruby on Rails, Grails, CakePHP, Django, and Catalyst. However, Lift is a relatively new Accepted 19 December 2014 framework that emerged in 2007 for the Scala programming language and which promises Available online 5 January 2015 a great number of advantages and additional features. Companies such as Siemens© and Keywords: IBM®, as well as social networks such as Twitter® and Foursquare®, have now begun to Best practices develop their applications by using Scala and Lift. Best practices are activities, technical Lift or important issues identified by users in a specific context, and which have rendered Scala excellent service and are expected to achieve similar results in similar situations.
    [Show full text]