Re: [PHP] "Pseudo PHP Kernel" From: Remco Chang (rkc <email protected>)
Date: 09/28/00

hi,

i'm actually in the process of implementing something similar... i would
say that i'm about 1/3 of the way there.

IMHO, what you have just said is essentially why object oriented
programming exists. my system has a file called "global.inc" where all
the system constants are declared (ie, error_log file path, encryption
method, etc), and a file called "include.inc." the purpose of include.inc
is that every page that _must_ include this file. this file performs some
common stuff such as decrypting cookies and passwords, creating database
connection, etc (similar to your kernel.php file?).

using your example, i have a class called DataBase... currently it's not
inherited by any other class, but you can imagine that it is simple to
created a class called MySqlDataBase which inherites from the DataBase
class.

my goal of the system is simple... i want to write a system that would
hide the details of PHP and SQL... the next programmer who uses this
system only has to know how to make function calls, and traverse through
arrays... things that a slightly more savvy HTML programmer could pick up
easily.

if you would like to discuss this further, feel free to email me.

----------------
remco chang
bountyquest.com

On Thu, 28 Sep 2000, Jesper Hess Nielsen wrote:

> Sorry, I obviously wasn't clear enough. I have a bit of a flu today :/
>
> My idea was to program the whole thing in PHP. That way, calling the main
> PHP file (which is, effectively, the "kernel file") sets the whole process
> in motion. Depending on for example some global variables, different modules
> will be loaded at different times, which would save some of the overhead.
> Anyhow, the kernel file (kernel.php?) must only have the capability of
> expanding itself using modules present. That way, I can create a completely
> flexible system for use in all my future apps. I only need the kernel file
> and then to make modules with the actual functionality in them (could be
> database support, file support, session handling, display handling, etc).
> I hope this makes things more clear.
>
> /Jesper
>
>
>
> ----- Original Message -----
> From: "David Newcomb" <davidn <email protected>>
> To: "Jesper Hess Nielsen" <jesper <email protected>>; <php-general <email protected>>
> Sent: Thursday, September 28, 2000 1:54 PM
> Subject: Re: [PHP] "Pseudo PHP Kernel"
>
>
> > khttpd
> >
> > There is already a kernel level web server for linux.
> > It handles all non-parsed html object (ie flat pages, images.etc).
> > Any request that requires extra processing (eg php, db) gets
> > passed to a user program like apache which dose all that stuff.
> >
> > The idea was that most of the objects which were asked for were
> > small images which did not need to go through the web server,
> > so for the extra speed they were handled by the kernel.
> >
> > Here is the link:
> >
> > http://www.fenrus.demon.nl/
> > >
> > Good luck in your quest!
> > David.
> >
> >
> > ----- Original Message -----
> > From: Jesper Hess Nielsen <jesper <email protected>>
> > To: <php-general <email protected>>
> > Sent: Thursday, September 28, 2000 12:38 PM
> > Subject: [PHP] "Pseudo PHP Kernel"
> >
> >
> > > Hi all
> > >
> > > I'm sitting here with a wonderful idea, but having some trouble getting
> my
> > > thoughts down into some useful code. Here is my idea. Any comments are
> > more
> > > than welcome.
> > >
> > > My idea is to ease my programming life in the future, by creating a
> system
> > > that can easily be extended with modules. Optimally, this system must be
> > > only a central "kernel", which only knows how to extend itself with any
> > > present modules. So if I wanted MySQL support in my system, all I need
> to
> > do
> > > is create a module for handling MySQL functions. Does anyone have a good
> > > idea as to how I might go about this with PHP? The system needs to be as
> > > flexible as possible, while still keeping track of module dependancies
> > (for
> > > example, a guestbook module needing database access would also require a
> > > database module). To extend on the systems capabilities, all I want to
> > have
> > > to do is upload the module code, and the system will extend itself
> > > automatically.
> > >
> > > Comments, suggestions, ideas etc are all more than welcome.
> > >
> > > Thanks in advance
> > >
> > > /Jesper
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> > > For additional commands, e-mail: php-general-help <email protected>
> > > To contact the list administrators, e-mail: php-list-admin <email protected>
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> > For additional commands, e-mail: php-general-help <email protected>
> > To contact the list administrators, e-mail: php-list-admin <email protected>
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>