Solved

creating an activity stream using mysql and html

Posted on 2013-01-20
9
1,336 Views
Last Modified: 2013-01-25
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
Comment
Question by:Evan Cutler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 26

Expert Comment

by:EddieShipman
ID: 38801168
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
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38802236
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
 
LVL 9

Author Comment

by:Evan Cutler
ID: 38802359
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!

 
LVL 26

Expert Comment

by:EddieShipman
ID: 38802790
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
 
LVL 9

Author Comment

by:Evan Cutler
ID: 38802866
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
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38803041
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
 
LVL 9

Author Comment

by:Evan Cutler
ID: 38803130
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
 
LVL 26

Accepted Solution

by:
EddieShipman earned 500 total points
ID: 38803139
0
 
LVL 9

Author Closing Comment

by:Evan Cutler
ID: 38819869
These got me started...thanks.
my next question is data model development for activity streaming.

Evan
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question