1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Making a website with user profiles

Discussion in 'HTML & Website Design' started by LapseOfSanity, Oct 1, 2013.

  1. #1
    TLDR: What programming language is best for a website with user profiles and will allow them to input text and submit it/update it on the site instantly on their own, and maybe have an upvote/downvote system similar to reddit?

    Firstly, I apologize if this belongs in a different category. If it does let me know and I will repost it where it should be, but I think this is a good place to start.

    I am not new to coding websites, I am pretty good with HTML and CSS but I have an idea that is new and foreign to me. I want to create a website where users can make their own profiles and upload their picture to it and things like that, and I also want to make a page where users can submit their own articles based on certain topics that I will post. Everything I have worked on so far is for businesses and it has very very little user interactivity as they are designed to promote products and not customer ideas. I have been looking into this reading articles and whatnot but the best way I can think of to figure out a definitive answer is by asking somebody that knows. What language would best fit a site like this? The only one I can think of that would work is php, but I really don't want to use that language unless it is the only one that will suit my needs.

    Again, if you respond thank you...I want to start work on this immediately before the inspiration fades.
     
    LapseOfSanity, Oct 1, 2013 IP
  2. akuji36

    akuji36 Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    akuji36, Oct 1, 2013 IP
  3. sarahk

    sarahk iTamer Staff

    Messages:
    28,494
    Likes Received:
    4,457
    Best Answers:
    123
    Trophy Points:
    665
    #3
    I would recommend using an existing content management system such as wordpress or joomla and then adding in modules/components/plugins (depending on the system you choose) to do the extra stuff you want. Saves time and you don't have to learn how to recreate the wheel!
     
    sarahk, Oct 1, 2013 IP
    Arick unirow likes this.
  4. LapseOfSanity

    LapseOfSanity Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    Alright, now my question about MySQL is: the hosting plan that I am looking at contains 25 MySQL databases, is it one datatbase per person so if I go with that one I can only have 25 users without upgrading to a plan that has unlimited?

    I am going to look into wordpress today, I keep hearing about it all over the internet but I have yet to actually look into it. I know it may be easier, but eventually I may want to make money off of my site, and if I am going to do that I would like to have designed everything myself, would using wordpress or similar lead to any problems like that down the line?
     
    LapseOfSanity, Oct 2, 2013 IP
  5. pmf123

    pmf123 Notable Member

    Messages:
    1,447
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    215
    #5
    you can have numerous tables within each database, and chances are you would just have one for user info - another for postings, etc.
     
    pmf123, Oct 2, 2013 IP
  6. LapseOfSanity

    LapseOfSanity Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #6
    Thank you for the info ^_^
     
    LapseOfSanity, Oct 2, 2013 IP
  7. rohitjain

    rohitjain Member

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #7
    Don't go with coding.Just use CMS like WordPress,Joomla and their plugins,modules,it would be better.
     
    rohitjain, Oct 3, 2013 IP
  8. MilesWeb

    MilesWeb Well-Known Member

    Messages:
    869
    Likes Received:
    35
    Best Answers:
    7
    Trophy Points:
    173
    #8
    Usually Linux hosts dont put any limit on size and number of databases. It all depends on disk space when you consider a linux hosting package with cpanel.

    I am sure, you will love wordpress with loads of features and plugins.
     
    MilesWeb, Oct 3, 2013 IP
  9. LapseOfSanity

    LapseOfSanity Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #9
    I am going to look into the wordpress thing today. I just made my coming soon page and now I want to start actually building the site. Can I use wordpress in dreamweaver? I really only use dreamweaver for the auto complete coding stuff and the preview page before I make it live.
     
    LapseOfSanity, Oct 8, 2013 IP
  10. gorrillamcd

    gorrillamcd Member

    Messages:
    43
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    38
    #10
    I'm not sure what you guys think of this, but if the OP wants to code the project himself (for education, for complete control over the site, or just for fun), I would suggest a programming framework. With a framework, security is easier as they usually include some best-practices by default, there are modules for doing common functionality (like user profiles for example), and it's closer to the metal than wordpress, so you learn a lot more about the environment and language.

    I'm partial to Rails (the language it uses is called Ruby), mainly because that's what I learned. There's some good tutorials on railscasts.com and what the OP is doing is super simple to do in Rails. If you prefer PHP (which seems to be the consensus here), try out Codeigniter or CakePHP. I haven't used them personally, but I hear that they are excellent.

    Of course, if you're not wanting to learn programming, like everyone has said, it's probably best to go with a CMS like Wordpress or others. Don't reinvent the wheel unless you have to/want to.
     
    gorrillamcd, Oct 8, 2013 IP
    sarahk likes this.
  11. LapseOfSanity

    LapseOfSanity Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #11
    Gorrilla, you are absolutely correct. I want to create as much of it on my own as I can. I know people preach wordpress and joomla and stuff, but I want to learn to program everything myself. I want this site to get popular when I launch it and I want to be able to say that I made it myself. I have been looking into Ruby a bit lately but I dont know exactly how to incorporate it into a website. So far I have a coming soon page with an area to put in an email address and hooked that up to a SQL database that will store them as well as a php contact form. How does ruby play with other languages? Because, from what I am into so far, I really dont have an option outside of PHP for the server side codes, but I could be wrong. I am tackling the problem of setting up framework for users to create accounts right now and I am trying to figure out the best path to go. I am leaning towards PHP for this as well, but if its something I can do with Ruby, I would like to go that route. I understand PHP and I can write some PHP, but I don't like it.

    Basically if this website doesn't go anywhere I would like to at least get some useful knowledge out of it, thus my hesitation to use a premade CMS, and from what I have seen browsing jobs Ruby is a pretty attractive language to know these days.
     
    LapseOfSanity, Oct 11, 2013 IP
  12. gorrillamcd

    gorrillamcd Member

    Messages:
    43
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    38
    #12
    Let me try to explain this from the ground up. Sorry it's so long, but I want to hopefully help you avoid some mistakes I made while learning programming for the first time.

    Any of the major programming languages can be used to make a web application. I'll use Go ( http://golang.org ) as a recent example. Go, as any other programming language, didn't have any frameworks in the beginning for making a web application. That doesn't mean people couldn't write a web app in Go. They just had to write the web server, request routing, and other parts manually. Ruby is the same. You could write all the pieces necessary to make a working web app, but you don't have to. Others have already written frameworks or libraries that contain all the common parts a web application needs. When you first start out, if you start with a framework first, it can seem a little confusing how the programming language fits into the mix with the framework, so hopefully what I said helps.

    You're going to want to read a lot. Shoot for professionalism while you're learning. If you learn good habits now, you won't have to unlearn the bad habits some tutorials on the web teach you. Make sure you're using tutorials, websites, and books that teach best-practices. But at the same time, try not to get too involved in the politics that any programming language will have. It'll just waste your time.

    Now, for some learning suggestions:
    • To get Ruby and Rails installed, I suggest linux. Windows will only give you headaches. You can run Linux in a virtual machine and it should be fine. For actually installing Rails, this is the best, most complete tutorial I've found and is super easy to follow: http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
    • TryRuby.org is a great website for getting familiar with the syntax Ruby uses. You'll want to do this first. Trust me, being familiar with Ruby before Rails will help immensely later on when you want to try something that's not Rails (like Sinatra for example).
    • Also, look at http://Learncodethehardway.org/ for Ruby as well as Python, C, SQL, etc. It's a great idea, especially if you are new to programming, since it explains variables, functions, and other programming concepts.
    • For Ruby and Rails, I can't recommend enough http://railscasts.com . Check out the Authentication from Scratch episodes for a great overview of starting an app on rails and an in-depth look at how authentication works on a normal web app.
    • The Rails Tutorial by Michael Hartl is an excellent tutorial/reference for learning a certain way to make rails apps. It follows a Testing-first programming model which he explains in the first chapter. Some might not like it, but it's useful if nothing else as a reference (if you're stuck on an app, jump to the relevant chapter for ideas/tips for example). Here's the link: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
    • The Rails official guides are great in the beginning for learning the basics and some medium difficulty stuff. http://guides.rubyonrails.org/
    • Finally, http://stackoverflow.com/ . I know some people don't like them, but they have good information on common problems you'll run into. A bit of advice: learn how to write a question that they like before writing a question. They're zealous about closing questions that don't fit their guidelines.
    You don't have to go with Ruby though. There are a ton of great options. PHP is ubiquitous on the web which is why it can be useful to learn (I personally don't like it). Go is the new kid on the block which boasts lightning performance. Python is great because it's a somewhat multi-purpose language (Used in everything from Raspberry Pi, Scientific programming, game development, web apps, and more). Javascript is great to learn and you can use it on the server-side as well (via Node.js). There are multiple server-side and client-side javascript frameworks available as well.

    It's going to be A LOT of work, trust me. But really, this is the best way to learn. You have a project idea that gives your learning purpose, which will help you stick with it when your frustrated because you can't figure out how to structure a database call to get the names of users from one table and their posts from another table for a single category (or similar frustrating circumstance).
     
    Last edited: Oct 11, 2013
    gorrillamcd, Oct 11, 2013 IP
  13. LapseOfSanity

    LapseOfSanity Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #13
    Thanks for all your advice, I will take any of that I can get right now. I am not running windows, I have a Mac that I use for all my web design things so I installed Rails on this, I figured installing it was a good starting point and I will be spending the majority of my free time reading up on it for the next few days I am sure. I went through this learning HTML and CSS years ago, and PHP not too long ago, another language will be about the same I can imagine. I guess I have a little more patience for it since it is something that I want to do :)
     
    LapseOfSanity, Oct 11, 2013 IP
  14. gorrillamcd

    gorrillamcd Member

    Messages:
    43
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    38
    #14
    Great! Mac is just as easy, if not easier, to use for developing with Rails. There are so many tools built for it to help with everything from testing to deployment of your finished app. The fact that you are already familiar with PHP, HTML, and CSS will make it much easier to pick up Ruby and Rails.

    If I can give you just one more piece of advice: There are tons of gems (ruby's name for libraries) that do various things. There are usually 2-3 for any given function. Look at which one is maintained currently (some have been abandoned) and then pick one and stick with it. People get all worked up about their favorite gems (what I mentioned about the politics in programming) and you'll be tempted to switch to something else. It'll just waste time while you're learning. Stick with what you've chosen at first, and then after you've got everything learned, start experimenting with different gems/programming techniques/frameworks but not before you get comfortable using the language/framework.
     
    Last edited: Oct 11, 2013
    gorrillamcd, Oct 11, 2013 IP
  15. LapseOfSanity

    LapseOfSanity Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #15
    Before I dive right into ruby, I do want to ask if it would work for what I want to do. Will it be able to talk to SQL databases to get users login information and what not? And the biggest thing about the site I am making is the peoples ability to write their own stuff and submit it and have it automatically post to the page with some kind of voting system(I havent decided how I want to do that yet) And I when I make php I have to actually make a .php document, when incorporating ruby will it be a .html? Sorry for all the novice questions, but since this is going to take a lot of time to learn, I want to learn the right things.
     
    LapseOfSanity, Oct 11, 2013 IP
  16. gorrillamcd

    gorrillamcd Member

    Messages:
    43
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    38
    #16
    First of all, any of the languages I mentioned can talk with a database. Usually, you have a module/library that handles talking to the database for you and has functions for constructing database calls. Authentication (like I mentioned with the railscast.com episode) is the process of taking a user's login info and seeing if it's correct to allow or disallow the user access to the site. Both railscasts.com and the Rails Tutorial have sections on how to implement Authentication and there are several gems that make it easy. I suggest learning by doing the Authentication from Sractch episode on railscasts, but when it comes time to actually build your app, use one of the gems (like devise or AuthLogic) as they have the benefit of having security patches and have been reviewed for security holes by many people. Your self-made solution will not have that benefit.

    In Ruby, the file extension is .rb . With Rails, you have a command line program that generates all of the files for a basic application, so you don't normally have to manually make the files you need (unless you want to of course). There is something called "scaffolding" that generates controllers, models, and views for you. I recommend against this at first as you're trying to learn while doing it. Scaffolding can be nice once you've learned to save some time, but you'll want to actually write code in order to learn it well. Tutorials that rely heavily on scaffolding usually don't teach you much. Steer clear of those.

    Rails is very opinionated, which means that you follow the way the designers of Rails want you to or you have a bad day. It might be different than you're used to, but it does make for a great framework to learn on, since most decisions about configuration are already made for you by default.
     
    gorrillamcd, Oct 11, 2013 IP