Author Static Field. Implementation plan
  • Hi guys!

    Sava asked me to prepare implementation plan where I should describe GUI
    solutions, code design, database changes. So, you can see it's below.

    GUI solutions
    Here http://forum.sourcefabric.org/index.php/t/2956/ are mockups which were
    prepared to describe all logical screen which should be implemented for this
    solution. For implementing all templates I want to use base Campsite
    stylesheets.
    YUI compoments which I want to try: TabView (to organize manage author
    fieldset), AutoComplete (for author field in article). Other: tinymce (for
    author's biography), jscalendar (for dates). Can I use prototype for basic
    DOM manipulations (I saw it in repository)?

    Code design
    I create directory "admin-files/authors" and put there next files (like I
    saw it in topics):
    - do_del.php (it should provide ability to removing authors)
    - do_edit.php (AJAX action for applying of changes)
    - do_add.php (creating new authors)
    - index.php (list of authors and tabbed edit list)
    - authors_common.php (initialization)
    I not sure, but possible I need to prepare separately actions for biography
    and change photo.
    In Authors class I'll introduce necessary setters & getters methods.


    Database changes

    New fields in Authors:
    - language_id
    - biography (text)
    - skype
    - jabber
    - aim

    author2author_alias
    - fk_author_id
    - fk_language_id
    - fk_author_alias_id

    author_alias
    - id
    - language_id
    - name

    author2author_type
    - fk_author_id
    - fk_language_id
    - fk_author_type_id

    author_type
    - id
    - language_id
    - name

    author_social_network
    - id
    - author_id
    - network
    - account

    --
    Best Regards, Alexander Kovel

  • 4 Comments sorted by
  • Hi Alexander,

    > GUI solutions
    > Here http://forum.sourcefabric.org/index.php/t/2956/ are mockups which were
    > prepared to describe all logical screen which should be implemented for this
    > solution. For implementing all templates I want to use base Campsite
    > stylesheets.

    Good.

    > YUI compoments which I want to try: TabView (to organize manage author
    > fieldset), AutoComplete (for author field in article). Other: tinymce (for
    > author's biography), jscalendar (for dates). Can I use prototype for basic
    > DOM manipulations (I saw it in repository)?

    You may want to use yui datatable+paginator component for the authors list.
    Please use yui as much as possible, do not go with prototype, it is
    there for a feature which is no widely used and we will replace it
    further. If need some help just ask.

    > Code design
    > I create directory "admin-files/authors" and put there next files (like I
    > saw it in topics):
    > - do_del.php (it should provide ability to removing authors)
    > - do_edit.php (AJAX action for applying of changes)
    > - do_add.php (creating new authors)
    > - index.php (list of authors and tabbed edit list)
    > - authors_common.php (initialization)
    > I not sure, but possible I need to prepare separately actions for biography
    > and change photo.

    Good.

    > In Authors class I'll introduce necessary setters & getters methods.

    Good.

    > Database changes
    >

    Looks ok to me, a question, what are exactly author aliases?

    Thank you for the update.

    Best,


    --
    Holman Romero
    Senior Software Engineer, Sourcefabric

    holman.romero@sourcefabric.org

    http://www.sourcefabric.org
  • Vote Up0Vote Down Sava TatićSava Tatić
    Posts: 113Member, Administrator, Sourcefabric Team
    On Wednesday, May 19, 2010 15:39:22 Holman wrote:
    > Looks ok to me, a question, what are exactly author aliases?

    As in:
    Name: Neftalí Ricardo Reyes Basoalto
    Alias: Pablo Neruda

    Name: Charles Michael Kittridge Thompson IV
    Alias 1: Black Francis
    Alias 2: Frank Black
  • Vote Up0Vote Down Mugur RusMugur Rus
    Posts: 132Member
    "New fields in Authors:
    - language_id
    - biography (text)
    - skype
    - jabber
    - aim"
    As I see in this screen the author can write in multiple languages:
    http://forum.sourcefabric.org/index.php/fa/6/

    The language identifier should be in a separate table. It also make sense to
    have the biography in multiple languages.

    Please also use the fk_ prefix wherever you use any foreign key. E.g.:
    fk_language_id instead of language_id

    I see no reason to have two tables for author aliases:
    author2author_alias
    - fk_author_id
    - fk_language_id
    - fk_author_alias_id

    author_alias
    - id
    - language_id
    - name

    It's over-engineered, makes the queries slower and has no advantage over
    using a single table:
    author_aliases
    - fk_author_id
    - fk_language_id
    - alias or alias_name

    Mugur Rus
    Senior Software Developer, Sourcefabric
    mugur.rus@sourcefabric.org

    Cluj-Napoca, Romania
    +40 (0)720 528408
    Skype: mugur_rus

    http://www.sourcefabric.org
    http://www.twitter.com/Sourcefabric


    On Tue, May 18, 2010 at 12:18 PM, Alexander Kovel <
    campsite-dev@lists.sourcefabric.org> wrote:

    > Hi guys!
    >
    > Sava asked me to prepare implementation plan where I should describe GUI
    > solutions, code design, database changes. So, you can see it's below.
    >
    > GUI solutions
    > Here http://forum.sourcefabric.org/index.php/t/2956/ are mockups which
    > were
    > prepared to describe all logical screen which should be implemented for
    > this
    > solution. For implementing all templates I want to use base Campsite
    > stylesheets.
    > YUI compoments which I want to try: TabView (to organize manage author
    > fieldset), AutoComplete (for author field in article). Other: tinymce (for
    > author's biography), jscalendar (for dates). Can I use prototype for basic
    > DOM manipulations (I saw it in repository)?
    >
    > Code design
    > I create directory "admin-files/authors" and put there next files (like I
    > saw it in topics):
    > - do_del.php (it should provide ability to removing authors)
    > - do_edit.php (AJAX action for applying of changes)
    > - do_add.php (creating new authors)
    > - index.php (list of authors and tabbed edit list)
    > - authors_common.php (initialization)
    > I not sure, but possible I need to prepare separately actions for biography
    > and change photo.
    > In Authors class I'll introduce necessary setters & getters methods.
    >
    >
    > Database changes
    >
    > New fields in Authors:
    > - language_id
    > - biography (text)
    > - skype
    > - jabber
    > - aim
    >
    > author2author_alias
    > - fk_author_id
    > - fk_language_id
    > - fk_author_alias_id
    >
    > author_alias
    > - id
    > - language_id
    > - name
    >
    > author2author_type
    > - fk_author_id
    > - fk_language_id
    > - fk_author_type_id
    >
    > author_type
    > - id
    > - language_id
    > - name
    >
    > author_social_network
    > - id
    > - author_id
    > - network
    > - account
    >
    > --
    > Best Regards, Alexander Kovel
    >
    >
    >

  • Thanks guys for your notes. I'll take them.

    Mugur Rus wrote on Wed, 19 May 2010 19:11
    "New fields in Authors:
    - language_id
    - biography (text)
    - skype
    - jabber
    - aim"
    As I see in this screen the author can write in multiple languages:
    http://forum.sourcefabric.org/index.php/fa/6/

    The language identifier should be in a separate table. It also make sense to
    have the biography in multiple languages.

    Please also use the fk_ prefix wherever you use any foreign key. E.g.:
    fk_language_id instead of language_id

    I see no reason to have two tables for author aliases:
    author2author_alias
    - fk_author_id
    - fk_language_id
    - fk_author_alias_id

    author_alias
    - id
    - language_id
    - name

    It's over-engineered, makes the queries slower and has no advantage over
    using a single table:
    author_aliases
    - fk_author_id
    - fk_language_id
    - alias or alias_name

    Mugur Rus
    Senior Software Developer, Sourcefabric
    mugur.rus@sourcefabric.org[/email]

    Cluj-Napoca, Romania
    +40 (0)720 528408
    Skype: mugur_rus

    http://www.sourcefabric.org
    http://www.twitter.com/Sourcefabric


    On Tue, May 18, 2010 at 12:18 PM, Alexander Kovel <
    campsite-dev@lists.sourcefabric.org[/email]> wrote:

    > Hi guys!
    >
    > Sava asked me to prepare implementation plan where I should describe GUI
    > solutions, code design, database changes. So, you can see it's below.
    >
    > GUI solutions
    > Here http://forum.sourcefabric.org/index.php/t/2956/ are mockups which
    > were
    > prepared to describe all logical screen which should be implemented for
    > this
    > solution. For implementing all templates I want to use base Campsite
    > stylesheets.
    > YUI compoments which I want to try: TabView (to organize manage author
    > fieldset), AutoComplete (for author field in article). Other: tinymce (for
    > author's biography), jscalendar (for dates). Can I use prototype for basic
    > DOM manipulations (I saw it in repository)?
    >
    > Code design
    > I create directory "admin-files/authors" and put there next files (like I
    > saw it in topics):
    > - do_del.php (it should provide ability to removing authors)
    > - do_edit.php (AJAX action for applying of changes)
    > - do_add.php (creating new authors)
    > - index.php (list of authors and tabbed edit list)
    > - authors_common.php (initialization)
    > I not sure, but possible I need to prepare separately actions for biography
    > and change photo.
    > In Authors class I'll introduce necessary setters & getters methods.
    >
    >
    > Database changes
    >
    > New fields in Authors:
    > - language_id
    > - biography (text)
    > - skype
    > - jabber
    > - aim
    >
    > author2author_alias
    > - fk_author_id
    > - fk_language_id
    > - fk_author_alias_id
    >
    > author_alias
    > - id
    > - language_id
    > - name
    >
    > author2author_type
    > - fk_author_id
    > - fk_language_id
    > - fk_author_type_id
    >
    > author_type
    > - id
    > - language_id
    > - name
    >
    > author_social_network
    > - id
    > - author_id
    > - network
    > - account
    >
    > --
    > Best Regards, Alexander Kovel
    >
    >
    >