A few bits of advice here:
Based on the experience of developing nadmin:
FastTemplate (of which the output in nadmin is based, should be called
SlowTemplate, generally avoid replacing templating engines, like IT and
PHPlib, for anything where speed is important.)
Developing applications (eg. real code), using snippets is not realistic
(it was a great idea, but has significant downsides, like no revision
control, difficult to recieve patches.. etc.).. - go back to good ole
files..
create some wrapper classes (probably best to use the PEAR standards)
for the midgard dataObjects -
Midgard_Article, Midgard_Topic - put the 'midgard focused data
manipulation in here'
If you move all thecode that directly access midgard into
Midgard_Auth, Midgard_Object and Midgard_Article etc. then creating a
Midgard-lite type application becomes considerably simpler..
create a simple url->class mapper, that works like the url->snippet
mapper in the current version.
( I could probably supply that)
eg.
/rcs/approve/page
would map to
Midgard_NewAdmin_Approve_Page
(this is actually similar to Zope I discovered.. - after implementing a
few times on a few projects in PHP)
interface definintion for 'these Controller' classes
::getAuth() <- url based authentication - should return 'error' or
'login' or '' for OK.
::start() <- default entry point (the base class will automatically call
post or get, override this if neccessary)
::post() <- recieves post requests
::get() <- recieves get requiests
::output() <- (base class declares this to display the template)
::outputXXX() <- page specific outputs. eg. like outputPulldowns()..
Recommended Classes from pear
HTML_QuickForms (for building form parts of the page, especcailly pulldowns)
Template_Flexy (on docs.akbkhome.com, it may be worth seriously
considering this rather than the midgard templating engine..., as it can
do loops and is HTML editor friendly..), either that or Smarty
HTML_TreeMenu - not looked at this but my guess is it could be handy..
PEAR:: - the error handling in pear is a bit annoying, it's debatable
initially how much advantage this adds, however
Config - consider writing a container for the user & sitegroup preferences.
Alot of the code that 'currently is' nadmin could be reworked to fit
into this controller class type example..
Example of improvements to nadmins code:
$object = Midgard_Object::staticGet('styleelement',$_GET['id']);
would replace stuff in argv0/edit/edit etc.
anyway - Nadmin contains alot of lessons (a considerable proportion
about how not to write a big applications :)
The code that may be usefull that I have is a url->class mapper and the
base class for the controller class. A session->class var loader, so
each page contains documentable session data.
Anyway . - It would be nice to find a sponsor for this :)
regards
alan
Fredrik Jonson wrote:
>On Mon, 29 Jul 2002 [EMAIL PROTECTED] wrote:
>
>
>
>>Err. As we do not know the full status of HKLC (is there someone
>>who can find out and inform me either offlist or onlist?),
>>
>>
>
>Wasn't there someone on the list who quite recently bought the CD
>version of nadmin studio? If so, it at least indicates some minimal
>level of activity.
>
>
>
>>the GPL part is a bit in the air.
>>
>>
>
>As far as I have understood the nadmin license it's not even close
>to GPL. Because of the section 9 it is a rather closed license for
>everyone who's not only a user. But the section 9 is rather unclear
>so I'm not sure.
>
>
>
>>Even so myself and Marcin has taken upon us to try to produce a next
>>version of nadmin.
>>
>>
>
>That sounds great. What's your timeframe? Will you do it from scratch
>to avoid any legacy licensing from the current nadmin studio? If not,
>do you think you will be able to freely distribute a 2nd gen nadmin
>whith the current license?
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]