• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1410
  • Last Modified:

creating an activity stream using mysql and html

Greetings,

I am trying to create an activity stream using mysql and html.
now, I assume that I would have a sql statement to pull the information from a database...

Now, I have four roles in this application. One of the roles monitors the activity of another, and the last two are independent.

That being said, I already understand that I would need a different SQL logic for each one, however the output dataset would be identical for each one.

How should I approach the relationship with the database?  I have a MVC framework (Laravel) that I'm using to employ PHP.

 Should I build the SQL in the business logic and send to the SQL to the database?  Or should I use a stored procedure at the database end?

I am going to make this stream ajax, so I can prepend the <UL> with more activities if more enters the database.  I also intend to only grab a days' worth of data, and do the "click for more" and append to the end of the <UL>.  Kinda like facebook.

THe reason for this is how I could maintain movement of data as the activity grows.

Thanks.
0
Evan Cutler
Asked:
Evan Cutler
  • 4
  • 3
  • 2
1 Solution
 
Eddie ShipmanAll-around developerCommented:
It would be better if you don't assume that everyone knows what an activity stream is and better explain what it is you want. Your request is extremely vague for a general question asking about what technique to use.
0
 
COBOLdinosaurCommented:
Yeah if you give us specifics we might be able to understand what you are trying to do.  Showing us the code you are trying to get working would help.

Cd&
0
 
Evan CutlerAuthor Commented:
ok...let me back up here....
I need to create an activity stream.
I've been reading about creating activity streams, but having difficulties.

My original question was about creating the output dataset, because I have visit logs, but now I'm being asked about other activities as well.

so, to that effort my working theory was to query the logs to create the activity stream, however, I found myself with so many types of queries that the script would be 10,000 lines long.

I am now thinking of creating an activity table, with all activity, then query what I want, but I'm not still sure how to accomplish that.  I am looking at activitystrea.ms and some others for ideas.

Any wisdom on this would be awesome.
thanks for the time.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Eddie ShipmanAll-around developerCommented:
From wikipedia: "An activity stream is a list of recent activities performed by an individual, typically on a single website."

Is this what you are describing?
0
 
Evan CutlerAuthor Commented:
yes....it is...
similar to facebook.
I apologize for the quality of the questions.
I'm not sure I know the right questions to ask yet.

This is the first time I'm dealing with social networking activity.
0
 
COBOLdinosaurCommented:
The place you have to start is with database design. If activities center around individuals, then the id of the individuals needs to be the primary key of the table you drive from.  That table should only contain data about the individuals. Then build supporting tables for activites indexed on the individuals and either a sequence or timestamp.  The primary key can just be an auto increment value.

If there are interactions between activities then all you need is a cross table that associates the keys of the supporting tables.

That is pretty general, but the specifics are very dependent on the nature of the data.

Cd&
0
 
Evan CutlerAuthor Commented:
Thanks...I have logs in areas spanning the solution that I can use to create the activity.
My question is should I just push all activity to one table? and query the table? or do multiple queries from different tables and join them together?
0
 
Evan CutlerAuthor Commented:
These got me started...thanks.
my next question is data model development for activity streaming.

Evan
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now