Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Consider introducing histories to reduce data duplication #11

Closed
marcospassos opened this issue Jun 21, 2013 · 4 comments
Closed

Consider introducing histories to reduce data duplication #11

marcospassos opened this issue Jun 21, 2013 · 4 comments

Comments

@marcospassos
Copy link

Hello Stéphane,

First of all, congratulations, you have done a very good job!

As you probably know, Facebook introduced the Open Graph, and one of the coolest things are the histories . The good thing related to histories is the data duplication reduction and the ease updating information. Furthermore, configuring histories allow you define verb tenses that will be automatically updated according with dateStart and dateEnd properties. This is something that can be introduced in this amazing library.

@stephpy
Copy link
Owner

stephpy commented Jun 22, 2013

Hi, thank you ;)

I'm not sure to understand what the histories of facebook open graph does. Are you talking about grouping old actions as stephpy/timeline-bundle#90 ?

A history of action of a subject are already implemented (but without any grouping actions system).

Can you describe me what would be the feature on this bundle in some examples please ?

@Nemesisprime
Copy link

I think macro is suggesting a way to insert timeline actions in the past?

@marcospassos
Copy link
Author

Sorry, I wasn't clear. Yes, now seems that verbs aren't normalized. I'm suggesting something like this (already thinking in stephpy/timeline-bundle#90):

$verb = new Verb('control');
// Chuck Norris controls the world
// Chuck Norris and two other friends control the world
$verb->addTense(Verb::PRESENT_TENSE, new VerbTense(['singular' => 'controls', 'plural' => 'control'));
// Chuck Norris controlled the world
// Chuck Norris and two other friends controlled the world
$verb->addTense(Verb::PAST_TENSE, new VerbTense(['singular' => 'controlled', 'plural' => 'controlled'));
// Hey Chuck Norris, let's control the world!
$verb->addTense(Verb::IMPERATIVE_TENSE, new VerbTense(['singular' => 'control', 'plural' => 'control'));

// tense, subject count
echo $verb->getTense(Verb::PRESENT_TENSE); // prints controls
echo $verb->getTense(Verb::PRESENT_TENSE, 2); // prints control
echo $verb->getTense(Verb::PRESENT_TENSE, 5); // prints control

$actionManager = $this->get('spy_timeline.action_manager');
$subject = $actionManager->findOrCreateComponent('\User', 'chucknorris');
$action = $actionManager->create($subject, $verb, array('directComplement' => 'the world', 'tense' => Verb::PRESENT_TENSE);
$actionManager->updateAction($action);

// Let's assume that the toString is implemented
echo $action; // prints  "Chuck Norris controls the world"

@stephpy
Copy link
Owner

stephpy commented Jun 24, 2013

I think tense should be managed in views, you can add a component tense = present (as you did in $action = ...), but that's views which are able to know if it is singular/plural and the term to use (controls, controlled, etc...).

By this way, timeline already work with it ... without feature of stephpy/timeline-bundle#90

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants