Open Side Menu Go to the Top
Register
Help a noob create a website tutorial Help a noob create a website tutorial

05-20-2013 , 07:45 PM
I have tons of freetime on my hands, and I want to spend it learning to code.

I have zero experience with programming, but I get (at least i think) the gist of how it is supposed to be done. I just spent 150 bucks at the bookstore buying all types of texts on programming. Javascript, PHP, MySQL, CSS, c++, and python.

I want to create a website with a database that will input and display information. If this goes accordingly, we may be creating a simple step by step tutorial that other people can learn from.

Being that I have zero experience, I'm going to move in steps.

1. Setting up a server.

??How do I go about setting up a server??
??Do I host it myself or do it online??
Help a noob create a website tutorial Quote
05-20-2013 , 07:55 PM
Ok, After doing some research, I found out that I can host it myself using apache.

So, i'm gonnna download it and just host from my laptop.
Help a noob create a website tutorial Quote
05-21-2013 , 06:24 AM
yes, running your own apache is perfect for learning / development. When you come to have a finished product for the world to see, then you can look in to purchasing hosting from one of many providers - serving an actual site to the world from your laptop will likely be more trouble than it's worth.
Help a noob create a website tutorial Quote
05-21-2013 , 01:43 PM
OK, I got an apache server running, and completed my first program. hello world...

I'm confused about how the site design is done. What is giving me a hard time is parsing the role of html from the role of php. Are they similar, synonymous or completely different tools?
Help a noob create a website tutorial Quote
05-21-2013 , 01:48 PM
The site is for my dad's business, btw. He manages staff by them clocking in and clocking out after the job is done, and has 20+ different sub contractors, so the plan is to have a database that keeps track of each one, and a display that my dad can easily read off of.
Help a noob create a website tutorial Quote
05-21-2013 , 02:25 PM
Quote:
Originally Posted by animas
OK, I got an apache server running, and completed my first program. hello world...

I'm confused about how the site design is done. What is giving me a hard time is parsing the role of html from the role of php. Are they similar, synonymous or completely different tools?
basically, the role of HTML (+CSS!) is it is code to tell the web browser what to display. On it's own, this HTML is generated by you typing it in to Noepad++ or whatever editor, then uploading it to the server. Whereas PHP is used to run code during the fetching of a page from the server, so it can manipulate the HTML, or send entirely different HTML depending on the code.

HTML + CSS: content and design
PHP: logic behind the content
Help a noob create a website tutorial Quote
05-22-2013 , 01:28 PM
thanks for the clarification, i'm gonna take a break from this task to learn some c++ coding. I'll bump this as soon as i'm comfortable coding, then i'll learn some html php.
Help a noob create a website tutorial Quote
05-23-2013 , 05:08 PM
Ok. i'm ready to start coding. To my untrained senses, I think the first order of business is to declare some variables.

Code:
 <?php
$mylocation;
$mytimein;
$mytimeout;
?>
NEXT STEP: coding these variables to interact with a database(MySQL)
there will be about 25 different locations, in which I want to keep track of the time started, and time clocked out.


any hints or links to good resources will be much appreciated.
Help a noob create a website tutorial Quote
05-23-2013 , 05:15 PM
Did you already configure your apache server? Also, do you understand the client-server dynamic? Furthermore, do you understand how the database interacts with everything?

It seems like you're just jumping in here. I suppose everyone learns differently and I most likely err on the side of over-preparing; but, you should make sure you at least understand the big picture ideas before you even start coding. Then, once you start coding, you should start with a narrow focus.

Edit- To clarify, I am not shooting down your idea to do this; I just think your approach will cause you to give up 25% of the way through and you'll get little out of it. Coming into it with a solid approach will greatly increase your chances of accomplishing a lot/getting the most out of this project.

Last edited by Go_Blue; 05-23-2013 at 05:30 PM.
Help a noob create a website tutorial Quote
05-23-2013 , 06:54 PM
Thanks for the feedback. My plan is to go to college in the near future, but semester's just started, and I want to do this to keep reprogram my brain, because I'm just coming off a two year long mental breakdown. My working memory just isn't the same after it, and I can only cogently think in small burts, so I figure taking it step by step is my best bet.

