Who fancies a community effort to write a book?

Where we keep all the boring tidbits about the PHPDN site, the news, and what not.

Moderator: General Moderators

Post Reply
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

d11wtq wrote:We certainly need it given the number of pages in this thread alone and it's only been going two days.
I've only read 3 pages out of the 6 in this topic so far :P

Edit: Now it's 7 pages thanks to me :D
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

d11wtq wrote:Yeah, stuff under Urban Renewal (note, Urban Renewal is different to our PHPDN Revival forum) is closed to the public at present. We're (mods) using it to discuss potential projects that have copped up here and there.
Sorry, had the wrong forum. I thought the PHPDN Revival Forum was the same.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Everah wrote:I couldn't resist. I had to blog about it, too.
Blogged (in Russian) about it as well: http://weirdan.livejournal.com/28232.html
:D
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I've been thinking about this for a while, but i don't have the time to write it all by myself... And i'm not a good writer anyways, but here are a couple of subjects this book should have:

(1) introduction:

- Explain how PHP works. Start with a console application first to proove that PHP generates a 'file'. Be it text, an image, ...
- Explain how a webbrowsers requests a static file from a webserver (perhaps show a bit of the http procotol)
- Explain how a webserver can launch a php instance, pass variables (CGI) , generate 'file' and return it
- Explain how a webserver can improve if he has a couple of instances loaded (mod_php)

Mosts books i've started start from a simple <?php echo 'hello world'; ?> that is executed @server and don't show the technology behind this.. I really think this chapter will make the reader a better programmer

(2) tools/html/javascript/xml:

- Give the user a brief overview of of the technologies, explain them how they work..

(3) relational databases/sql:

- Give the user a brief overview of database moddeling, teach him a bit about relationships types (how to model n-m), referential integrety, joins, ...

(4, 5, ....) the real php stuff ;) (

- Perhaps have a look in the snippets forum to find some good topics..

-> Imho those first three chapters would make the real difference with existing books ....
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Weirdan wrote:
Everah wrote:I couldn't resist. I had to blog about it, too.
Blogged (in Russian) about it as well: http://weirdan.livejournal.com/28232.html
:D
Guess I'll have to check it from home because OUR STUPID @$$ PROXY SERVERS ARE NOT LETTING SOCIAL NETWORKING SITES THROUGH! :x
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

timvw wrote:... here are a couple of subjects this book should have:

(1) introduction:

- Explain how PHP works. Start with a console application first to proove that PHP generates a 'file'. Be it text, an image, ...
- Explain how a webbrowsers requests a static file from a webserver (perhaps show a bit of the http procotol)
- Explain how a webserver can launch a php instance, pass variables (CGI) , generate 'file' and return it
- Explain how a webserver can improve if he has a couple of instances loaded (mod_php)

Mosts books i've started start from a simple <?php echo 'hello world'; ?> that is executed @server and don't show the technology behind this.. I really think this chapter will make the reader a better programmer

(2) tools/html/javascript/xml:

- Give the user a brief overview of of the technologies, explain them how they work..

(3) relational databases/sql:

- Give the user a brief overview of database moddeling, teach him a bit about relationships types (how to model n-m), referential integrety, joins, ...

(4, 5, ....) the real php stuff ;) (

- Perhaps have a look in the snippets forum to find some good topics..

-> Imho those first three chapters would make the real difference with existing books ....
I think there is a place in PHP learning for those topics. But putting them in the beginning might be enough to turn new developers off. Not to mention that if I went to a restaurant and ordered a steak, I'd expect a steak not a bunch of things involved in getting it to me. I might want to know that after I am eating it, but looking for something and being served something else right off the pop would make me turn away. This is just my personal opinion.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

It doesn't have to turn them off... Since (imho) they get 4 steaks (blue- saignant - a point - bon cuit) in chapter 1 already ;)

(And while they're eating it, they notice we're serving other nice meals too... Should make them order more ;))


Admitted, chapter 2 and 3 probably don't have to be at the beginning... Just teach them PHP basics first... And then introduce 'valid html etc'... And more later introduce 'databases'...
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Without taking prior lists into account, I created this one. Mind its incomplete, and just to feed the discussion. Personally, I think everyone should have their own lists. When we get a dedicated forum topic, we can look at merging these, and profiling the proposed book from top to bottom. Since I stuck OOP in early as an introductory topic, I'll note it's not flame fodder. ;)

I kind of like timvw's chapters. At the start of the book might be too much for the total beginner, but running PHP covers a lot of ground and options and these would provide some entry level insights.
Maugrim and Everah, think you have settled down with the topics. I saw one past where certain roles where displayed. Think you both can take up the tole of administrators and decide upon the rest fo the team.
I'll defer to d11wtq's moral authority (he's the one to blame for the initial suggestion that we've latched onto). We have a list of roles (thanks to Everah) and filling them can wait for just a while. The most pressing needs:

