Dojo Lesson #3 -- NodeAPI

Events happening in the community are now at Drupal community events on www.drupal.org.
joshk's picture
Start: 
2007-01-15 03:00 - 05:00 Etc/GMT-8

Speed, Strength, Module HooksOur third lesson debuts the new (and hopefully steady) time for my trainings, Sundays at 11am PST (my local timezone). This will also be my first lesson from "home base," which should be good in terms of increased audio quality and preparation/togetherness on my part. The day is Sunday the 14th, and the time translates into:

Vancouver: 11AM
New York: 2:00 PM
Buenos Ares: 4:00 PM
Belgum/Hungary: 8:00 PM

Join us in #drupal-dojo on IRC, and on skype #99001110017393450. You can also see my screen here.

The content of this lesson will be NodeAPI. Pre-reading documentation below the jump.

Helpful Links
* NodeAPI Spec
* PasteBin Example Code

Comments

Thanks for your time

joemoraca's picture

I was in the 2nd Lesson and picked up something I am going to use today. I also listened to the first and thought it was great. Again thanks for your time and I hope to keep learning more...

I think the setup you "hacked" together is pretty good.

Joe Moraca (aka srqhiker)
http://www.webdevgeeks.com

Joe Moraca
WebDevGeeks.com

From Buenos Aires... I´ll

Rosamunda's picture

From Buenos Aires... I´ll be there!
THANKS for the terrific work you´re doing here!!!

viva el BADUG

To convert this lesson to your own timezone...

lyricnz's picture

To convert this lesson to your own timezone...
http://www.timeanddate.com/worldclock/fixedtime.html?month=1&day=14&year...
6am Monday for me :/

Simon Roberts
Taniwha Solutions

Damn!

joshk's picture

Well, it just goes to show, you can't please all the people all the time. I suppose we've also got some potential interest from Russia, India, China, and Japan, and it's not a particularly friendly time for those areas either. Hopefully as this whole group solidifies, we can get other trainers working on the other side of the world. ;)

http://www.chapterthreellc.com | http://www.outlandishjosh.com

Ideas

joshk's picture

I have a couple ideas kicking around:

  • Drupal CVS and project.module: how to check out, how to roll patches, how to start a project, how to commit
    • Pros: seems like a lot of people want this and it's good and important to know
    • Cons: covering the installation of a CVS application is out of scope (too many options on too many systems) and depending on what app you use, my example may or may not be very useful.
  • NodeAPI: along with FormAPI, one of the most powerful and useful hooks for making Drupal do tricks.
    • Pros: this really is one of the most useful and powerful hooks in the system, and critical for grokking a lot of how Drupal works.
    • Cons: may be a little heady, only of interest to hardcore developers.
  • Drupal Overview: a wider "best practice" lesson that tries to cover every major aspect of the core system.
    • Pros: would have pretty good appeal
    • Cons: kinda boring for me; I sort of want to do this with a good script so as to make a great long-lasting screencast archive.
  • Great Contrib Modules: talk about popular contributed modules, how to use them/extend them to make a great site.
    • Pros: might open some eyes to some possibilities; important to know if you have big site dreams
    • Cons: could be hard to keep focused; might be better to do one module at a time

Any feedback on that? Any other ideas?

http://www.chapterthreellc.com | http://www.outlandishjosh.com

Let's drill down

victorkane's picture

My two cents:

I think group dynamics would be best suited by a drilling down approach, so I would go with the nodeapi option.

Just as the forms api rocked the very first session with some drilling down (and the success of the group shows that didn't hurt none), nicely balanced with the higher level of the last lesson, to "rock on" with the nodeapi will open all our eyes, even if we don't catch everything the first time around.

After all, many of us will have to go through everything a couple of times, and work with a concrete example, in order to "get" what has been covered up till now.

Then, the fourth lesson, I would dedicate to Contrib Modules mashups, which we haven't dedicated much time to even though requests for this figure prominently in the "Introductions" and "Dojo Projects" threads.

Then the fifth could be another drilling down of some kind, and then the sixth could be a "round up and review" merged with the "Drupal Overview" option.

Victor Kane
http://awebfactory.com.ar

good plan

shaal's picture

i like victorkane ideas for the next dojo sessions.

please make the files we're going to work on (like dojo.module, etc) -
available for us to download, we'll be able to follow with our own installation much faster,
and... it make our life a bit easier...
~:)

