PHP5/MySQL Book Question

From: DeannaG (CYBATRON) 4 Oct 2014 02:30
To: ALL1 of 19
From: Peter (BOUGHTONP) 4 Oct 2014 14:43
To: DeannaG (CYBATRON) 2 of 19
Do you specifically need a book?

Zend has a bunch of PHP beginner tutorials.

From: DeannaG (CYBATRON) 5 Oct 2014 02:20
To: Peter (BOUGHTONP) 3 of 19
I know I can get a lot of stuff online, but there are times I don't have access to the computer. I'm not the only in the house. So I'd like a nice book for when I want to study stuff and someone else in on the computer, or maybe for useful reading material in the car, instead of my usual entertainment books.

I guess I'm also a bit of old school. I love books. The feel of them in my hands, turning the pages, even the smell of them. I've always loved books. So in a sense having a good book to learn PHP/MySQL from would be a twofer for me. The pleasure of a book and easy access. Even when the computer is occupied by someone else. :)
From: af (CAER) 6 Oct 2014 20:01
To: ALL4 of 19
[obligatory "oh god no not PHP it's the worst thing ever" comment]
From: Peter (BOUGHTONP) 6 Oct 2014 23:22
To: DeannaG (CYBATRON) 5 of 19
the computer? :?

I understand the wanting to hold, smell, and turn pages, but at the same time I'm not sure about learning programming from a book - not only because it'll assume you're at a computer following along, but because if you're not hands-on it's probably harder to absorb the concepts.

But anyhow, if you're certain about getting a book, I'd look at the Amazon reviews (though buy it elsewhere) - the [latest version of the] one you linked has mixed reviews - but the negativity seems to stem from it expecting HTML knowledge, which is probably not an issue for you?

From: CHYRON (DSMITHHFX) 7 Oct 2014 01:30
To: Peter (BOUGHTONP) 6 of 19
A book would be useful when you don't have network access. And any good games.
From: DeannaG (CYBATRON) 8 Oct 2014 17:25
To: Peter (BOUGHTONP) 7 of 19
HTML isn't an issue. CSS usually isn't either. :)

Yep. The computer. We did have two, but the other one up and died, and we don't have the funds to get it fixed. I'm not really thinking it's worth it anyway. It's like 12+ years old. When I was over doing some grocery shopping, I was looking at one at Sam's Club. Thinking I might try to save up for it, instead of worrying about the old one.
From: af (CAER) 9 Oct 2014 12:33
To: DeannaG (CYBATRON) 8 of 19
Why do you want to learn PHP anyway? Something like Ruby or Python (or even JavaScript, despite what people say about it) might be a better investment, and less bewilderingly inconsistent too.

Imo, PHP's only advantages are its ubiquity and its deceptively low barrier to entry.
From: Peter (BOUGHTONP) 9 Oct 2014 19:22
To: af (CAER) 9 of 19
> Why do you want to learn PHP anyway? ... a better investment
Do you have signatures ignored?

> ...its deceptively low barrier to entry.
That's not an advantage.

> or even JavaScript, despite what people say about it
People don't say about it (not once you exclude those that don't know what they're talking about).

From: af (CAER) 9 Oct 2014 20:12
To: Peter (BOUGHTONP) 10 of 19
Oh, yeah, was on my phone, and hadn't paid attention to her signature before.

Anyway, what I was getting at was that although it has a low barrier to entry in that you can just open a text editor and write some trivial code and it all just magically works, the lack of any kind of structure makes it quickly get messy once you move beyond trivial stuff. That's what I meant by 'deceptively' – it lures you in with initial ease of use, then slaps you in the face with its madness.

I'm not really sure if it's an advantage or not, tbh. On the one hand, it's an early short feedback loop, and is conceptually simple enough that beginners can get good results and be encouraged to continue to more advanced things. On the other hand, without proper guidance, those beginners could quite easily end up in a nightmare tangle of logic and presentation.

