How to manage use content on website - php

so I have recently gained some interest in how websites work. I am trying to learn how websites such as facebook and twitter manage their user contents. I have tried looking on google but my lack of correct terminology makes it harder for me to find anything useful. So can someone suggest me a book/good read/video/article that would explain me how these things work? I have basic knowledge of database and some web developing terminology.
what I want to know is, how websites store user posts on the database and how you can store comments and other related stuff to the post.
Also whats the correct term for this type of websites? So i can do some more research on this.
Thanks in advance.

Learning about designing relational databases will help you understand how posts and comments are stored in a database and how to relate comments to posts, etc.
Learning about web development will help you understand how websites can use server-side languages like Python or PHP to retrieve and store data from the database and present it as a website.
My favorite book for beginning PHP web development was "PHP and MySQL Web Development" by Luke Welling and Laura Thomson
The best book I found for learning about databases was "Inside Relational Databases with Examples in Access".

Related

Create and Search user posts in PHP

This is my first entry into backend development, taking mostly a design role in past projects. Im working on a personal project and have fleshed out what I feel is a logic of sorts. Just a few very basic user tasks broken down.
Core User Actions:
A user can create a new posting
A user can find posts from other users by tag, date created, and
other content. This is done in kinda a central search area. (Search
string: "Dog Saddle", retrieves posts with mentions of dog saddels,
dogs, and saddels)
A post's creator can be contacted from the post.
A user can delete their created posts.
I need guidance/suggestions with the following:
What data should I capture for users?
What framework is best for the application dynamics I've described? (ROR, Python, PHP ect. I'm a one man team currently)
Are there open source projects I may gain reference from?
I'm very dedicated to learning on my own, and can make use of good advice!
Thanks,
Given the rather generic requirements you've outlined and that you are just entering into the development arena, you should try an established framework. That way you won't need to write everything from scratch. You'll still have plenty of control, but the benefits of many commonly used functions, classes etc that will speed up your development.
Give something like CodeIgniter for PHP a try. See http://codeigniter.com/. There are a lot of tutorials online to help you get started. For example, see http://net.tutsplus.com/sessions/codeigniter-from-scratch/.
What you've described doesn't suggest a particular language at all. ROR, Python, PHP--you could use any of those to create what you've described. PHP is considered by many to have a less steep learning curve than ROR and Python, which is why I recommended it. However, there are frameworks for these other languages as well that will give you the same benefits as code igniter.

Want to create a Question/ Answer site, So what should I read to build such a site?

I am new to website building and want to create a site which have following features:
People should be able to post new questions.
Should be able to comment on the already provided questions (Providing Answer is equal to providing comments.)
Should be able to categorize various questions.
I am planning to go on Open source side: Using PHP/APACHE/MYSQL/LINUX.
I am not sure what all things i should read Like CMS (Drupal/Joomla etc.)
Can anyone help me?
It's impossible to answer all your questions in one answer.
If you're really new to php, I doub't you should dive in a CMS.
I recomend you to split-up your questions in to smaller ones and start googling and coding.
People should ble able to post
Choosing a database?
Adding entries to a table?
Registering users?
Commenting
Again, adding to database
Retreiving from database
Displaying results
Categories
Database architecture
Normalazing database
Again, adding and retreivieng from database
..and so on.
This would be ok if you're doing it for practice, not for real life product.
If you're looking for a quality product, you should go for a cms.
There are several open-source packages you could use. Or you could go over to http://area51.stackexchange.com/ and see if any of the 566 sites in development would do what you want.
Some open-source question-and-answer packages:
OSQA - http://www.osqa.net/ (Django / Python)
AskBot - http://askbot.org/ (Django / Python)
Shapado - http://shapado.com/ (Ruby/Rails)
Question2Answer - (see that dot org)- (PHP)
OSQA is open source stackoverflow.com clone, running on Django and Python
http://www.osqa.net/
(just replace one P in your LAMP stack with another P :)
If you are just trying to have a forum in PHP for question/answer, I recommend you take a look at phpBB. You may also take a look at http://en.wikipedia.org/wiki/Comparison_of_Internet_forum_software_(PHP)

any suggestions for getting the data for the web portal?

I have launched a new Movie Based web portal, I have completed the programming part and Made the site dynamic.
My Question, How can i get the data about the Movies from different languages
For example: www.imdb.com has a huge database collection.
Is there any web crwaling methodology where we can get it?
Or dirty method of Complete Data entry work?
The legal approach is to subscribe to IMDB's web services, which sound pretty comprehensive but cost $15,000 and up.
Another possible datasource that looks free is the Netflix API.
I'm not going to give you any advice about screen-scraping, both because it will make your life miserable, and because it's almost certainly a violation of copyright laws.
Blockbuster's website has some RSS feeds you can scrape, which will contain links to data pages that may or may not be easily scraped as well.

What is the most extensive PHP/MySQL combo book?

I know this isn't a directly programming related question but I need some help in deciding which book to buy. I usually never buy books, instead I download instructional videos and ebooks from file sharing sites. But I want to buy one big fat book now that I can read on the subways to and from work.
So for MASTERING php/mysql which book has helped you the most and you would recommend above all others.
I don't know how much experience you have with PHP/MYSQL, but the two main books that I have used to master PHP are Head First: PHP/MYSQL, which uses a really interesting graphical teaching method, and Advanced PHP Programming by George Schlossnagle. Those are really the only two books you need to get up and running with PHP. Read up on all of the content that is pre-built in PHP by using PHP.net. Other than that, just code a lot. The best way to master PHP is through experience.
Head First PHP/Mysql --very good book that gets you on the right track.
PHP and MySQL Web Development 4th Edition --covers everything of php/mysql that a beginner needs to know. EDIT: This book is better off as a reference then a "learning" book because it covers a lot but not in depth.
AFTER you have learned all of procedural PHP, consider moving to a framework.
I've looked through a lot of books after just getting in and working on things for about a year. None has been as useful as actually getting in, trying things out, and asking advice of people with more experience.
As such, I recommend Google and StackOverflow.

Q & A site similar to stackoverflow in PHP

I am developing a Q & A Site for my students. I find stackoverflow an amazing example and would like to have something similar(if not this feature rich) for my course.
I am a sytem programmer not much familiar with web-application development. How do I begin. Database scheme, features, AJAXness etc. Can I get some existing codebase I can build on top of? Something opensource?
Language of choice is PHP. Any pointers are welcome.
Thank you in advance.
Edited: Added info
It would be reasonably trivial to create something similar as a learning exercise, but the real value behind the stackoverflow site is the polish, attention to detail and vision that's gone into the site and associated branding/marketing, etc.
Irrespective, you'll probably find that you get more answers if you do the ground work yourself and then post questions for any specific architecture/design/implementation issues you get stuck on.
It shouldn't be hard to replicate using PHP/MySQL. It's not a very complicated site. plan out how you want all of the tables/classes to be laid out (Questions, Answers, Users, Tags,Rep,Badges,etc.) and start coding.
Is there any particular part that you are confused about or looking for advice about?

Categories