thank you!

CVS and Node API Sound Great

robeano's picture

I am definitely interested in learning about using CVS and NodeAPI. Maybe for the CVS, you can specify the client you will be using. That way if folks use a different client they can either skip that part or watch it and extrapolate to how they might use their own CVS client to do the same thing.

I agree with victorkane that the FormAPI coverage was helpful and I was happy to see some CCK too. Showing a couple of examples was a great way to show developers how to get started.

Thanks,

Robin
www.rufdesigns.com

Robin

Feedback on ideas...

karldied's picture

For me, I don't have much of a handle on what an Application Programming Interface (API) is. I'm comfortable with html and theming, but I get lost in the php trying to figure out how to extract the real name from the profile I've extended. I can do simple hacks on modules, but know that the right way is to use a hook and some other file.

I am very interested in

dami's picture

I am very interested in NodeAPI, also the new node access hooks in 5.x. Some intro/examples on module mash up is also very interesting. I don't see myself starting a project or commiting patches soon (for weeks to come), so CVS class seems a bit too early for me....

As for drupal overview, since we have talked about security, can we cover some of the performance issue? I heard some if not many people say 'drupal is slow, resource-hungary', is it really true or somewhat valid? Two modules are often mentioned in this regard, Search and Locale. Is it true that putting translations into database may not a good idea and making non-English drupal sites really slow? Along this line, I'd like to see some intro on drupal cache mechanism in future lessons. Also, is there any guidline on how to write efficient/fast code, any notoriously-known slow code, php or mysql queries, to avoid (this is more like a general mysql tutorial?).

I won't be able to make it to today's class, looking forward to the video and wikipage (thanks very much for Victor's efforts putting first 2 lessons notes together, much appreciated!)

some lesson ideas

lapur's picture

what a great lesson! thank you very much josh. thank you webavant for the video feed.

lesson requests / ideas:
1) cck vs writing a custom node. pros and cons. right now I'm making a node with 60 fields. issues include easy of making a mysql query, performance, theming, and upgrading.
2) theming cck. is it hard? I've heard it's hard. how to use contemplate is not obvious to me.
3) theming great, non-drupal sites. i like participate.net. a walk-through of that would be great.
(copied over from a lesson #2, where I had posted this before this thread opened up)

some lesson ideas

lapur's picture

what a great lesson! thank you very much josh. thank you webavant for the video feed.

lesson requests / ideas:
1) cck vs writing a custom node. pros and cons. right now I'm making a node with 60 fields. issues include easy of making a mysql query, performance, theming, and upgrading.
2) theming cck. is it hard? I've heard it's hard. how to use contemplate is not obvious to me.
3) theming great, non-drupal sites. i like participate.net. a walk-through of that would be great.
(copied over from a lesson #2, where I had posted this before this thread opened up)

CCK vs. Custom...Yes Please

robeano's picture

I'm interested in CCK vs. custom node pros and cons too.

Robin
www.rufdesigns.com

Robin

Logging in

karldied's picture

For newbies who are slow at how to log in like me, here is a summary:

Skype (audio):
Need account.
Log in with user name and password.
Use given phone number: +99001110017393450
Have to have the '+' in front of the number.

IRC (Colloquy/Miranda/unix for chat):
network: irc.freenode.net
channel: #drupal-dojo
Have to have the '#' in front of the channel name.

Web huddle (video):
http://www.webavant.com/vncviewer/
Had to give it permission for some certificate.
? had to log in over in the right pane?
Ignore the VIC Authentication field.
Just push the OK button with no code.

download files:
http://drupal.pastebin.us/11703 --> dojo.info
http://drupal.pastebin.us/11704 -->
http://drupal.pastebin.us/11705 --> dojo.module

awesome idea

texas-bronius's picture

so glad you're (we're) doing this-- so in the spirit of foss..
now that I am catching on, I will try to catch more the last 2 min!
Happy New Year all.