Solidarity for the people in Donetsk and Lugansk
The Kyoukai (境界), A Simplified Pascal Web Framework.
This project will be slowly updated until the unknown time.
In Japanese, Kyoukai means boundary, because the Pascal, it's bounded me as my favorite programming language, no, not like that. The concept is, Kyoukai can be embedded into your desktop application or just leave it as a separated single program, so you can decide which is better, bound it into your existing application or not.
I make it for Pascal because I can not find any Pascal web-framework which I really comfortable with. Some are too complicated, while some others have too many dependencies. Basically, I expect an easy-to-use framework like CodeIgniter in Pascal, even simpler than CodeIgniter.
This project is too far from a complete framework, it still in the experimental stage, very unstable and full of dragons, it may destroy your house or kill your kitten, because everything can be changed in this version (0.0.0). Please help me if you have any idea, code, and feature request. And, Don't too silly to open an issue.
- fpc / free pascal compiler, version 3.0.4
- fcl-web
- kyoukai_framework
- lazarus (optional)
- kyoukai_framework
- kyoukai_standard.lpk
- Dio Affriza - Main Author
- Luri Darmawan - Many suggestions and collaboration with ported FastPlaz unit into Kyoukai
- Aria Ghora Prabono - Helping many things, including writing dynamic router
- Are you next? Get Involved!
- making translation file to show server message in other languages
-
add an option to produce error message with json or html(an implemented alternative with 505_override and 404_override) - Ultibo HTTP Server support
- CGI App support
- FastCGI App support
- Lazarus Project Wizard
- fixing bug when embedding into existing application. (partially fixed)
-
fixing webview memleak with threaded := true(partially fixed, looks I have trouble with RTTI method)
Create two files:
project_kyoukai.lpr
;unit1.pas
;
In project_kyoukai.lpr
, type:
program project_kyoukai;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes,
kyoukai.standard.HTTPApplication,
{You must place your module units here or Kyoukai can't register anything!}
unit1
{ you can add units after this };
{$R *.res}
begin
KyoukaiApp.Port := 80;
KyoukaiApp.Run;
end.
In unit1.pas
, type:
unit unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils,
Kyoukai.Standard.WebRouter,
Kyoukai.Standard.WebModule;
type
THome = class(TKyModule)
published
procedure MainHandle;
end;
implementation
procedure THome.MainHandle;
begin
echo('Hello world!');
end;
initialization
Routes['main'] := THome;
end.
Compile and run the project project_kyoukai.lpr
. Now, in your web browser, access the following URL:
http://localhost/
- 💷 Pascalcoin:
589616-80