I have a book that can walk me through programming php, css, javasciprt, and mysql, but like I said my brain is only good for thinking in tiny burts, hence my step by step approach.

Quote:
Originally Posted by Go_Blue
Did you already configure your apache server? Also, do you understand the client-server dynamic? Furthermore, do you understand how the database interacts with everything?
I have the server setup, and i'm informed on how to save source code in the directory, and bring up the program in the browser.

I understand cursory of the client-server dynamic. Ie. that there is a front end, and a back end that needs programming.

The database i haven't gotten into yet, but i know that that is where information is stored, and that php will manipulate the database.

Quote:
It seems like you're just jumping in here. I suppose everyone learns differently and I most likely err on the side of over-preparing; but, you should make sure you at least understand the big picture ideas before you even start coding. Then, once you start coding, you should start with a narrow focus.
I am just jumping in, but I figure this will be a sort of easy web development to take on. Really only three variables, and then I will work on the data base configuration. Then the html to make it pretty.

Quote:
Edit- To clarify, I am not shooting down your idea to do this; I just think your approach will cause you to give up 25% of the way through and you'll get little out of it. Coming into it with a solid approach will greatly increase your chances of accomplishing a lot/getting the most out of this project.
No problem, and I understand completely how this seems like a way to just give up on, but I was thinking about taking some online courses through treehouse to keep me moving along.
Help a noob create a website tutorial Quote
05-24-2013 , 05:55 PM
So if you want to take the step by step approach and learn as you go, I would first start with understanding MySQL and database structuring principals. You need your database to pull information from in order for your php to really do anything.

The basis of all programming is solving problems. Usually by taking those problems and breaking them into smaller and smaller pieces until we have something that is manageable.

In the case of letting your father clock people in and out and storing that information in a way that we can retrieve it to make it easily manageable, is not necessarily a big problem but in order to get it going you will have to solve lots of small problems.

First your Database. - Databases work the best when they are set up the best. In your case, you probably want to have a table with faculty info in it. First Name / Last name / department / salary / or whatever that makes sense for you. Remember you should think of what kind of reporting is wanted later on. For instance seeing salaries for each department in other things. Now you probably want a table that references an employee and stores a timestamp and probably even a boolean field to store if the person is clocked in or clocked out.

Once all that is done you can take php and pull the data out of the database that you want and serve it to the browser.

You can then build some simple html to organize that data. And finally some css to style the organzied data.
Help a noob create a website tutorial Quote
05-24-2013 , 06:09 PM
I can teach you some ruby and rails if you want.

http://www.ruby-lang.org/en/documentation/quickstart/

Rails webframework built in ruby http://guides.rubyonrails.org/

https://www.heroku.com/ hosting your apps free, (developmnent version) without hassles of configuring servers for yourself..

also learn git for code version managment and much more..
http://git-scm.com/

A lot to learn...take it easy and step by step
Help a noob create a website tutorial Quote
05-25-2013 , 12:40 AM
Quote:
Originally Posted by pokahontas
I can teach you some ruby and rails if you want.

http://www.ruby-lang.org/en/documentation/quickstart/

Rails webframework built in ruby http://guides.rubyonrails.org/

https://www.heroku.com/ hosting your apps free, (developmnent version) without hassles of configuring servers for yourself..

also learn git for code version managment and much more..
http://git-scm.com/

A lot to learn...take it easy and step by step
You are awesome, thanks.

what i need to do is have a script that checks emails through google+. It only has to be a few variables, but I'm not quite sure which functions to use and how to go about implementing them. but i'll start reading the resources you link now, so we can be on the same page.
Help a noob create a website tutorial Quote
05-25-2013 , 12:59 AM
OK, so if i'm not misinterpreting, it seems like I will need to do a few tasks.

create a model -- location.
create a viewer that will display the infomation
create a controller that will manipulate data according to time

which one of these should I begin working on first?
Help a noob create a website tutorial Quote
05-25-2013 , 01:23 AM
It'll probably be easiest to start by generating a scaffold. Something like this will create everything for you to get you started.

Code:
rails generate scaffold Location name:string title:string content:text
You should probably just follow the tutorial here to get an idea of how rails works: http://guides.rubyonrails.org/getting_started.html
Help a noob create a website tutorial Quote
05-28-2013 , 01:55 PM
Quote:
Originally Posted by animas
OK, so if i'm not misinterpreting, it seems like I will need to do a few tasks.

