> I think these two are the same question. I think there needs to be *one*
> place that defines what a legal TopicName is. I think it should be the
> TopicName class. After all, if TopicName won't take it, then no one else
> should.
>

The one thing that we'll need to watch out for is the case where we
have to preserve a topic name that is otherwise invalid. This will
bite us in the case of allowing users to edit "bad" 1.8 topics and
also if we get fancy with error handling where we preserve the topic
name for the user to allow them to fix it more interactively. I guess
that we'll need to make the validation a "passive" occurrence where
there is a IsValid property or something and still allow trash names
to get set. This isn't as clean, but I think that back-compat will be
easier this way.

> Obviously, the question "what constitutes a legal TopicName?" is different
> from the question of "what does the Formatter turn into a hyperlink?" So
> from that standpoint I think two pieces of code are warranted. Probably the
> Formatter shouldn't create a link to a topic with an illegal name, so one
> piece of code will likely use the other.
>

So, the first question remains... What is a legal Topic Name? Right
now TopicName doesn't restrict it... the DiskStore hurls on certain
names... the Formatter fails to recognize others... And to boot we
have no idea what happens to work because people have been cruising
along in 1.8 without any of these concepts. The Formatter recognizes a
nasty regex expression that I tried to dissect once but gave up on.
I'd say that a good start would be to use the Formatter's regex and
add exclusions of things that we know make the DiskStore unhappy. I'd
also guess that ".." should be added as illegal.  I don't know about
single "." It causes problems now because everything is coded to
assume that everything to the left of the first "." is a namespace and
the rest is the topic. I don't know how we'd allow "." in topics
without ensuring which they meant.

> > 3) What do we want the behavior to be when the user tries to create an
> > topic with an invalid name. <-It currently takes the user to the edit
> > page with the topic text forced to "this is a bad name" and no save
> > button displayed.
>
> That seems reasonable. It might be nicer to put it in a tooltip, though,
> just to save someone the clickthrough.
>

I just saw how that the security stuff does this. I'll look into replicating it.

> So, the question of what a "missing" namespace is has one subtlety: there's
> no way to tell the difference between a namespace that doesn't exist and one
> you have no read access to. That's by design. But I think in general the
> answer to your question is "yes, there is a difference". I'm not sure I can
> quantify it, but it seems to me that trying to create a topic with a valid
> name in a nonexistent namespace is somehow different from trying to create a
> topic with an invalid name in an existing namespace. But maybe the fact that
> I can't tell you what the difference is indicates that there really isn't
> one.
>
>
I believe that the user should not know that there is a difference,
but that the code should. I'm not sure that this is possible given the
model and architecture, but that's what I'd try for, given a chance.

Anyway, I think that the first thing to nail down is what is a legal
topic name moving forward.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flexwiki-users mailing list
Flexwiki-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flexwiki-users

Reply via email to