PHP VS Ruby on Rails. Which one is best for a beginner?
Obviously I will also be needing to implement MySQL in there as well. Well? Which would you suggest for a beginner?
I’ve never seen, nor really know anything about ruby, so my vote is PHP
How long would it take someone to learn PHP? How long before I could edit stuff, etc…?
Do you have any programming experience?
If you know C or javascript you’ve got a good head start, then its just a matter of learning the functions.
Rails is mostly a framework …there are tons of PHP frameworks out there including PHP on Rails ()
I like CodeIgniter
I don’t know any other programming language. I know HTML, that’s about it.
So for web work you know what you want the code to output…that is at least a start.
I would download Visual Studio Express and either buy an intro C# book or just go through some tutorials. That will give you some basic understanding of how to handle strings and basic operators, etc. Will help you start thinking in terms of objects and stuff…then the transition to php will be pretty easy.
Some people might disagree with me but I think C# + the Visual Studio Express IDE is a pretty easy way to step into programming.
I haven’t played much with Ruby on rails (or Ruby for that matter)..
That being said, coming from a academic background (I’m a senior CS student), with experience in the C based languages, I found PHP pretty easy to pick up. As someone stated above, it’s really just about learning the sytax and functions. Php.net is an excellent resource for that; I have it bookmarked and find myself refering to it all the time (and I have several PHP books in my library).
For conversation, our security orientated professor HATES PHP. He pushes Ruby becuase he claims that PHP is an unsecure language. I dunno, I personally don’t feel that I have a valid opinion here, but I understand injection attacks, and how to program around them. So far non of the stuff I’ve done has had any security issues, and I know for a fact that he (the security professor) was poking around a website I did for the school (which means he was more than likely trying to fuck with it – he’s told me before that he would be doing such).
God, I wish RoR would just die already. Only good thing it brought was more discussion about frameworks.
Start small with PHP and learn how it works. Write a basic website from scratch where you can upload images. From there, learn PHP with a good framework. Zend and Symfony are the 2 I would recommend. I’ve been using PHP since version 3, it’s not hard to pick up.
How much do you know about OOP? It’s a practice you’ll want to get used to as well.
|
For conversation, our security orientated professor HATES PHP. He pushes Ruby becuase he claims that PHP is an unsecure language. |
It’s not the language, it’s the developers who write shitty code.
Thanks, everybody. Does anyone have some book suggestions? I’ve always wanted to be able to write in PHP, or some sort of programming language like that. I would like to be able to make sites, write code, edit code, etc… For example here is one thing I would like to do;
I have a video CMS. It’s not a YouTube clone or anything like that. I want to be able to edit the CMS, and add some mods to it of my own. In the Admin Panel, you can add a slew of different files and different file types. I always add Local Media, videos I have hosted myself. When you add media, it’s the typical stuff. Category, Date To Add, Thumbnail (upload), Title, Description. I want to add a couple custom fields. I want to be able to add some custom fields that allow me to put in the year of the film that was made. Also I want to be able to put in the name of the director.
is a good place to start
Start small and work your way up.
Thanks once again to all. After just starting to play with PHP a bit, I have already realized its power. I knew it was a powerful tool, but this honestly becoming fun. As far as the net goes, I haven’t been this intrigued in quite some time. I hope I can become a force with the knowledge of PHP I will obtain. So far I haven’t really done much, but I feel I’m moving a long quickly.
There really isn’t any scripting language that’s good for a beginner. Unfortunately, that seems to be the only kind of language available for web development.
Try downloading Visual Web Developer 2008 Express Edition from Microsoft. It’s free, and at least ASP.NET is similar to traditional, strongly-typed OOP languages.
ASP.NET is not a strongly typed OOP language. It’s a web framework.
I don’t believe web development in general would be the best for a beginning developer depending on your goal. If you just want to bang out a couple of small websites, either PHP or RoR will work just fine. If you really want to LEARN how to write good software, forget all of the html/css/graphic and presentation that come with web development and learn how to write software first
PHP is a fine place to start – as long as you understand that the way you are programming is more like widdling a piece of wood than building a house. You can’t build a house worth a shit that way, but you can widdle a fine piece of wood. The technique you’re learning doesn’t scale to large projects. For that you would want something more like Ruby/RAILS, which, despite its much lauded database scalability issues, is designed to allow large groups to work on complex systems efficiently. There are a different set of concerns than "make a language easy for beginners doing personal home pages," and at some point if you keep programming you need to learn those differences.
|
ASP.NET is not a strongly typed OOP language. It’s a web framework.
I don’t believe web development in general would be the best for a beginning developer depending on your goal. If you just want to bang out a couple of small websites, either PHP or RoR will work just fine. If you really want to LEARN how to write good software, forget all of the html/css/graphic and presentation that come with web development and learn how to write software first |
I didn’t say ASP.NET was a strongly-typed language, I said it was similar. There really aren’t any strongly-typed interpreted languages, as far as I know; I guess it’s too difficult to implement. All I was saying, though I didn’t really say it right, is that at least ASP.NET uses VB.NET and C#.NET, which are themselves strongly-typed, even if the parts used in ASP.NET aren’t the advanced stuff.
|
God, I wish RoR would just die already. Only good thing it brought was more discussion about frameworks.
Start small with PHP and learn how it works. Write a basic website from scratch where you can upload images. From there, learn PHP with a good framework. Zend and Symfony are the 2 I would recommend. I’ve been using PHP since version 3, it’s not hard to pick up. How much do you know about OOP? It’s a practice you’ll want to get used to as well. It’s not the language, it’s the developers who write shitty code. |
How is a discussion about frameworks a good thing? All it does is make it easier to do things that a language isn’t well-suited for, by packaging the terrifyingly-complex code needed to do those things in another file that you don’t have to look at if you’re the squeamish sort.
asp.net is language agnostic. it is not itself a language. that’s what c# and vb.net are for
sounds like you need to learn a few things about frameworks if you think all they are is include files
(shrug) I needed a way to refer to .NET as it applies to web development. What’s the right term for that, if ASP.NET isn’t it?
Maybe so. As far as I know, that’s all they’re good for.
What is a framework if is isn’t just a generic term for things like the C++ Standard Template Library?
|
Maybe so. As far as I know, that’s all they’re good for.
What is a framework if is isn’t just a generic term for things like the C++ Standard Template Library? |
I’m not trying to be a dick but… how did you get a CS degree but you don’t know what an application framework is?
php is a great language because it’s so extremely forgiving. i work as a php developer, by the way. good money. (i have a bachelor’s in computer science) also, note that HTML is not a programming language, it’s a markup language and they’re completely different. i agree with SLED when he says..
but if you want to hop right in to either PHP or RoR, i would choose PHP and start at
it’s free, and they do a good job of leading you by the hand. just have to make sure you have a server with php-installed first before you can start. good luck!
|
php is a great language because it’s so extremely forgiving. i work as a php developer, by the way. good money. (i have a bachelor’s in computer science) |
And it’s also a huge bane to PHP. I’ve seen some of the sloppiest and insecure code in PHP. Possibly worse then obfuscated PERL or ASM. Enter frameworks, they can help with this if the user takes advantage of it. (Input handling).
I’d say close to 50% of shitty PHP code I’ve seen is due to poor input handling where I’ve been able to exploit assumptions made by developers. Wordpress (the abortion that survived and became famous) included.
|
And it’s also a huge bane to PHP. I’ve seen some of the sloppiest and insecure code in PHP. Possibly worse then obfuscated PERL or ASM. Enter frameworks, they can help with this if the user takes advantage of it. (Input handling).
I’d say close to 50% of shitty PHP code I’ve seen is due to poor input handling where I’ve been able to exploit assumptions made by developers. Wordpress (the abortion that survived and became famous) included. |
absolutely, but then again what sloppy programmer is going to take advantage of the frameworks in the first place?
True. Not necessarily sloppy, but lazy or ignorant.
Not to be a dick, but I have a software engineering degree, for the millionth goddamn time. I do design; choosing frameworks is the developer’s problem.
You do design, but you don’t know what a framework is? No.
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
February 22nd, 2009 at 12:09 pm
Hi,
Depends on the environment you like to program:
-> if you like non object oriented languages than PHP is the best choise.
Easy to learn and you can use it for web design but also for cli scripts.
(You can define objects in PHP but its not a pure object oriented language)
-> You like more programming in an object oriented environment than Ruby is the best choice.
Ruby is a Very High Level programming language. There are many free books (see Ruby website) and its a pleasure programming Ruby scripts.
If you know basic Ruby, you can start with the framework Ruby on Rails.
Also important is Sun java support -> JRuby (JRuby on Rails) AND Microsoft support -> Ironruby.
Ruby is a much powerfull language than PHP ..