Sat. Dec 7th, 2019

Host your Website

Read and learn

FatCow Web Hosting $1.00/mo* Trust your web hosting to the #1 web host provider, GoDaddy!

"Twitter Clone" Full-Stack Web Development project tutorial on LAMP (Linux, Apache, SQL, PHP)

3 min read



Ex-Google TechLead builds a full-stack web application for a Twitter prototype in less than 140 lines of code. Check out http://curiositystream.com/techlead for unlimited access to the world’s top documentaries and non­fiction series, and enter promo code ‘techlead’ for a free 30-day membership.

In this coding video, we create a “Twitter clone” using the classic LAMP web stack. The demo and source code are here: http://tweetdemo.com/

LAMP (Linux, Apache, MySql, PHP) has traditionally been a popular full-stack web-dev technique that powers many websites. It’s one of my favorite development techniques for quickly setting up a website. I’ve purposely kept this tutorial as simple as possible to show you how you can also set up your own complete website as simply as possible. From here, you can refactor code, bring in additional developer frameworks and libraries, scale out, and so forth, but this is a nice start to show you the foundations of web development. BTW, I also recommend upgrading to the latest PHP7 if you continue working on this stack for the latest features.

Note, that there are other popular techniques as well. Some people may prefer using Docker containers instead of the monolithic server here for better scalability (though it’s a more complex setup), or we could have used Amazon AWS, Google Cloud, or DigitalOcean for hosting instead of IBMCloud, and others might use entirely managed backends like Firebase or AWS Lambda. Python with Flask/Django or NodeJS or Go could have been used instead of PHP/Apache as the web backend framework, and PostgreSQL or MongoDB could be swapped in for MySql as the database. You could have also added a caching layer here using something like Memcached or Redis. Given more time, we could have used a CDN as well for faster image loads, added a load-balancer, or used database replication for scalability. (If you’re interested in systems design, I talk a lot about it in my program at http://techinterviewpro.com/.)

Let me know if you have any questions and I’ll be happy to answer them in the comments below.

Join me in my new coding interview training program here http://techinterviewpro.com/

And, join ex-Google/ex-Facebook engineers in 60+ whiteboard coding sessions at (20% off now, limited time): https://algopro.com/

» Get my free daily coding interview practice at http://dailyinterviewpro.com/

» Get 2 free stocks (up to $1000 value) by opening an account and depositing $100.
https://act.webull.com/kol-us/share.html?hl=en&inviteCode=S4oOH2yGOtHk

» Want to know what computer/camera gear I’m using?
http://amazon.com/shop/techlead

» Get Official TechLead t-shirt merch.
https://teespring.com/stores/techleadstore

» Check out TechLead: Season 1 here, my older private videos.
http://www.techseries.dev/season1

» Affiliate Program: Are you an influencer with 5000+ followers, or do you know someone? Join my affiliate program and share our coding interview prep series for 50% commission, I’d love to work with you. Drop me a line at [email protected] and I’ll get you set up.

» Party up:
http://instagram.com/techleadhd/
http://twitter.com/techleadhd/

27 thoughts on “"Twitter Clone" Full-Stack Web Development project tutorial on LAMP (Linux, Apache, SQL, PHP)

  1. People still use PHP and MYSql??? I hope they make it illegal . Looks like garbage syntax after being used to C# and .NET… or any other modern programming language.

  2. hahahaha that's not a Twitter clone… it's a bad nothing clone xD Mysql_connect instead of PDO? I should fire you and hire myself as TechLead <3 If it was just a joke, good one! * giving Promotion *

  3. Hi TechLead
    I am in my junior year and transferring to university. I am considering between two programs, both accredited online.The first is a Software Development program that goes over varies technologies, mainly Java and Android Development and a little C++. I don't feel it prepares me for one particular area, it kinda glosses over everything. The Web Development program is more focused. Which would you recommend for someone with no prior coding knowledge ? Any advice for a new coder would be greatly appreciated!!

  4. mysql_connect instead of PDO? Building SQL using string concatenation instead of using prepared statements? Is this a joke? Are you trolling, or intentionally trying to teach people poor practices?

  5. I'm learning JavaScript right now and I hope that someday I can become a full-stack web developer or a pro-programmer like you. Could you cheer me on?

Comments are closed.

Copyright © All rights reserved. | Newsphere by AF themes.