ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pear-dev
pear-dev
[PEAR-DEV] proposal, Services_Blogs
by Till other posts by this author
Nov 26 2006 7:54AM messages near this date
[PEAR-DEV] Back of PPFM user guide - available now | Re: [PEAR-DEV] proposal, Services_Blogs
Hi everyone,

my name is Till, I am Berlin-based (Germany) and here is my proposal
for what I call "Services_Blogs". :-)

I talked to a couple people on #pear@efnet before and from the
feedback I felt this would be a good addition to the PEAR repository.

*What is the objective of my class?*

The objective is to offer a unified API to create a post on a blog and
to support all the different blogs out there.

To make posting a bit easier, the class also supports getting a user's
blogs - for example if he fills multiple.

An example for a complete posting process (if no data is cached
locally in the app) would be a two stepper. Step #1 would be to get
the user's blogs and step #2 be choosing one from the list and then
submitting the post.

*What type of blogs are supported?*

Currently, the class supports Movable Type, blogger.com, Wordpress,
Lifejournal, Blogspiriti, Drupal's Blog module, Dotclear, Friendster
and Typepad. I'll be working on others as I run into them. ;-)

*Structure*
The class has a hub, which is used on initialize it. The containers
for the different "types" (of blogs) are then checked (and included)
and the object is created.

Ideally I would install the hub through PEAR and then one would need
to install the containers for the different blogs - just like MDB2
works for different databases.

*Why have so many different containers?*

Well, from my experience blogs can be a bit flakey (read tricky) even
if they actually use the same API (e.g. MetaWeblog). Most have their
distinct quirks which is why I decided to break them up into
containers.
In order to not dupe code in the containers, the hub class provides
all methods so just the workflow of how to get there (= how to get
your post on your blog) is done in the container for the blog type.

This release can be considered at least a bit "hacky" since e.g. it
die()'s if it doesn't find an extension it wants to use (e.g. I am
using iconv to probably UTF-8 encode). I'll work on that and see what
other packages use in those cases and probably add some dependencies
to other PEAR packages.
So even though I know about those, I am of course very open to every
suggestion anyone might have.

*The goodies!*
Talk is cheap - so here we go.

This is a test page which enables you to post a test to your blog (I hope):
http://dev.lagged.de/Services_Blogs/test.php

(No, I do not log anything done on there.)

If you want to get the code, grab it here:
http://dev.lagged.de/Services_Blogs/2006-11-22.Services_Blogs.tar.gz


To move forward, I hereby request an account (login: till), so I can
move my proposal to PEAR's website. If anyone has any objections,
please let me know. Otherwise I will fill in the form tomorrow on the
website. :-)


Best regards,
-- 
Till Klampaeckel
e: mailto:klimpong@[...].com
p: +491704018676
l: http://beta.plazes.com/whereis/till

Want to know what's up in Berlin?
- http://berlin.metblogs.com

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Till
Christian Weiske
Till
Christian Weiske
Till

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved