Coder Social home page Coder Social logo

eecs4413-2021f / module-b Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 79 KB

EECS 4413: Building E-Commerce Systems (Fall 2021) - Code examples from Tomcat & Web Services module (Weeks 3 & 4).

Java 98.83% Shell 0.49% Perl 0.68%
tomcat webservices webservers jsp-servlet jspx server-side java

module-b's Introduction

Module B - Web Services


HTTP Server Refactoring Example

Description
v1.0 The initial code with everything in the run method.
v1.1 The business logic/application code is moved into a doRequest method.
v1.2 The request and response variables are grouped into Request and Response classes.
v1.3 The doRequest is removed for the HTTPServer class entirely into a subclass MainService.
v2 The Request and Response classes and the request and response handling methods are moved into dedicated RequestContext and ResponseContext classes.
v3 Split each service into its own class, and group the server code into its own package.
v4 Reorganize the server code so the server itself isn't a thread. Clients are handle by worker threads.
v5 Spin-off the service logic into model classes, engines, and data access objects.

The Tomcat servlet versions:

The associated model classes:


Other Servlets

  • TotalService: Demonstrates accessing and setting the session.

From the Lab


RESTful Products API Example

From the Lab


Miscellaneous


Common Gateway Interface

To run, copy the cgi-bin directory into your www directory and run: chmod -R go+x ~/www/cgi-bin/.

Bash Scripts:

PERL Scripts:

module-b's People

Contributors

vwchu avatar

Watchers

 avatar

Forkers

harism91

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.