Whittie
Member
Registered: 11th Aug 06
Location: North Wales Drives: BMW, Corsa & Fiat
User status: Offline
|
Right,
I've just started out learning Php / Javascript, and think the best way to learn things is if you do a project. After looking online, it seems that most people's first project is a calandar, where you input dates online into the database etc.
How easy would it be to make a similar site to Tinyurl? Is it a little too ambitious from my point of view? The concept seems so easy!
I'm wanting to start from scratch, and then put the site online. Getting it up google ranks using seo. (It's only for a learning point of view though.)
For those of you that are a dab hand with php and javascript, what would be a first decent project, where I see how things work and what to learn?
Thanks for any help and sorry if i've been a little vauge.
[Edited on 09-01-2010 by Whittie]
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
Tinyurl is a pretty simple concept and wouldn't take you too long to knock something up that's similar. The basics are - you take a URL (no doubt check to see if it's a live site), create a random short url (php random function etc), check DB if random short url already exists and if not then insert new record (short url against real url), then your main page checks short url against the DB and forwards you on to the site (using header location most likely).
Probably a weekend task to get the basics going if you're starting out.
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
Something like TinyURL would be a nice project because you get a chance to do all the cool stuff like PHP, some AJAX and then you'll need to use MOD_REWRITE. There are plenty of tutorials on the web to do the PHP MySQL database stuff. I'd recommend you use Scriptaculous JS library as you've got the one library for effects and the Prototype library for AJAX. MOD_REWRITE url rewriting for your application would be relatively simple too.
|
xa0s
Banned
Registered: 4th Mar 08
Location: Dartford, Kent Car: Turbo'd Fabia vRS
User status: Offline
|
I was on PHP's site just looking through their starter tutorial, just messing around with $_GET and $_POST as well as getting used to the syntax. Creating loops that loop to 10,000, etc... The usual.
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
That's one of the best things about PHP. The manual is online for free, plus anything you want to do, somone has already written it
|
noshua
Member
Registered: 19th Nov 08
User status: Offline
|
In regards to Javascript, http://www.w3schools.com/js/default.asp
We went over all the basic commands then was set a series of tasks - one of the most painful but EASIEST thing ever once you figure out how to do it was;
write a program that has an input box prompting the user to enter their name, the document will then write the users name in a 5x5 block (per letter).
loops, if /else/elseif statements and arrays are useful.
|
Whittie
Member
Registered: 11th Aug 06
Location: North Wales Drives: BMW, Corsa & Fiat
User status: Offline
|
It's actually quite easy to learn! Just annoying when you don't know what's what!
Thanks for the help though.
Been mainly using some books from pc world, and w3 online.
|
noshua
Member
Registered: 19th Nov 08
User status: Offline
|
Books can be quite helpful as they're set out in a way that helps you learn the language easier, as all as having exercises set at the end of each 'chapter' and what not. BUT as a lecturer at my University said, once they're published they're out of date.
|