- Forums
- Licensing
- Copyright

Forums, we may soon have. Copyrights and Licensing remain. Has anyone any specific License they'd like to see used? Keeping it simple:

- Should commercial uses of the book be allowable?
- Should the license require all derivative works carry the same license?

On copyrights, who holds them? Individuals, a group of individuals, a standalone entity? On a related note, should we consider a CLA (Contributor's License Agreement) to give reasonable assurance the book does not contain copyrighted material from other sources? Or do we rely more on peer review?

Basically, if we get those out of the way quickly (and they must be addressed before text can be submitted in any form) the project has made it's first large step.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Would help to post the list...doh!

Code: Select all

PHP Book Plan

>> This was done up not as a fixed text. People should write their own independent contents plan, so the good and not so good from each can be identified, discussed, and eventually merged.

The Untitled PHP Book

Preface
	- Statement from Project members
	- purpose of the book
	- the how and why of writing it
	- and dedications or thank you's

Introduction
	-general programming introduction
	-history of PHP and its future developments
	-fix its place versus other programming languages
		->dynamically typed
		->web application focus
		->not strictly OOP
		->wide adoption rate
		->no slamming other languages, but address common concerns
	-what it can be used for (with examples!)
	-how currently used on and offline

Installation (and Support? <separate section maybe?>)
	-possibly add installation detailed steps for platforms to Appendix
	-configuration (minimal detail)
	-common configuration issues (magic_quotes_gpc, register_globals,...)
	-RTFM! The PHP Manual. AKA God.
	-online tutorial sites, news sites, blog feed aggregators, etc
	-mention PEAR and PECL briefly

Getting Started
	-!Important! In all chapters try to link new knowledge to a practical use case <suggestion>
	-start your webserver
	-select an editor (text vs code vs IDE environments)
	-opening and closing tags (why short_tags is evil)
	-output functions (echo, print, exit (and its die alias), var_dump)
	-create a first script - the Hello World! bit
	-congratulate reader on their maiden voyage

PHP Fundamentals
	-variables and references (and how they relate to values in memory)
	-types, casting and juggling
	-constants
	-operators
	-comments (mention of phpDoc)
	-why code does not contain Unicode characters in variable names etc.

PHP Statements
	-need I say more?

!Not intended as flame fuel!

Introduction to PHP Objects and Classes
	-what they are
	-why they exist
	-basic syntax
	-use within procedural code
	-note an expanded chapter later in book
	-integrate usage from hereon in to get the reader used to them early

Strings
	-assigning to variables (quotes, escaping, special chars, newline/tabs/etc.)
	-outputting strings (note html escaping for security)
	-standard functions for manipulation (brief mention of regex)
	-how to check contents:
		->ctype library
		->intro to regex
	-handling Unicode strings
		->mbstring
		->PHP 6
		->regex ranges (and why ctype sucks at this)

Arrays
	-what they are
	-how they differ from other languages
	-standard functions
	-Iteration, and use in certain PHP statements
	-How objects can have some array behaviours (with PHP 5)

PHP HTTP Input
	-superglobals
	-why magic quotes are evil
	-need for security precautions
	-link to String/Array other chapters

Advanced PHP Objects and Classes
	-summarise last chapter
	-why classes?
	-explain key concepts (orthogonality, encapsulation, polymorphism, etc.)
	-STOP - give real world example before the reader's head explodes
	-access keywords, and why they exist
	-interfaces and abstracts
	-static properties and methods
	-brief mentions of:
		->design patterns
		->unit testing
		->refactoring

Stuff I Left Out!

-File I/O
-Databases
-HTML/XML/JS - why they are needed
-Other Stuff I surely left out

Suggested Advanced Chapters

-Security
-Unit Testing
-Design Patterns
-Refactoring
-PEAR
-PECL

Where to go from here?

- God (The Manual)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Padraic I'm speechless. Your list alone would make a solid book... compiled together with others this thing is gonna rock!

(Tip-toes around the fiery embers carefully...)

I like the way you've brought OOP into it. It's "introduced" as a concept rather than pushed upon the reader as a definitive method of programming. I do agree that doing it this way is better than throwing it in as an afterthought/advanced concept. OOP goes from really basic to really advanced in the first place.
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

I never understood why it was flame fodder..I mean...it's just a way of coding.. : Shrugs : either way. SOrry I've been quite, been reading, wondering when we're going to get a forum so we can try to make thismore meaningful. :-D
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

OK, Here's my list. Not nearly as detailed as Maugrim's, but I am shooting mostly for the fundamentals of the stuff (though I do like Maugrim's detail quite a bit).
____________________________________________________________

Code: Select all

PHP for Anyone
--------------
Introduction to PHP
-- What is it
   -- What is a server (in server-side)
-- Why should I use it
-- How does it compare (briefly vs ASP, CF, Ruby, Python etc)
-- How do I get it
-- How do I install it
   -- Setting up Apache in Win/*nix/Mac
-- How do I configure it
-- Who is using it (and how? - Mostly stats and such)
-- What's next

PHP Basics
-- The PHP Manual
-- Coding syntax
-- Commenting (and discuss planning for future)
-- Types (and maybe casting)
-- $variables, constants, globals
-- Control structures
-- Conditionals handling
-- Error management (and meanings of common error messages)
-- Scripting (and first script)
-- Objects (OOP in a minute)

PHP Development
-- OOP (Fundamentals, the rest can go in advanced)
-- Databases
-- File System
-- Form Processing
-- My First Script

PHP Advanced Development
-- OOP (Full bore)
-- XML
-- GTK
-- Built-in & PEAR Libraries

Appendix
-- Common PHP functions
-- Common PHP app tasks
-- Common PHP IDEs
-- Other PHP Resources (DevNet - w00t!)
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

d11wtq wrote:I like the way you've brought OOP into it. It's "introduced" as a concept rather than pushed upon the reader as a definitive method of programming. I do agree that doing it this way is better than throwing it in as an afterthought/advanced concept. OOP goes from really basic to really advanced in the first place.
I would like clarify because I was part of the that "exchange of ideas" on page 5. ;)

My idea is to not present functions and classes as competing things, but to simply present them as different language constructs like you might present if() and switch(). I would like the attitude to be neutral like this:

- functions are a way to encapsulate one or more lines of code and variables private to that code


- classes are a way to encapsulate one or more functions and variables private to those functions

Here's what they are. Here's what they do. Here's how to use them. They are both part of the language.

I would go so far as to not even mention the terms "procedural" or "OOP" anywhere in the book. Just show how to use the built in functions and classes, and follow that with how to write your own. Functions and classes should be treated together as structures that allow you to create blocks of reusable code.

Following that thinking, I would rename Magrim's chapter "Introduction to PHP Objects and Classes" to "Introduction to PHP Functions and Classes". Likewise I would rename "Advanced PHP Objects and Classes" to simply "Advanced PHP" and it could also include things like using variables as function names, variable parameter lists, etc.

I would maybe add a "Design Concepts" chapter to discuss key concepts (orthogonality, encapsulation, polymorphism, etc.) and design patterns. And also add a "Methodologies" section to talk about debugging, unit testing, refactoring, etc.

Imagine a book that doesn't have an opinion on "that subject" -- it just shows you how to use functions and classes and gives examples of how they are currently used. If there are opinions in the book, they should be about good design practices that apply when using both functions and classes.
(#10850)
User avatar
technofreak
Forum Commoner
Posts: 74
Joined: Thu Jun 01, 2006 12:30 am
Location: Chennai, India
Contact:

Post by technofreak »

Wow guys! Both Maurgim and Everah have come out with a wonderfull list of topics. Think this is enough to start the first stage of the Project. Lets concentrate on building the chapters under the newbie sections, and let us identify more topics and decide upon them as we proceed.

We need to explain the configuration details of PHP in a bit detail, as not many books do provide much clue on them. Also, the first question a beginner will ask is where to place thier 'hello world,php' in the system, ie the Root directory for PHP files. This differs between Windoz and *nix systems, and with my experience within *nix itself.

I think, rather than having as an appendix we can have the 'Common PHP Functions' as a chapter or sub-chapter. This is because, functions are the mostly used components of the PHP code and explaining them clearly will help the readers make a wise use of them. Handling of date and time have often appeared in our threads, so they too need some explanation.

The other topics I would suggest concentration are Arrays and how we can use them, atleast a sub-chapter on Sessions and as we use Javascripts more these days, a seperate chapter on Javascripts, the basics of them, how we use them along with our PHP code, as well as other scripts will be quite useful for the reader.

Database design, configuration, implementation with PHP can be also taken up as a seperate chapter under the title 'Database and PHP'.

File Handling can also be taken as a topic of importance.

Think once we start getting materials we wil able to decide upon a better structure of the book. Hope the process begins soon as we have had enough discussions regarding the content and structure of the book. Am afraid that the hot iron is getting colder a bit, we have start our work and keep the heat on! :)
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

I think if not a separate place to hold solid definitions of where the book is going and what is already in order; perhaps at least a separate topic should be made to keep the clutter out of the way.

That's my contribution thus far. :-D
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply