<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>prasath&#039;s Blog</title>
	<atom:link href="http://nprasath.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nprasath.wordpress.com</link>
	<description>welcome to my blog</description>
	<lastBuildDate>Mon, 04 Apr 2011 16:42:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='nprasath.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/88bb2d9446051fbb0119cc93408e87fd?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>prasath&#039;s Blog</title>
		<link>http://nprasath.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://nprasath.wordpress.com/osd.xml" title="prasath&#039;s Blog" />
	<atom:link rel='hub' href='http://nprasath.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Extending WordPress Web Services</title>
		<link>http://nprasath.wordpress.com/2011/04/04/extending-wordpress-web-services-abstract-wordpress-web-services/</link>
		<comments>http://nprasath.wordpress.com/2011/04/04/extending-wordpress-web-services-abstract-wordpress-web-services/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 16:18:00 +0000</pubDate>
		<dc:creator>Prasath Nadarajah</dc:creator>
		
		<guid isPermaLink="false">http://nprasath.wordpress.com/2011/04/04/extending-wordpress-web-services-abstract-wordpress-web-services/</guid>
		<description><![CDATA[Extending WordPress Web Services Abstract WordPress Web Services allow you to modify your blog remotely. WordPress supports XMLRPC And Atom protocols. Most of the clients use XMLRPC methods including WordPress mobile clients. However the current XMLRPC implementation have some limitation. The goal of this project to extend XMLRPC functionalities of WordPress. Benefits for WordPress and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nprasath.wordpress.com&amp;blog=12710575&amp;post=92&amp;subd=nprasath&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Extending WordPress Web Services</strong></p>
<p><strong>Abstract</strong><br />
WordPress Web Services allow you to modify your blog remotely. WordPress supports XMLRPC And Atom protocols. Most of the clients use XMLRPC methods including WordPress mobile clients. However the current XMLRPC implementation have some limitation. The goal of this project to extend XMLRPC functionalities of WordPress.</p>
<p><strong>Benefits for WordPress and clients</strong><br />
Additional features for clients.<br />
Reduce server load.<br />
Increased response time and reduced bandwidth usage for clients.<br />
Reduces redundant calls.<br />
All the features are backward compatible</p>
<p><strong>Project Goals</strong></p>
<p><strong>User Management</strong><br />
There is no methods to manage users via XMLRPC. Managing users using clients would be a very useful feature. There would be new user tab in my wp-android app <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . The proposed methods will allow only current user to manage user with a capability check. New users can&#8217;t register themselves because it will allow spammers to create mass accounts.<br />
Also its better if we have a method to get capabilities of the user when connecting at the first instance so we can validate capabilities at the client end. This will reduce redundant calls to the server.<br />
This is very important feature we need.</p>
<p><strong>Improved Search API</strong><br />
This has been addressed on tickets #6850and #16316. The current search methods imposed unnecessary burden to the server, A more generalized search API for all getters (posts, users, comments etc) will increase the performance of both client and server. The changes will only modify the getters to accept more argurements to be passed to the next method. So the amount of work here is very small<br />
Post/Pages &#8211; WP_Query class accepts a lot of parameters for querying post/pages. Modify the getRecentPosts methods to accept these parameters and pass it to the WP_Query. This includes retrieving posts by category,tag,date etc.<br />
Users &#8211; WP_User_Query class can be used to query users. These parameters will be passed through the new wp.getusers method. This includes retrieving users by roles etc<br />
Comments – Again WP_Comment_Query class can be used. wp.getComments will pass more paremeters such as author _email etc.<br />
There is also another option of separately querying using global $wpdb similar to getPageList.</p>
<p><strong>Custom Post Types Management</strong><br />
WordPress 3.0 gives you the capability to add your own custom post types and to use them in different ways.A generic API for managing posts would be beneficial include post, pages, nav_menu_items as well as user defined custom post types.<br />
Custom post type are not stored persistently. Managing custom post types want be desirable and many developers feel that way. So I&#8217;m dropping managing custom post types via xmlrpc. What would be desirable is that editing posts with already registered types. Abstracting the metaweblog API to support custom post types is useful.<br />
Same approach can be done for taxonomy management as well.</p>
<p><strong>Custom Taxonomy Management</strong><br />
WordPress 3 gives us fully hierarchical custom taxonomies. Managing custom taxonomies would using clients be awesome. Again custom taxonomies also not stored persistently. So I,m not supporting new taxonomies via xmlrpc. Same as custom post type a generic API for editing taxonomies is good as it includes categories, tags, post formats, nav_menus as well as user defined taxonomies.</p>
<p><strong>Managing Blog Options</strong><br />
There is only a few options that can be changed via xmlrpc. Its good to extend it to support more options. These options can be grouped as public and private. Some options must be exposed all registered users where as some must be exposed only who has the capability &#8216;Manage options.<br />
Considering backward compatibility we can introduced completely new methods which can acts as a gateway to get_options, update_options in the functions.php. Using these two methods any of the blog settings can be changed.</p>
<p><strong>Proposed New API</strong></p>
<p><strong>User Management</strong><br />
wp.newUser<br />
wp.editUser<br />
wp.deleteUser<br />
wp.getUser<br />
wp.getUsers</p>
<p><strong>Custom Post Types Management</strong><br />
wp.getPostType<br />
wp.getPostTypes</p>
<p><strong>Custom Taxonomy Management</strong><br />
wp.getTaxonomy<br />
wp.getTaxonomies<br />
wp.newTerm<br />
wp.editTerm<br />
wp.deleteTerm<br />
wp.getTerm<br />
wp.getTerms<br />
wp.setTerm</p>
<p><strong>Managing Blog Options</strong><br />
wp.getSettings<br />
wp.updateSettings</p>
<p><strong>Changes to the existing API</strong></p>
<p><strong>User Management</strong><br />
blogger.getUserInfo</p>
<p><strong>Custom Post Types</strong><br />
 metaWeblog.mewPost<br />
metaWeblog.editPost<br />
metaWeblog.deletePost<br />
metaWeblog.getPost<br />
metaWeblog.getRecentPosts</p>
<p><strong>Search API</strong><br />
metaWeblog.getRecentPosts<br />
blogger.getRecentPosts<br />
mt.getRecentPostTitles<br />
wp.getComments</p>
<p><strong>Security Checklist for methods</strong><br />
Login Checks<br />
Capability checks<br />
valid id checks</p>
<p><strong>Scope of the project</strong></p>
<p>The projects consist of 5 sections to be completed by midterm. The time line explains the schedule. At first glance the project may seem overly ambitious. Let me explain this with the first section of the project. The first section is to provide user management through XMLRPC.it has 6 functions to be completed within a week.<br />
I implemented the first function wp.newUser</p>
<p><a href="http://code.google.com/p/wp-xmlrpc-server/source/browse/trunk/wp-xmlrpc-server.php" rel="nofollow">http://code.google.com/p/wp-xmlrpc-server/source/browse/trunk/wp-xmlrpc-server.php</a></p>
<p>please note the coding approach. Like most the existing XMLRPC functions it uses a lot existing code. wp.newUser accpets relevant arguments do some checks and formatting and pass it to wp_insert_user in user.php.<br />
Most of the errors checking and formatting are done there and the results are caught and send back to the client. Querying directly from $wpdb is omitted whenever possible.<br />
It took me around 2-3 hours to implement the first function at the first go. I,m confident I can implement all 6 functions in one week which will take around 15-20 hours. Also with the learning curve the time may reduce. Same thing applies to the rest of the sections.<br />
After each attribute/function I test it with a client with possible use cases.Here is the client I use</p>
<p><a href="http://code.google.com/p/wp-xmlrpc-server/source/browse/trunk/Client/WPClient.java" rel="nofollow">http://code.google.com/p/wp-xmlrpc-server/source/browse/trunk/Client/WPClient.java</a></p>
<p>Possilbe test cases are listed here</p>
<p><a href="http://code.google.com/p/wp-xmlrpc-server/source/browse/trunk/#trunk%2FTests" rel="nofollow">http://code.google.com/p/wp-xmlrpc-server/source/browse/trunk/#trunk%2FTests</a></p>
<p>The project will be finished by midterm and I have 3 weeks for testing and 2 weeks for documentation. Though the suggested coding period begins on May 23rd most probably i will start coding before that.<br />
Considering these 5 sections i&#8217;m not convinced the scope of the project is too high and i&#8217;m confident that I can finish the project according to the schedule.</p>
<p><strong>Coding Approach</strong><br />
Most of the new API will take advantage of the existing WordPress API. Methods will act as gateway for accessing the existing API. This way repetition is code is omttted. Querying from the global $wpdb will be avoided as possible. The natural behaviour of WordPress core will be adopted.</p>
<p><strong>Testing and Documentation</strong></p>
<p>The following tools will be used for testing each methods<br />
Java Client built on Apache XML-RPC libraries<br />
Apache JMeter<br />
Apache TCPMon</p>
<p>First I checkout the trunk and a local installation will be made. Open the trunk with the IDE.<br />
After every method I will add test cases in the Java client and see whether I,m getting the correct response. TCPMon will be used to intercept the communication to see the request and response xml. In some case the request xml will be ok but the request will not be processed by the IXR Client accordingly(See this ticket #16980).<br />
JMeter will be used to loadtest the xmlrpc server to benchmark performance. If there are two options for implementing a particular method JMeter will used to record response time, accuracy etc and the results will be compared to take a decision.I,m familiar with all the tools mentioned above.<br />
All the methods will be completely documented and the existing methods also will be documented at the end of the project.</p>
<p>What have you done so far with this idea<br />
I have analyzed the WordPress codebase and identified the workflows for each methods. A very few methods lacks support from core API. I will add patch for that. I have shared the idea in wp-xmlrpc list. I got the following ideas from the list and added to the project<br />
Reduce redundant calls<br />
Omit methods for creating custom post/taxonomies since there are not stored persistently<br />
Method for event notification<br />
Merge mw_post and mw_newMediaObject</p>
<p><strong>Plugin theme or core</strong><br />
First I intend to create it as a plugin and later integrated to the core.</p>
<p><strong>Anticipated challenges</strong><br />
I have already completed my research part and identified the workflow of each methods. So no time will be spent on learning. Some of the challenges I see is abstracting metaWeblog methods to support custom post types. From my experience I know it want go well at first. But I consider it as a minor issue.</p>
<p><strong>potential mentors</strong><br />
Eric Mann has agreed to mentor me in this project. I have sent the draft proposal to him and got feedback on that. Eric mentioned to abstract the methods to support custom posts and taxonomies.</p>
<p>Thorsten Ott also agreed to co-mentor this project</p>
<p><strong>Schedule of Deliverables</strong></p>
<p><strong>Milestones and deliverables schedule</strong></p>
<p><strong>Community Bonding Period</strong><br />
Apr 25 – May 22<br />
Finalize the API. Develope Common functions to be used in the plugin. Plan the coding approach and abstraction of functions</p>
<p><strong>User Management</strong><br />
May 23 – May 29</p>
<p>wp.newUser<br />
wp.editUser<br />
wp.deleteUser<br />
wp.getUser<br />
wp.getUsers<br />
blogger.getUserInfo</p>
<p><strong>Custom Post Type</strong><br />
May 30 – June 12</p>
<p>wp.getPostType<br />
wp.getPostTypes<br />
metaWeblog.newPost<br />
metaWeblog.editPost<br />
metaWeblog.deletePost<br />
metaWeblog.getPost<br />
metaWeblog.getRecentPosts</p>
<p><strong>Custom Taxonomies</strong><br />
June 13 – June 26</p>
<p>wp.getTaxonomy<br />
wp.getTaxonomies<br />
wp.newTerm<br />
wp.editTerm<br />
wp.deleteTerm<br />
wp.getTerm<br />
wp.getTerms<br />
wp.setTerm</p>
<p><strong>Search API</strong><br />
June 27 – July 3</p>
<p>metaWeblog.getRecentPosts<br />
blogger.getRecentPosts<br />
mt.getRecentPostTitles<br />
wp.getComments</p>
<p><strong>Blog Options</strong><br />
July 5 – July 8</p>
<p>wp.getSettings<br />
wp.updateSettings</p>
<p>July 9 – July 10<br />
Release Alpha Version</p>
<p><strong>MID TERM EVALAUTIONS</strong></p>
<p>July 12 – July 25<br />
Testing with various use cases. Identify bugs and rework the code. Release beta version</p>
<p>July 26 – Aug 3<br />
Get feedback from the community and developers. Improve the code with possible additions</p>
<p>Aug 4 – Aug 15<br />
Documentation and final stable release</p>
<p>Deliverables<br />
First I intend to develop it as a plugin then integrate it into the core. This would be a series of patches for every methods mentioned above. I will upload it the trac and assist the progress. I,m expecting it would be in version 3.3 core.</p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nprasath.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nprasath.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nprasath.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nprasath.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nprasath.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nprasath.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nprasath.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nprasath.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nprasath.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nprasath.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nprasath.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nprasath.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nprasath.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nprasath.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nprasath.wordpress.com&amp;blog=12710575&amp;post=92&amp;subd=nprasath&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nprasath.wordpress.com/2011/04/04/extending-wordpress-web-services-abstract-wordpress-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a32bdc89f98cc7340723042d76cf1868?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prasath</media:title>
		</media:content>
	</item>
	</channel>
</rss>
