[Gambas-devel] gambas wiki db scheme

Sebastian Kulesz sebikul at ...176...
Sun Sep 23 08:35:54 CEST 2012


On Sat, Sep 22, 2012 at 8:56 PM, Benoît Minisini
<gambas at ...1...> wrote:
> Le 23/09/2012 01:42, Sebastian Kulesz a écrit :
>> On Sat, Sep 22, 2012 at 9:28 AM, Benoît Minisini
>> <gambas at ...1...> wrote:
>>> Le 22/09/2012 03:54, Sebastian Kulesz a écrit :
>>>>
>>>> I already finished moving the header. I will start with the "wiki"
>>>> part as soon as i get the dump, i'm currently doing the admin page and
>>>> implementing the user management functions, along with the comments
>>>> system.
>>>>
>>>
>>> The dump is on the way...
>>
>> The dump worked just fine, but i need some pages that cover any
>> variant that the current wiki can handle, like titles for v2 and v3,
>> the components url (maybe the gb component), etc.
>
> Normally you got the entire database, except the undo table. I can't
> give you more.

My bad, phpmyadmin only imported a few rows because of the size of the
database, i had to change the max_post_size to import the full dump.

>
>>
>> The header should be set using the Response.ContentType property, not
>> by directly printing it.
>
> A WebPage sends HTML, so the content type is "text/html". As it is the
> default Response.ContentType, nothing is set. So what are you talking
> about? Why do you want to change it?

I was not talking about changing it, but preventing it from being
printed. I got around this by using the header as a global template
that is included by any other page.

>
>> Besides. almost all template systems provide
>> both options, to either return the contents of the template rendered
>> (to be appended to other content) or to dispatch it directly to the
>> user.
>
> This is another point. But I'm on releasing a new version, so I can fix
> bugs, but not change everything.

I see. Don't worry though, as i said before, i managed without it, but
it would be a nice feature ;)
I have no hurry!


>
> Why do you want to do something else than printing with WebPage?
>
>>
>> I managed to fix the problem though, but i'm having some issues. The
>> <<--CONTENTS-->> and <</WebPage>> tags don't seem to work. Anything
>> after an include statement seems to be omitted.
>
> I need some examples. Mine work!

FIXED. There was a "tiny" mistake inside a template. Instead of <%= i
was using <% to print the content of a variable. Clearly a mistake,
but i could only find it by looking at where the output stopped! This
bug has caused me a lot of trouble!

>
>>
>> Also, debugging a webpage is *really* difficult. If there is an error,
>> the buffer is flushed anyway, until the line where the error happened.
>> If the error is before the headers are sent , then only this line is
>> shown in the apache's error_log file:
>>
>> [Sat Sep 22 19:09:55 2012] [error] [client 127.0.0.1] Premature end of
>> script headers: doc.cgi.gambas
>
> You can catch the error and print something in a log file. This is all
> you can do at the moment. This is the reason I want to try to embed a
> HTTP server and debug scripts directly from the IDE too!

This is what i ended up doing, but as you just read, not every error
can be detected using a catch statement yet.

So far, the whole template is moved. The admin section is finished, i
just need to define a scheme for the users table.

I have a few points i'm not completely sure how to proceed:

Users should be moved from the current authentication system to the
database. Currently, the username is stored to identify the last
editor of a page, or a previous version of a page. Ideally, this
should be replaced by a JOIN query when user data is needed along with
the page being requested. The best implementation would be to use the
row id of the user, and not it's username, but this implies converting
every row in the page and archive table. As a not-so-important
benefit, some disk space would be saved. The conversion could be
easily made with a script, but it will take some time, and it's not
needed anyway, things will work just fine like this. Which way should
i go?

We previously stated that the new documentation syntax implemented in
the IDE should be used as default. What do you think would be better,
Implement the new wiki as a drop-in replacement for the current one
and implement this later, or do everything now?

I'm thinking about some small improvements, like page subscriptions to
which the editors can subscribe to be notified about changes to
specific pages, the comment system we previously mentioned. What do
you think?

I will upload what i have so far once i finish polishing the user
management class.

Thanks!

>
> Regards,
>
> --
> Benoît Minisini
>
> ------------------------------------------------------------------------------
> How fast is your code?
> 3 out of 4 devs don\\\'t know how their code performs in production.
> Find out how slow your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219672;13503038;z?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel




More information about the Devel mailing list