Skip to content

Demo Code with Examples for educational purpose

License

Notifications You must be signed in to change notification settings

capybara1/AspNetCoreDemo

Repository files navigation

ASP.NET Core

Demo Code with Examples for educational purpose

Overview

ASP.NET Core

Web Service Characteristics

  • Loose coupling
  • Dynamic binding
  • Utilization of (open) standards
  • Deployment
  • Shifts importance of Software Architects
  • Higher invest in comparison to the usage of libraries
  • Higher complexity in comparison to the usage of libraries
    • Availability
    • Security
    • Versioing
    • Performance

HTTP

Protocol Specifications

Verbs

Method Semantics Safe Idempotent
OPTIONS True True
HEAD Read True True
GET Read True True
PUT Upsert False True
POST Create False False
PATCH Update False False
DELETE Delete False True

Remarks:

  • Idempotence
    • Cares about the state; doesn't require the response of a repeated operation to be identical

Further readings:

Status Codes

Most important

Further readings:

Header

Media Types

In alphabetical order:

  • Atom
    • application/atom+xml
  • Form Data
    • multipart/form-data
  • HTML
    • text/html
  • iCalendar
    • text/calendar
  • JSON
    • application/json
  • Protobuf
    • not registered
    • Currently in use
      • application/x-protobuf
      • application/vnd.google.protobuf
  • Text
    • text/plain
  • XML
    • application/xml
  • YAML
    • not registered
    • Currently in use
      • text/x-yaml
      • application/x-yaml
      • application/yaml
      • application/vnd.yaml

Further readings:

Examples

Examples for modifications

Paradigms

  • Resouce oriented Web APIs
    • Current development is domained by (pragmatic) REST
  • RPC APIs
    • Legacy applications still heavily utilize SOAP or EDI
    • Current development is domained by gRPC
  • Streaming APIs
  • Query APIs
    • Current development is domained by GraphQL
  • Flat File APIs

Resources

Which Paradigm to Follow?

Constraints

Depends on Contraits

  • Business Constraints e.g.
    • Customer-related
    • Business requirements
    • Product requirements
  • Complexity Constraints
    • System complexity
    • Evolution requirements
  • Domain Constraints
    • Domain-specific limitations
    • Regulations
    • Environments
  • Cultural Constraints
    • Conway's law
    • Knownledge
    • Human resources
    • Peer-PRessure
    • Trendiness

Resources

Properties

  • Performance
    • Network performance
    • Network efficiency
    • User-perceived
  • Scalability
    • Size complexity
  • Simplicity
    • Of the uniform interface
    • User-perceived
    • Task structure
    • Unpredictability
    • Algorithmic
    • Chaotic
  • Modifiability
    • Evolvability
    • Extensibility
    • Customizability
    • Configurability
    • Reusability
  • Visibility
    • Monitoring
    • Security
    • Caching
  • Portability
    • Different environments
    • Code with data
  • Reliability
    • Susceptibility to failure
    • Ability to recover
  • Deiscoverability
    • Design-time
    • Runtime
  • Type-Safety
  • Ease of development
    • Server
    • Client
  • Cost effectivity
    • Time to market
    • Development cost
    • Maintenance cost
    • Cost of change
  • Active community
  • Tooling
    • Server
    • Client
    • API management
    • Developer experience
  • Ecosystem maturity
  • Resources
    • Books
    • Articles
    • On-boarding tutorials
  • Enterprise readyness

Resources

REST

Architectural Style

Classficiation

API Design

Terminology

  • Endpoint
  • Hyperlink
  • Intermediary
  • Link Relation
  • Resource
  • Resource Collection
  • Resource Identification

Aspects

Universal

  • Naming conventions
  • Type conventions
    • Representation of date and time (points, durations & intervals)
  • API Discovery and Description
    • Hyperlinking
      • Locator representation
        • Templating
      • Relation semantics
    • Allowed actions
      • Supporting actions that don't fit in the semantic corset of standard verbs
    • Providing meta information
    • Document structure
  • Retrieval of a single resource
    • Partial resource retrieval
    • Representation of relationships
    • inclusion of related resources
  • Manipulation of single resources
    • Updating resources
    • Partially updating resources
    • Adding relationships
    • Removing relationships
  • Retrieval of resource collections
    • Filtering
    • Sorting
    • Pagination
  • Mainpulation of resource collections
    • Adding/Upserting resources
      • Generation of identifiers
        • Client-side
        • Server-side
      • Polymorphy
        • Type declaration
    • Removing resources
      • Tombstoning
      • Trash Bin
  • Searching
  • Representation of error information
    • Status Codes
    • Document structure
  • Change Management
    • Undo
    • Delta queries
  • Events
  • Batch requests
  • Resilience
    • Retrying requests
  • Security
    • Authentication
    • Authorization
  • API Lifecycle
    • Compatibility
      • Versioning
    • Deprecation
  • Cachability
  • Internationalisierung
  • Asynchronicity
    • Long running operations
      • Initiation
      • Status retrieval
      • Cancellation
  • Availability
    • Throttling
    • Rate Limiting
  • Consistency
    • Optimistic concurrency control
      • Conflict avoidance
      • Conflict detection
      • Conflict handling
    • Transactions
  • Multitenancy
    • Measuring
    • Monetization
  • Developer experience
    • Documentation
    • Tooling
    • Code on Demand

Standardization

API & Data Description

In alphabetical order:

Further readings:

Fundamental Technologies

In alphabetical order:

  • CURIE
    • Acronym for Compact URI
    • Standardized by W3C
    • Version 1.0 released on December 2010
  • JSON-LD
    • Acronym for JSON for Linked Documents
    • Standardized by W3C
    • Version 1.1 released on September 2018
  • URI Template
    • Standardized by IETF
    • Current Version released in 2012
  • WebHooks
  • WebSockets

Articles

Versioning

In alphabetical order:

Current State of REST

REST Compared to SOAP

  • SOAP 1.2 has been standardized by W3C in April 2007
  • SOAP is considered RPC while REST relies on manipulation of addressable ressources
  • SOAP works without HTTP but is usually used on top, since communication via HTTP is usually enabled in a corporate security infrastructure
  • Some HTTP Features are redundant to remove a dependencie to HTTP
  • Tooling for HTTP cannot be used
    • Only used verb is POST
      • No HTTP Caching
    • Informations in body
      • No URL based filtering
  • SOAP has a defined set of associated standards (WS-*), created by a few organizations

About

Demo Code with Examples for educational purpose

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages