> I appreciate the ideas here, but I am not sure I want to go this
> direction. You have some good ideas here but
>
> 1) I'm afraid we'll lose track of things by not doing the writing
> immediately, and trying to cache it temporarily. I foresee lot's of
> bugs.
After reviewing the BOLTloadpage function for the mysql_backend
plugin, I really don't see where the problems would arise. The
BOLTcache functionality is really powerful. Assuming we store the new
content in bolt cache immediatly, there isn't much room for error.
Remember that the checks to see if Boltwire should look at the file
system or the cache are fairly straight-forward.
>
> 2) I don't think most people are going to be editing a single page
> multiple times, often. And if there was a need to do that probably
> some special plugin or system could be developed to handle it. For
> example one function that pokes little changes into the file for each
> change you want to make, and then another function executed later that
> makes the saves. Logic something like:
>
> function BOLTFsmartsave($args, $zone='') {
> global $smartPage;
> $p = $args['page'];
> if ($smartPage[$p] == '') set to BOLTloadpage($p);
> $smartPage[$p] = str_replace($args['in'], $args['out'], $smartPage[$p]);
> if ($args['commit'] == 'true') BOLTsavepage($p, $smartPage[$p]);
> }
>
> Not tested or anything. Didn't even check parameter order. But you get
> the idea. Use [(smartsave page= in= out=)] as many times as you like
> on the page, and then <(smartsave page= commit=true)> at the end.
>
> But you see the problem. If you some how get interrupted or the last
> commit is called, all your changes along the way get lost. Anyway, a
> simpler fix for the situation I think you are describing, no?
I don't know. Given that many of my Boltwire-written solutions using
forms often have to update several pages, and many session commands
are generated in templates making it difficult keeping track of order
of excecution, I'm often faced with sessions that abort halfway
through, leaving half-finished pages that need to be reverted or
deleted. With delayed disk writes, not only would the logic that leads
to the error go faster, we would also never have half completed tasks.
I like the all or nothing principle, it's more of a bonus than a
problem to me. Especially if we include a simple [session commit]
command for when you want to divide tasks.
Tell you what, assuming theres a Boltwire hook that gets executed
after the connection to the user is closed (useful for logging
purposes anyway), I can always make an extension for this myself. Show
you the awesomeness of my awesome suggestion of pure awesome. I love
that firefox accepts "awesomeness" as a word, but not "firefox".
It'll give me a reason to look at the savepage code again, and suggest
a way to separate the content changing-and-storing code (anchors,
empty variable-cache(s) for that page) from the storage/commit code
(disk write), which would make writing plugins much simpler. Not to
mention elucidate where and why I would need hooks to make the
mysql_backend truly formidable: I've been learning a few myslq
'tricks' (basic database usage). Oh, and the idea of seperating data
and content into different caches. Once done, I think I could expand
the "folder" functionality to choose not only disk location, but
storage method altogether (which is entirely neccesary in order to
have a Boltwire-configurable mysql_backend ... Lacking a BOLT
$plugin_onInstall() hook, called before the plugin is commit to
site.config or wherever, allowing the plugin to block the installation
if it isn't installed properly...) on the format:
*: pages/
main*: mysql:
test*: test/
... There are some really nifty things one could do with that kind of
extendability. Quite apart from tidying up the engine code, which is
it's own reward.
I like this brainstorming thread. I'm going to let it go for a few
days, then summarize what suggestions are good for plugins, and what I
hope will be put into Boltwire. See what happens. :)
>
> Cheers,
> Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---