create a model -- location.
create a viewer that will display the infomation
create a controller that will manipulate data according to time

which one of these should I begin working on first?
Ok, first things first. Do you use windows or linux ? I would advise you that you try linux, because most of the opensource world uses linux and most of the hosting providers use linux. Try ubuntu linux, download a live cd or usb so you don't have to install it on your system if you don't like it, but I would advise you that you install it and create a dual boot enviornment, so you can have linux and windows at the same time. Or you can download wmware and host linux inside your windows box... plethora of options

Then learn basic linux shell comands. Search google. Handling files from command line, unpacking, zipping, creating tarballs, moving folders ,files..etc

Learn how to use the rails program or "command".

I would advice you first go through a tutorial, before you make your own app. http://ruby.railstutorial.org/ This one is good.

About your question: Looks like you are already getting familliar with the MVC pattern that rails framework uses. http://en.wikipedia.org/wiki/Model%E...0%93controller But it doesn't really matter what you make first. I usually start with the model, so I can play with the model in rails console.

The command "rails c" runs the console and you can create, delete, update models by hand..

Say you have a model Person that has attributes :name and :surname. You can do something like

Person.create(name: 'Phil', surname: 'Ivey')

to insert a new record into your database. It's good for testing at first.

Just take it easy, go step by step. It wouldn't hurt if you learned ruby programming language first a little, at least the basics.
Help a noob create a website tutorial Quote
05-28-2013 , 04:48 PM
Here's how I would do this:

1. Setting up a server [done, hopefully by using something like XAMMP -http://www.apachefriends.org/en/xampp.html so that everything is configured out of the box ]

2. Create the database tables
Using the phpMyAdmin tool that came with your XAMPP install, create a database and some database tables to store information from your web application.

3. Write queries to interact with the data
You'll need to use SQL statements to interact with the database. You can practice these in phpMyAdmin (see http://w3schools.com/php/php_mysql_insert.asp and http://w3schools.com/php/php_mysql_select.asp]

4. Create the forms to enter data and display data
Use HTML for the front end page and submit to a PHP form for this. The HTML describes the fields the user enters and then you use an HTML form to POST this to the PHP program. The PHP program will then write (or read) the data into the database and return the data.
(see: http://w3schools.com/php/php_forms.asp)
Help a noob create a website tutorial Quote
05-29-2013 , 12:11 AM
Wow, there is alot that goes into these things. Much respect to minds like yours that know their way around things.

I'm not giving up, but I can only go by in steps and for short amount of times. Thanks for helping along this journey of mine.

one love
Help a noob create a website tutorial Quote
05-29-2013 , 11:30 AM
Doing things in steps is good, but you need to know what steps to do and in what order. As you have noticed, there are a ton of things you could study. That's why I recommend following an online class that has a curriculum.

https://www.udacity.com/course/cs253 - build a blog and deploy it on the web using python and google app engine
https://www.cs75.net/Main_Page - Harvard class on building dynamic websites using PHP

Classes like these explain things in a certain order for a reason.
Help a noob create a website tutorial Quote
05-29-2013 , 04:32 PM
Quote:
Originally Posted by animas
Wow, there is alot that goes into these things. Much respect to minds like yours that know their way around things.

I'm not giving up, but I can only go by in steps and for short amount of times. Thanks for helping along this journey of mine.

one love
haha ya that's what i was saying. I've been studying this stuff for a year and feel like I've only scratched the surface of it. I'm working on a similar project.
Help a noob create a website tutorial Quote
05-29-2013 , 04:34 PM
Starting from scratch like this I think its a big mistake to not start with getting a good handle on HTML and CSS as opposed to jumping in head first with PHP and SQL.
Help a noob create a website tutorial Quote
05-29-2013 , 07:24 PM
Quote:
Originally Posted by Go_Blue
haha ya that's what i was saying. I've been studying this stuff for a year and feel like I've only scratched the surface of it. I'm working on a similar project.
Yea, there are so many moving parts, so to speak, I'm definitely going need some classes to immerse myself in the subject.
Help a noob create a website tutorial Quote

      
m