Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-10-29 13:07:39

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,260
GitHub

PHP & MySQL developers -- where should I start?

I appreciate this is a question that might solicit zero or many answers, but I’d like to learn PHP with a view to making some plugins. Scratching an itch, I guess. With winter fast approaching in the northern hemisphere, now seems like a good time to get started.

To that end, I have a question for any established PHP developers — where’s a good point to start for someone who’s competent with markup, has good command of written and spoken English and a willingness to learn? Books are fine, printed or electronic, as are tutorials on the web, video training etc.

The answer can be ‘learn Python first’, of course…

Thank you in advance.

Last edited by gaekwad (2012-10-29 13:08:16)

Offline

#2 2012-10-29 13:39:24

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,448
Website GitHub

Re: PHP & MySQL developers -- where should I start?

Since you are already well versed in Textpattern, I would suggest the following:

  • Keep this PHP primer handy if you’re new to the entire concept of programming languages (arguably PHP can only be loosely called a language by purists, but let’s skip the semantics here and assume it does the job to the best of its abilities).
  • Similarly, bookmark php.net so you can search for functions and features as you find them in source code.
  • Open up publish/taghandlers.php and find a tag you like / know what it does. They all have names like the tag itself. Run through it line by line, looking at the various control structures and variable declarations, figuring out what it does. Use the above resources as reference material.
  • As you find functions that are not PHP functions, look for them in Textpattern’s lib directory. Again, see if you can piece together how things slot together.
  • If you prefer to start on the admin side, dive into any of the files in the include directory and see how the page you see is built by the various lines of code and loops in those files. Most of the things ending with _list are the functions that build the display. All the other things are for steps that do stuff like _save, _insert, _update and so on. It’s not rigorous, but it’s kind of logical.

If all else fails, ask here and we’ll try to get you going in the direction you want to go. We can’t guarantee that the core is the best place to learn good programming practice (although Jukka’s doing a storming job in SVN right now of documenting it and making it sexier), but it’s a good starting point because you’re familiar with the Textpattern building blocks so you can apply that knowledge as a shortcut. In my eyes, seeing how something familiar is built beats 100 abstract “hello world” examples any day.

Sound like a plan?

Last edited by Bloke (2012-10-29 13:39:54)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2012-10-29 13:43:10

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,260
GitHub

Re: PHP & MySQL developers -- where should I start?

Thank you very much, Stef — that’s really useful.

Offline

#4 2012-10-29 14:34:36

etc
Developer
Registered: 2010-11-11
Posts: 5,192
Website GitHub

Re: PHP & MySQL developers -- where should I start?

I have found Textpattern phpxref handy. Unfortunately, it is outdated (4.3), but many items are still valid.

Offline

#5 2012-10-29 15:03:21

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,260
GitHub

Re: PHP & MySQL developers -- where should I start?

Thank you, Oleg — your advice and input is, as always, appreciated.

Offline

#6 2012-10-29 22:57:33

lazyadmin
Member
From: Germany
Registered: 2009-08-08
Posts: 25
Website

Re: PHP & MySQL developers -- where should I start?

etc schrieb:

I have found Textpattern phpxref handy. Unfortunately, it is outdated (4.3), but many items are still valid.

A similar site (with 4.5.1) here.

Offline

#7 2012-10-30 00:55:34

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: PHP & MySQL developers -- where should I start?

This should be made into some kind of sticky forum thread as I emailed Stef asking exactly the same question about 2 days ago (Thanks for the answer btw:))

Offline

#8 2012-10-30 09:10:19

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,260
GitHub

Re: PHP & MySQL developers -- where should I start?

Thanks, Stephan – I’ve added that to my list, too.

Offline

Board footer

Powered by FluxBB