Giter VIP home page Giter VIP logo

kyoukai_framework's Introduction

The Boundary, A Simple Framework for A Small Server Application

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.

Tip Renchon

GitHub version

Requirements

  • fpc / free pascal compiler, version 3.0.4
  • fcl-web
  • kyoukai_framework
  • lazarus (optional)

Dependencies

  • kyoukai_framework
    • kyoukai_standard.lpk

People Involved

  • Dio Affriza - Main Author
  • Luri Darmawan - Many Suggestion and Collaboration with ported FastPlaz unit into Kyoukai
  • Are you next? Get Involved!

Roadmap

  • 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

Known errors

  • fixing bug when embedding into existing application. (partially fixed)
  • fixing webview memleak with threaded := true (partially fixed, looks I have trouble with RTTI method)


Let's get started!

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 };

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/

Screenshots

Hello World Demo

Kyoukai Information Page

Not Found Default Handler

Send a tip

  • 💵 Bitcoin: 15ZPqBk6oxAfRNqYwDo4LpW9SkV7j8cZyd
  • 💷 Pascalcoin: 589616-80

kyoukai_framework's People

Contributors

afuriza avatar luridarmawan avatar ariaghora avatar

Stargazers

 avatar

Watchers

James Cloos avatar

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.