JavaScript: quite.
EDITED: 9 Oct 2014 20:15 by CAER
From: Lucy (X3N0PH0N)10 Oct 2014 11:28
To: af (CAER) 11 of 19
Quote: 
hadn't paid attention to her signature before.
She should make it bigger.
From: Matt10 Oct 2014 13:09
To: af (CAER) 12 of 19
the lack of any kind of structure makes it quickly get messy once you move beyond trivial stuff. That's what I meant by 'deceptively' – it lures you in with initial ease of use, then slaps you in the face with its madness.

Assuming you mean project structure, exactly the same can be said of any program language, including Ruby, Python and JavaScript (and especially JavaScript). If you're a terrible programmer, you're going to program terribly in any language you choose.

Also, with an enforced structure comes inflexibility to do exactly what you want, surely?

From: af (CAER)10 Oct 2014 15:10
To: Matt 13 of 19
The same can't be said for Ruby and Python so much because there are very clearly recommended choices for frameworks, that encourage good project structure.

JavaScript, well, that depends. There's plenty of good frameworks around for client-side JS, but like PHP, there's no apparent (to a beginner) need to use them, and it's simple to get results without them, especially if you use jQuery. This is, clearly, why there's so much terrible JS code around. If you're learning JS to use on the server, Express is probably the default framework recommendation, and at least nudges you towards keeping things organised.
Quote: 
with an enforced structure comes inflexibility to do exactly what you want, surely?
You say that like it's a bad thing. Beginners don't know enough to avoid the pitfalls, so some structure is helpful to keep them on the rails.
EDITED: 10 Oct 2014 15:15 by CAER
From: CHYRON (DSMITHHFX)10 Oct 2014 16:26
To: af (CAER) 14 of 19
There's a steep learning curve that can be daunting and downright discouraging, so easy wins can be important. Also there's many tutorials and online stuff that present contradictory methods, and new versions, security patches &ct. keep coming out to obsolete 'accepted' methods. It's all a bit more complicated than you make it out to be.
From: Matt10 Oct 2014 22:39
To: af (CAER) 15 of 19
But they're frameworks, they're not inherent of Python and Ruby. You have to seek those out to use them. Scratch that, you have to know you're looking for a framework in the first place before you even go looking for one. I'm pretty certain anyone starting out in Python or Ruby could write the same sort of really bad code as is possible in PHP just by following a few web tutorials and then expanding upon them.

If you want PHP frameworks to read about, have a look at Symfony 2 and Doctrine (an ORM for PHP), Laravel and Phalcon too and to a lesser extent (because it insists on still supporting PHP4) Codeigniter. PHP isn't the raw, brash scripting language it used to be, it has made huge leaps in encouraging interoperability in the last 3~4 years* especially through the PHP FIG and the PSR standards which are designed to make sure your code is interoperable with that of others.

* Trying to type the tilde, I've just found out my Girlfriend has changed my Keyboard layout to US English.
EDITED: 10 Oct 2014 22:44 by MATT
From: af (CAER)11 Oct 2014 19:47
To: CHYRON (DSMITHHFX) 16 of 19
Well sure, nothing is ever as simple as it's usually made out to be, and I know how confusing a full framework can be at first (lots of new concepts you kind of need to understand before you can do anything), so it's nice to have what's basically a glorified templating language "just work" with no setup.

I understand, too, that most people don't even need a proper framework, that they just want to add a bit of dynamism to a few pages and aren't actually making a web app.
From: DeannaG (CYBATRON)13 Oct 2014 00:41
To: af (CAER) 17 of 19
Why do I want to learn PHP and MySQL?

First, I'd like to be able to help with Beehive and it's development more in the future.

Another reason is most of the stuff we use is done in PHP and MySQL. So, I'd also like to know what I'm looking at when I'm poking around in them as well.

I'm not the sharpest tack in the pack, but I'm not too thick to learn either, and I do want to learn.  :-) I've already got HTML and CSS pretty pat. PHP and MySQL are next, then maybe I'll start on something else. We'll just have to see what happens.  :-)
From: af (CAER)13 Oct 2014 09:18
To: DeannaG (CYBATRON) 18 of 19
Aye, I realise now why you'd want to learn, sorry :) Honestly, despite my general negativity towards PHP, it's still encouraging to see people willing to learn software development.
From: DeannaG (CYBATRON)13 Oct 2014 21:28
To: af (CAER) 19 of 19
No worries and thanks!  :-)