Jump to content

FCL-Web

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Leledumbo (talk | contribs) at 09:02, 31 July 2014 (Introduction: add JSON-RPC capability). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Introduction

FCL-Web[1] is part of Free Pascal's Free Component Library (FCL), focusing on web (related) application development. The package helps users to develop CGI, FastCGI and embedded web server applications, as well as Apache modules. It provides units implementing HTTP(S) protocol and a somewhat low level web application framework, in the form of web modules. Some content producers (e.g. for automatic content generation from dataset) are also provided. Other prominent use is to send/retrieve data from/to web services (possibly using JSON-RPC).

Web Application Support Units

fpcgi, fpfcgi, fphttpapp and fpapache[24] are the units implementing CGI, FastCGI, embedded web server and Apache module respectively. The interface between the units is made similar by utilizing object oriented inheritance. Therefore, a change of used unit in the uses clause is sufficient to create all 4 kinds of web applications, without code changes for the most of the rest of the application. A notable exception might be the need to set port for FastCGI and embedded web server.

Other Units

  • httpdefs unit defines base classes for cookies, sessions, file uploads, mime handling, HTTP header, request & response
  • iniwebsession unit implements session management using .ini files
  • fphttpserver unit provides ready to use multithreaded-able standalone http server
  • fphttpclient unit provides class to send http requests and retrieve its responses. It implements all available HTTP 1.1 methods.\
  • fphtml unit provides content producers
  • fphttp unit provides abstract web framework support using web modules
  • fpweb unit provides an implementation of fphttp's abstract web framework

References