Hi,

Alexey - as Stephan notes, the hash is based on the set of parameters to
#subobject, which means that if you even change one value the hash will (I
think) change. Which means that linking/referencing a specific subobject
based on its hash is not that good of a long-term strategy, I don't think.
Though I find it strange to do that kind of thing in the first place,
anyway - if something is going to be linked to/discussed directly, as
opposed to just aggregated, I would think it should have a true name. But I
don't know what the data you're talking about is.

Jamie - your usage sounds interesting, but I think not relevant to this
discussion, since you don't need to sort based on entry order.

Stephan - you make some good points. As far as displaying the number/index
in queries - that sounds interesting, though even a separate "Has index"
property might not necessarily be ideal for that. If you have two or more
different kinds of #subobject calls on a page, it might not work out
nicely. For instance, a recipe page might have subobjects for ingredients,
and then subobjects for instructions. In that case, the ingredients might
have "Has index" values of 1-10, and then the instructions might have "Has
index" values of 11-15. (That's how numbering used to work in SIO.) So
displaying this property might just look weird.

Your second point is that the hash system lets SMW only display unique
subobjects. Which is true, but (a) in my experience that's not a major
issue, and (b) actually, sometimes you really do want to store duplicate
data. What if you have a page of test scores, and you use #subobject to
store each student's name and their score, and two students happen to have
the same name and the same score? (Let's say that there aren't wiki pages
for each student, which would force you to disambiguate.) Duplicate data
might not be an error - it might be valid data.

You seem to also make the point that, because it hasn't been entered by a
user, the index/number isn't truly a part of the data model, and shouldn't
be stored at all. Assuming you are in fact making that point, it's a
reasonable opinion, but I disagree, for two reasons: (1) the order of
elements is something that users can control, and thus, it is actually
implicitly part of the data model, and (2) SMW already stores a bunch of
stuff that's even less a part of the data model: the "Modification date"
property, etc. You could say that two wrongs don't make a right (to use an
expression), but at the very least, this wouldn't be breaking anything
that's not already broken. Again, though, I'm not sure if that's what you
were getting at.

-Yaron

On Thu, Jun 20, 2013 at 12:37 PM, Stephan Gambke <s7ep...@gmail.com> wrote:

> Hi Yaron,
>
> I do not think that your approach will work.
>
> At a first glance it seems to be an easy way out to provide sorting.
>
> But from a software engineering point of view it loads the identifier with
> information that just does not belong there. From a practical point of view
> it falls short if anybody wants to query that number. And finally from a
> semantic point of view it inseparably mixes two statements (the original
> one and the one about the sequence number) that the originator usually does
> not want to be mixed.
>
> This last problem btw is also the key to your question about the
> determination of the hash key. To state the same thing twice is just that:
> A duplicate statement. As opposed to two statements. To my best knowledge
> SMW will not store such a statement twice. Instead it will generate the
> hash key based on the property and value and if that hash already exists,
> then the statement it represents is considered already known and the second
> occurrence will be dropped and not appear in any query results. I am not
> sure if this is also true for subjects, but it really should be.
>
> So, long story short: If your data model for project management does not
> explicitly contain the sequence number for the activities, then your model
> is incomplete, not SMW. In fact, should two activities be exactly the same,
> you will probably lose one of them.
>
> Cheers,
> Stephan
> On Jun 20, 2013 5:30 PM, "Yaron Koren" <ya...@wikiworks.com> wrote:
>
>> Hi Alexey,
>>
>> Yes, that's a good point - I actually thought about an approach like
>> that, but forgot to include it in the email. A property called "Sort" (a
>> name like "Has index" might be a little clearer) would solve this problem -
>> and it would be a more "semantic" solution. On the other hand, it would add
>> to the proliferation of special properties (for what that's worth), and it
>> would mean a little more work for administrators to get queries of
>> subobjects ordered correctly.
>>
>> I still think my original proposed solution would work fine, though I
>> confess I don't quite understand how the subobject hashing works. Are
>> people supposed to be able to directly link to or reference a subobject,
>> using the hash? I don't see how that could work, given that everything
>> about a subobject could change from one page save to the next - its order,
>> its properties, etc. I don't see how the system could keep consistency of
>> subobject naming.
>>
>> -Yaron
>>
>> On Thu, Jun 20, 2013 at 10:54 AM, Alexey Klimovich <god.vedm...@gmail.com
>> > wrote:
>>
>>> Hi, Yaron!
>>>
>>> I think subobjects sorting is good task, but i suggest not to use
>>> subobjects
>>> name for this because of big problem with that:
>>>
>>> imagine we have 3 subobjects on page:
>>>
>>> Page name#001_4bd1f1b74a76de5322dd74956a71f089
>>> Page name#002_03163dfd1d2502668b00c1f521688984
>>> Page name#003_02dwa3j349j8d3jds3843234jd8349490
>>>
>>> now, we edit page, delete subobject 002. What should happen?
>>> Should other subobjects be renamed to keep sorting? What if they already
>>> linked from other pages/queries?
>>>
>>> I think better way is to automaticaly attach some semantic property
>>> ("Sort"
>>> for example)
>>> to every subobject on page. This property should contain subobjects
>>> number
>>> on page.
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://wikimedia.7.x6.nabble.com/Making-subobjects-correctly-ordered-tp5007553p5007558.html
>>> Sent from the Semantic Mediawiki - Development mailing list archive at
>>> Nabble.com.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.net email is sponsored by Windows:
>>>
>>> Build for Windows Store.
>>>
>>> http://p.sf.net/sfu/windows-dev2dev
>>> _______________________________________________
>>> Semediawiki-devel mailing list
>>> Semediawiki-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>>>
>>
>>
>>
>> --
>> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>>
>> Build for Windows Store.
>>
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> Semediawiki-devel mailing list
>> Semediawiki-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>>
>>


-- 
WikiWorks · MediaWiki Consulting · http://wikiworks.com
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to