My project...criticism? ideas? ect..

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
Earlz
Gets Obvious Implications
Posts: 785
Joined: Sat Jun 09, 2007 8:38 am UTC
Location: USA
Contact:

My project...criticism? ideas? ect..

Postby Earlz » Sun Jul 15, 2007 5:47 am UTC

Ok, I have begun yet another project...
My idea is a in-browser method of managing websites..(not entirely meant for developing your website, but rather for on-the-go content edits and such)

It is designed to only be a "framework" which manages "add-ons" (the framework basically, is just an interface for the user to use them)

The addons are designed to be very easy to make, but also, the potential of a lot of power..

also, the framework itself is meant to work from nothing but PHP...therefore, a quite minimalist host will work...(though add-ons may use databases and such)

here is my idea.txt file..

Code: Select all

Ok, for security, EVERY .php file should have a include at the first line, like this
<?php include "security.php";?>
This is a very small, but important file...it will check if a variable is defined/set and if it isn't, then the

interpretor is immediatly stopped. This is so no one can just goto

http://mywebsite.com/niche/addon/my_addon.php  and have access..

An addon is basically just a php script with a few things to setup, and a few restrictions...

For setup, a very simple template would be as follows:
<?php
include "security.php"; //in EVERY FILE NO MATTER WHAT!!
switch($niche_action){
  case "init":
   //do initialization stuff here..
   $name="My Addon"; //this is the name of addon
   $link_name="Hello World"; //this is the text of the link fo ryour addon
   $page_title="My Addon Page"; //this is the title used for "requested" page
   $version=1.0; //this should be a float, and is the version of your addon
  break;
  case "setup":
  //do the initial setup, this is only done the first time the script is run!
  break;
  case "requested":
  //This is done when a link for your addon is requested by the navigation link
  echo 'Hello World!!<br>'; //show a small example page
  echo '<a href="'.GenerateLink("My Addon","test_link").'">My Test Page</a>'; //also, GenerateLink can take an

optional argument option, like GenerateLink("My Addon,"test_link",$my_arg_array);
  break;
  case "test_link": //this will be called when clicking on the link made by GenerateLink()
  echo 'hai';
  break;
  case "exit":
  //do any ending things here...
  break;
  default:
  echo 'Undefined action!!<br>';
?>

--end--

See, this really is simple, but powerful..I'm really not sure how I will pull off all of it while keeping

script exec time under 1second though...

Restrictions:
You should not use stylesheets, though inline styles can be done..
<head> and <html> can not be used, can not be set, except for in the initialization(so, you can only have one

title for all pages)



$_PUT will probably be used for page navigation, as it will make it easy to bookmark

Cookies will be used, so that there is no relying on .htaccess...this hting is suppose to depend on nothing but

PHP...(though, addons can rely on anything they want..)


edit:
btw, the project name right now is niche...though that was jsut a completely random name that was the first thing I thought of...
My new blag(WIP, so yes it's still ugly..)
DEFIANCE!
Image
This is microtext. Zooming in digitally makes it worse. Get a magnifying glass.. works only on LCD

jinksys
Posts: 14
Joined: Sun Jun 17, 2007 8:43 pm UTC

Postby jinksys » Sun Jul 15, 2007 5:59 am UTC

Looks like a simple content management system.

User avatar
Earlz
Gets Obvious Implications
Posts: 785
Joined: Sat Jun 09, 2007 8:38 am UTC
Location: USA
Contact:

Postby Earlz » Sun Jul 15, 2007 6:10 am UTC

simple...yes...in-browser..I've actually never used a content management system...I really should at least try one to see what I'm up against..lol

edit:
really, this could be a very powerful content management system, or it could be very simple...it just depends on the add-ons, remember! what I'm making is only a framework(though I will make some add-ons too of course!)
My new blag(WIP, so yes it's still ugly..)
DEFIANCE!
Image
This is microtext. Zooming in digitally makes it worse. Get a magnifying glass.. works only on LCD

User avatar
davean
Site Ninja
Posts: 2498
Joined: Sat Apr 08, 2006 7:50 am UTC
Contact:

Postby davean » Sun Jul 15, 2007 6:20 am UTC

Earlz wrote:in-browser...


I suppose you could make an out of browser one, but that would be weird ... well, I guess xkcd.com uses an out of browser one, I'll shut up.

iw
Posts: 150
Joined: Tue Jan 30, 2007 3:58 am UTC

Postby iw » Wed Jul 18, 2007 7:07 am UTC

jinksys wrote:Looks like a simple content management system.
Very much like this one.

These are pretty huge in the business world. My last job was about 75% comprised of making these.

ToLazyToThink
Posts: 83
Joined: Thu Jun 14, 2007 1:08 am UTC

Re: My project...criticism? ideas? ect..

Postby ToLazyToThink » Wed Jul 18, 2007 7:33 am UTC

Earlz wrote:..................................
Ok, for security, EVERY .php file should have a include at the first line, like this
<?php include "security.php";?>
This is a very small, but important file...
..................................


I don't really know PHP, so I'm short on suggestions for how to fix this, but depending on plugin writers to do the correct thing to protect security seems like a bad idea to me. Surly PHP provides some way that would allow you to go through security.php before passing control to the plugin?

I guess it doesn't matter that much since no matter what you do you have to trust the plugin at some point (since you probably can't stop them from opening completely different holes anyway).

User avatar
Arancaytar
Posts: 1642
Joined: Thu Mar 15, 2007 12:54 am UTC
Location: 52.44°N, 13.55°E
Contact:

Postby Arancaytar » Fri Jul 27, 2007 12:40 pm UTC

It's a grand idea, and you can learn a lot when writing a CMS from scratch.

But (don't take this wrongly), your skill may be much more effective (and useful) applied to one of the open-source web CMS projects already out there. My own favorite is Drupal, but Typo3 and Joomla are also good. They do pretty much what you are describing, for setting up static pages, news portals, community sites etc. These systems are modular, so you can make extensions for them, and they are also worked on by a fairly open community (at least Drupal is).

You don't need to write your own kernel from scratch to become a Linux expert either. ;)

User avatar
bavardage
Posts: 253
Joined: Sun Apr 15, 2007 11:38 pm UTC
Contact:

Postby bavardage » Fri Jul 27, 2007 4:29 pm UTC

I have had several attempts at making CMSs.
The problem I always found was that I'd get the front-end working fine from the database, but could never be bothered to make the backend, when it was so simple just to edit/add stuff in phpmyadmin.

Beware.
'It can't be software incompatibility - the Trodden Spiral was designed for concentric rings, idiot ...'

Kiirani
Posts: 38
Joined: Sat Apr 07, 2007 10:48 am UTC

Postby Kiirani » Tue Jul 31, 2007 5:36 am UTC

bavardage wrote:I have had several attempts at making CMSs.
The problem I always found was that I'd get the front-end working fine from the database, but could never be bothered to make the backend, when it was so simple just to edit/add stuff in phpmyadmin.

Beware.


Haha, this is exactly what I do. I gave up and started using wordpress :/

User avatar
bavardage
Posts: 253
Joined: Sun Apr 15, 2007 11:38 pm UTC
Contact:

Postby bavardage » Tue Jul 31, 2007 12:42 pm UTC

I also use wordpress now :P and I can satisfy my coding cravings through writing pointless WP Plugins ^^
'It can't be software incompatibility - the Trodden Spiral was designed for concentric rings, idiot ...'


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 8 guests