How to integrate a new functionality?

Sep 30, 2009 at 7:59 AM

I need to integrate rating system to the Kigg. I don't know wh.ere to start or how to. I don't know the structure because I am new to Unity Framework and Kigg framework. If someone could help me with this, I would really appreciated.


Thank you in advanced.

Oct 1, 2009 at 11:54 AM


I may help

Do you want to add a rate to each pusblished story?

Who will rate this?

Oct 1, 2009 at 7:11 PM

Yes and each user will rate when they view the story.


Oct 1, 2009 at 7:15 PM

Also the user who is publishing the story.

Each user could rate it only once.

Oct 2, 2009 at 12:03 PM

I would start by adding

- to the story class :

  • an INT rate parameter
    This parameter will hold the rate for each story

- to the user classs

  • a LIST<Story> ratedStories parameter
    This parameter will hold the list of stories rated by a given user
  • A method we can call RateStory( guid storyId)
    This method will rate a given story according to your logic

You'll need also to add a column Rate to the story table and create another table User_Rates with three columns ( UserId, StoryId, Rate)
Afterwards, You'll need to create a new repository class to access this table
You'lle need also to create an event that when a user rates a story, the whole rate for the story is recalculed

I am also very interested by this subject and I don't know how to communicate to go further on it
Maybe other people are also interested and we can include it to the project itself




Oct 2, 2009 at 5:13 PM

Thank you for the instructions. I will start working on it today. I can give my Skype username so that, everyone could communicate through that and we can join all to participate and ask questions. Let me know what you think.



Oct 3, 2009 at 7:13 AM

Not problem for me (you can email me you skype ID).
A story has a notion of Vote.
I am wondering if this is not very close to what you want to achieve.
Before going further, I would maybe duplicate this notion of Vote ( renaming it to Rate).
We will see later how to changer the business rules


Oct 3, 2009 at 10:15 PM

Well, to me Vote and rating is two different things. You vote about something if it is good or not but Rate is the level of the Vote. Something is 75% is liked or %1000 or ....

So, Vote is to general, and Rate is more detailed. Both should stay as different measurements. Rate should have it's own class to it.


Let me know what you think.

Oct 4, 2009 at 6:11 AM

Do agree. Voting and Rating are two different concepts

I was talking about their code implementation
they should be very close.
That's why I suggested duplicating Voting code

Oct 6, 2009 at 2:55 AM

I see what you are saying. I will take a look at the code on the voting and try to duplicate it.

Did you get my email about my skype ID?


Oct 6, 2009 at 3:08 AM

is Kigg.Infrastructure.EF->DomainObjects->Generated: Models.cs create automatically?

So, if I create a IRate and Rate, StoreRate class and interfaces, how the Models.cs will generate it. Am I going to implemented in the Models or it is generated by a command line or something? Please advice.

Oct 6, 2009 at 8:18 PM
Edited Oct 6, 2009 at 8:20 PM

I got your email with the SkypeID and I answered it
I am not using EF but Linq2Sql
I am quite sure Moses who is very active in this forum can help with any question related to EF
He is the author of this part of the code
To update the model from the database, I am using Huagati DBML/EDMX Tools from here
You can download an evaluation version and update your model with it

I am more than happy with this tool


Oct 9, 2009 at 5:22 AM

I need to how EF files are beign generated. I see some files under the App_Data folder and I don't see any EDMX file. So, I need to know which tool is used to generate.

I need to add my own table to add the rate functionality.


Please, help needed. If someone could tell me the process how to add the new table to EF, that would be gread. Thanks to nachid, I know how to do this in Linq to SQL (which I still need to finish it up), I still need this process in EF. That's the database model I am using.


Thanks in advance.