Jump to content

38 posts in this topic

Posted

Whatever you chose to go with don't use a framework, take the time to learn and understand the language first. (Y)

Share this post


Link to post
Share on other sites

Posted

[quote name='exotoxic' timestamp='1351822523' post='595291065']
Whatever you chose to go with don't use a framework, take the time to learn and understand the language first. (Y)
[/quote]

Agreed. You may think it's a good idea, but it will teach you bad (code) manners.

Share this post


Link to post
Share on other sites

Posted

[quote name='LaP' timestamp='1351821192' post='595291043']
A good part of this article has be debunked. I'm too lazy to post link but do a simple google search. Anyone who write such a long blog post to critize a language clearly has an agenda. You know i hate web forms with a passion. I don't waste my time writing a 20 pages blog about it. I just don't use it when i can avoid it.
[/quote]

Is it actual debunking or people just disagreeing with the points he raises?

And it's fairly obvious that he has an "agenda" by posting about something, if he didn't care he wouldn't post about it, good or bad.

Share this post


Link to post
Share on other sites

Posted

I self learned php and use it often

It was easy to pick up and as said before there are thousands of examples and tutorials etc online

Share this post


Link to post
Share on other sites

Posted

Sorry for the late reply, but I wanted to get all my information together before deciding. So I want to thank everyone of you for helping sway me towards the right language.


I decided to learn php. I have been reading there is the "right" way of learning it and the "wrong" way that makes you a bad php programmer. The more I search there is no consensus from people on what to do / what way / what to read to learn php the right way. Can anyone direct me in the right direction?

Thanks. :)

Share this post


Link to post
Share on other sites

Posted

Use PDO instead of any of the mysql_* or such APIs, they've been deprecated for years yet they're still prevalent in tutorials.

And double check the usage of every API call, they're all over the place in behaviour.

Edit: Oh, and use prepared statements with PDO, they're faster and more secure against attacks like SQL injections.

Share this post


Link to post
Share on other sites

Posted

One thing I think is important to consider if you are new to web programming is that PHP errors are very clear - it pretty much tells you what is wrong. No idea what Python is like as I've never used it, but other languages (both web and desktop) that I've used are totally obtuse with errors, giving you little clue as to what needs to be fixed (which is really irritating when trying to learn a new language). However, this isn't to say you should depend on them later on. When you are comfortable enough you should look into handling errors and how to use exceptions correctly. But when starting out, the clear PHP errors are very useful IMO.

I think one big mistake people make with PHP is to just use a framework from the outset. You don't learn how to do various things that are quite important (and some just do little more than try to turn PHP into something it isn't, abstracting things over and over for the sake of abstraction). I've written my own frameworks and CMSs and the lessons I learned have been invaluable.

The other big mistake is to just copy tutorials without looking for more information. For example, if security is a big concern, read [i]everything[/i] you can on protecting against attacks. This ties in with the former point - when I started I learned to use the mysql_ methods (news to me that they've been deprecated, but I've been out of it for a year), which in turn taught me how to properly sanitize user input. ([i]Never[/i] trust the input!) I've come across code from developers who've only existed in frameworks and they don't have the foggiest on what to look for and how to detect various types of attacks because their framework of choice did it for them (or they assumed as such anyway). This is fine as long as they can use their framework, but what about situations where the framework can't be used?

My thoughts from 8 years of web development with PHP/MySQL/Javascript.

Share this post


Link to post
Share on other sites

Posted

Removed

Share this post


Link to post
Share on other sites

Posted

Thanks for the tips and information guys. But what about books? Any good books that you guys recommend?

Share this post


Link to post
Share on other sites

Posted

Ron Paul 2012, i'd recommended Head First series books.. try searching for Head First PHP
IMO Head First series are the best books, especially for beginners; the way they presented the contents is good and exciting (not boring like the usual deitel like book)

Share this post


Link to post
Share on other sites

Posted

[quote name='imin' timestamp='1366480937' post='595649664'][...][/quote]Welcome to Neowin! While your comment was very relevant, in the future, please don't dig up 5 months old threads. :)

Share this post


Link to post
Share on other sites

Posted

Hi,

I do not think you will get the answers you are looking for and I also think you are thinking about this "backwards" - What does the project demand? I produce very few (Python, RoR or Nodejs projects) vs PHP and the reason is "standardization" and costs. Large companies frequently are slow adopters and out of the few companies who did use Python / Nodejs - this was a specific purpose that PHP itself would not lend itself too. For smaller companies the cost of hosting PHP is too low to ignore - buzz words like "Word Press" are still king.

Share this post


Link to post
Share on other sites

Posted

[quote name='Tech Star' timestamp='1354522246' post='595365024']
Thanks for the tips and information guys. But what about books? Any good books that you guys recommend?
[/quote]

Any intro book, to get the basics. Buy the book, rip out the chapter on mysql_ statements, then go read the PHP documentaiton on PDO and prepared statements, and you'll be more or less good to go on a basic site.

After that, you'll want to learn about object oriented php, and AJAX, and whatever else strikes your fancy, but you need none of that to get up and running. Correctly executing database read / writes you absolutely need from the beginning.

Learning mysql, as presented in most into books, is a complete waste of time, and it's borederline irresponsible how many books are still being published new that still do inserts using mysql_query.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.