This is the P2PU Archive. If you want the current site, go to www.p2pu.org!
Week one is focused on the PHP language. As mentioned in the intro email we'll have two frameworks announced each week, and you can pick one or both, but this will give us more flexibility to your interests and the size of the class.
We will start with Wordpress and Drupal as our PHP-based open web frameworks. Below are a few starting points to give you inspiration, and links to etherpads for our collective documentation efforts. Of course, if there is a particular aspect of a framework that you have a burning desire to learn about, by all means go and explore it. These are suggestions, not constraints. We might get through one area, we might get excited and dive deeper into special areas, or we might plow through more than I have listed here. Whatever inspires your will be a positive addition to the group's understanding.
For both frameworks, the first thing to do is go and checkout your own copy of the source code.
Most libraries and frameworks have many common architectural features such as systems for url handling, user-defined views, data models, user profile systems, etc. It would be neat to be able to compare across different systems and languages at the end of the course. Keep that in mind!
Wordpress
Get the source here.
Some places to start:
Dig it on the readingcode-wordpress etherpad!
Drupal
Get the source here.
Some places to start:
Yes, you can dig it on the readingcode-drupal etherpad!
Tools:
For many of our frameworks, grep and other bash command line tools will be your friend. Use the man pages, google them, and treat this like a good excuse to play with those tools as well. Firebug and Chrome developer tools might also be useful. And if you have any additional ones, let us know.
Don't be afraid to make change to your copy of the code, comment inline or even print some of the source files out, as discussed in this shedding bikes post shared by Manuel.
Discussion:
1. feel free to hang out with others in our irc channel (you can connect from any IRC client besides the web on #p2pu-webcraft/reading-code)
2. if you come across useful debugging or code reading tools, please post them in reply to this forum
3. and of course, post questions, ideas, interesting parts of the code, and other thoughts to this forum as well.
Your mission, open web ninjas!
Over the next 4 days, our mission is to document our findings, questions and opinions on the wordpress etherpad and drupal etherpads (respectively) as our understanding of the architecture, coding style and tradeoffs of the
framework increase. Don't forget to explore and have fun :)
Go forth and conquer! Don't forget-- we meet sunday at 3pm EST in IRC (sorry, I have not calculated everyone's offset). We'll use our documentation as a launch point for the discussion.
Jessy
ps if you need or want to start additional etherpads, you can do this by visiting http://pad.p2pu.org
One thing about Drupal - it does not maintain backward compatibility and there are usually major changes in core and APIs.
Given that D6 is nearing end of its life cycle and D7 is already in alpha - it should be launched in next few months - should be instead read through D7? That will be more up to date and may also produce something valuable for the project itself. Just a thought.
One thing about Drupal - it does not maintain backward compatibility and there are usually major changes in core and APIs.
Given that D6 is nearing end of its life cycle and D7 is already in alpha - it should be launched in next few months - should be instead read through D7? That will be more up to date and may also produce something valuable for the project itself. Just a thought.
i think that would be fine. seems more motivating to read current stuff. what do other people think? i'd say if you are happy either way, go for 7, and if you want to read 6, then do that but perhaps make a separate section for that on the etherpad.
also, if you know v6 and are reading v7, make note of the changes between versions.
I'm unable to connect to the etherpad links, anyways i have downloaded the drupal source and tracing the code, it very intricate, i have used drupal for more than 3 years now, had not went to the depths of what is mentioned here.
I need some suggestions here, assume i open a file user-profile.tpl.php that in turn will have
* @see user-profile-category.tpl.php
* @see user-profile-item.tpl.php
* @see template_preprocess_user_profile()
Now if one opens user-profile-category.tpl.php, he find @see's in that file also and these becomes a large chain of files.
The question is,if we assume all the @see files as the child nodes of the tree with root as the main file from which we start reading, what kind of traversal is better?
cool, as we were just discussing on IRC (repeating here so others are aware) the etherpad server is very unreliable, so i'll try to keep it running, but if it proves too unavailable we can move our docs elsewhere.
as for the best way to traverse the code, one way might be to choose a specific function and trace that all the way down (so depth-first). another way would be to think about keyword or terms of interest and grep through all the files first, to select which ones to read.
personally, i would follow each of the above references a few more steps down to get a sense of the scope, a high level overview of the relevant files and how the functionality is broken down. i would also be particularly interested in user-profile-item because it looks the most specific, but that could easily be wrong ;)
!NOTE! we've moved to another etherpad server due to how unstable our own is.
the docs can now be found at:
http://ietherpad.com/reading-code-drupal, and
http://ietherpad.com/reading-code-wordpress
jessy
@Jessy Thank for suggestion on depth first read and grep based read (: