csse490 web services development
play

CSSE490 Web Services Development Introductions, REST, and Back-end - PowerPoint PPT Presentation

CSSE490 Web Services Development Introductions, REST, and Back-end tools Motivation for this course Sabbatical at Software Engineering Professionals Worked on a variety of projects o Programming locks for businesses so they can use


  1. CSSE490 Web Services Development Introductions, REST, and Back-end tools

  2. Motivation for this course • Sabbatical at Software Engineering Professionals Worked on a variety of projects o • Programming locks for businesses so they can use Apple HomeKit to access locks • Discovery Windows 8 Desktop application to assess ability to bid on client project • Internal AngularJS front-end, Java back-end web application to help managers manage resources. • Backbone-marionette enrolment and registration front-end application for financial institution • Study groups and special interest groups

  3. Motivation for this course • Sabbatical at Software Engineering Professionals Became fascinated with evolution of the web o • New technologies, approaches, modules, libraries • Node.js • Evolution of JavaScript as front-end & back-end development platform • Web 2.0 • REST architectural style

  4. Motivation for this course • Limited experience with Web courses at Rose Introduction to Web Programming (CSSE280) o Web App Frameworks with AppEngine (CSSE480) o Decided to use lessons learned from sabbatical experience to introduce o course on Web Services Development: q MEAN Technology stack q REST architectural style q Jasmine unit testing for front-end q Bootstrap for html-and css-based styling of front-end views q SASS (Syntactically Awesome Style Sheets) as CSS language q Mocha for testing back-end application

  5. REST • Representational State Transfer (REST) architectural style for distributed hypermedia system • Characterized by 6 constraints: Client-Server: o • Separation of concerns is the principle behind the client-server constraints • Separating the UI concerns from the data storage concern improves portability Stateless: o • No client context is stored on the server between requests • Each request contains all the information needed to service the request Cacheable: o • Require that the data within a response to a request be implicitly or explicitly labeled as cacheable or non-cacheable

  6. REST • Characterized by 6 constraints: Layered System: o • Allows an architecture to be composed of hierarchical layers Each component cannot "see" beyond the immediate layer with • which it is interacting • A client cannot ordinarily tell whether it is connected directly to the end server, or to an intermediary along the way. • Intermediary servers may improve system scalability by enabling load- balancing and by providing shared caches. Layers may also enforce security policies. Uniform Interface: o • Central feature that distinguishes the REST architectural style from other network-based styles • Defines the interface between clients and servers • Simplifies and decouples the architecture, which enables each part to evolve independently

  7. REST Guiding principles • Resource-Based Individual resources are identified in requests using URIs as resource o identifiers. The resources themselves are conceptually separate from the o representations that are returned to the client. For example, the server does not send its database, but rather, some o JSON , XML that represents some database

  8. REST Guiding principles • Manipulation of Resources Through Representations When a client holds a representation of a resource, including any o metadata attached, it has enough information to modify or delete the resource on the server, provided it has permission to do so. Verbs that make up REST Uniform Interface: o • GET • POST • PUT • DELETE

  9. REST Guiding principles • Self-descriptive Messages Each message includes enough information to describe how to process o the message. For example, which parser to invoke may be specified by an Internet o media type (previously known as a MIME type). Responses also explicitly indicate their cache-ability. o

  10. REST Guiding principles • Hypermedia as the Engine of Application State (HATEOAS) Clients deliver state via body contents, query-string parameters, request o headers and the requested URI (the resource name). Services deliver state to clients via body content, response codes, and o response headers. • This is technically referred-to as hypermedia (or hyperlinks within hypertext).

  11. REST • Characterized by 6 constraints: Code-on-demand (only optional constraint): o • Server can temporarily extend client Server transfer logic or executable to client • • Client executes logic • For example: Java Applet, JavaScript • Compliance with REST constraints allows: Scalability o Simplicity o Modiafiability o Visibility o Portability o Reliability o

  12. http://joaopsilva.github.io

  13. Editor • Editor – Sublime Text 3 http://www.sublimetext.com/3 o To configure: o • Preferences à Settings – User • Whitespace settings: insert 4 spaces for tab

  14. Backend Tools: Node.js • A JavaScript runtime built on Chrome’s V8 JavaScript engine https://nodejs.org/en/ o Install with Homebrew (http://brew.sh/) on Mac o • brew install node Will install NPM – Node Package Manager - https://docs.npmjs.com/ o Testing Node.js installation o • node –v • node • Enter node statements • Press ‘CTRL’ + ‘c’ TWICE to exit

  15. Backend Tools: express.js • Node.js web application server framework http://expressjs.com/ o Is typically installed locally or each backend web development project o • $ npm install express --save OR • Follow instructions posted at http://expressjs.com/starter/installing.html Hello world example at http://expressjs.com/starter/hello-world.html o

  16. Backend Tools: mongoDB • MongoDB – NoSQL Cross platform document- oriented database http://docs.mongodb.org/manual/installation/ - installation instructions o https://docs.mongodb.org/manual/ - Documentation o https://docs.mongodb.org/getting-started/shell/ - Getting started with o MongoDB • MongoDB Shell • Import Example Dataset

Recommend


More recommend