Archive for the 'Ning' Category

Yahoo! Pipes: Turning Pipes into Application

Posted in Ning, OpenLayers, Pipes on February 10th, 2007 at 20:29:19

So it seems clear to me that the Pipes application is a step in a really cool direction. I don’t know if there’s anything incredibly innovative in the idea of making programming easy, but Yahoo! has gone a long way towards the goals that other people have put into place. Ning thought that letting people code would be the way forward: give them a sandbox, let them copy paste, and they’ll build applications. The idea was right: there are a lot more people out there who want to be builders that aren’t. It turned out that the people who want to be builders didn’t have the skill level that they needed to build PHP code, even with mix/match and copy/paste.

Yahoo! Pipes is the followthrough on that idea: make it possible for people to take a set of input, and get a set of output, passing it through multiple filters.

The next step is obvious: Let people turn the filter settings into a web page, with the output being another web page. Search for all content 5 miles from a given Craigslist location: Take the user input as drop down boxes or something in an HTML form, and make the output a Yahoo! Map. Boom: you’ve turned everyone who can create a pipe into a web application builder. Stick ads along the bottom, and you’ve done one of the things that Ning tried to do: make money off applications in the same way that so many have made money off content.

I’m sure that Yahoo! already has this in mind, whether they’ve written about it or done it yet or not. It’s only a matter of time. It does make me wonder if someone could build something that did this without needing Yahoo! to do it… It seems like at the moment it would require altering a pipe on the fly, which I don’t see a way to do, so either there needs to be a further API, or we’ll all just need for it to get done 🙂

Update: Looking today, you can control the input of text inputs from the URL that you fetch the RSS with. This means that I can go ahead and build the pipe thingy for my own pipes as is. That’s pretty cool. I’ll show one with MetaCarta stuff on Monday.

Perhaps I’ll build an OpenLayers based Yahoo Pipe output viewer. It wouldn’t be that different from the GeoRSS viewer… but it would need a way to visualize non-Geo content. Ponder ponder.

Learning Letters

Posted in Ning, Python on February 8th, 2006 at 11:48:39

Julie’s at home these days – since we found out she’s deaf in one ear, we pulled her out of school to do more one-on-one learning at home.

She’s good at associating words with the visual representation of the letter – she’ll see “S”, and say “That’s what Sienna’s name starts with!” – but bad at names of letters. So, I hacked up a quick wxPython script from the wxPython samples that will just show an uppercase and lowercase letter, which she can click through. It’s basically a quick-and-dirty flashcard program: source available, of course.

Because I wanted to track her progress, I hacked up a little Ning App to track her learning. As of today, she only recognizes J (for Julie) and X on the first try. So, we’ll track it and see how she does. LearningLetters. 20 minute app, probably less. It’s crude, but it works.

It’s easy to make this work for just about anything you want to track. Just modify the ‘choices’ array.

Ning Components: XNC_Comment

Posted in Ning, PHP on February 3rd, 2006 at 08:03:59

A long time ago, when I first started working in the Ning playground, the first thing that impressed me about it was the fact that it had ready built components for so much *stuff*. Comments. Ratings. Flickr. Amazon. Calendars. Questionairres (Which is a very difficult word to spell right.)

Last night, after setting up X\_Query, I thought “hm, what if people want to comment?” And as I did, I remembered those components. I went into the developer documentation and looked up XNC\_Comment, which had a great, simple example of how to add comments to any content object.

But I didn’t have any content objects. The app is built as an API, so there was no need for Content Objects (at least not until I build up the documentation).

So I built a couple quick lines to add Content where I need it:

<?php
$d = XN\_Query::create(‘content’)->filter(“owner”)->filter(“type”, “=”, “Page”)->filter(‘title’, ‘=’, $\_SERVER[‘SCRIPT\_FILENAME’])->uniqueResult();
if (!$d) {
$d = XN\_Content::Create(“Page”, $\_SERVER[‘SCRIPT\_FILENAME’]);
$d->save();
}
?>

Once this is done, the $d is an object for the current page. Once you’ve done that, you can just slightly modify the example from XNC_Comment:

require\_once ‘XNC/Comment.php’;
$newComment = new XNC\_Comment($d);
// Handle any form submission of adding a new comment
if ($newComment->willProcessForm()) {
    
$newComment->processForm();
} elseif (
$newComment->lastError() != XNC\_Comment::ERROR\_FORM\_ABSENT) {
    print
$newComment->lastError();
}
// Display the add a comment form (unless it was just submitted and saved)
if ($newComment->canProcessForm()) {
    echo
$newComment->buildForm();
}
// Display a list of comments belonging to a parent object
if ($d->my->content($newComment->referenceAttribute,true)) {
    foreach (
$d->my->content($newComment->referenceAttribute,true) as $comment) {
        echo new
XNC\_Comment($comment);
    }
}

Now, you’ve got comments on any page you want! Just include these two chunks of code at the bottom of each page. This is one of the easiest things I’ve done. Now anyone can take these code snippets and use them in any Ning app. Hm… maybe the next step is to build a code snippets repository…

XQuery: Remote XN_Querys

Posted in Ning, Python on February 2nd, 2006 at 23:41:12

I said a while ago that the coolest part of Ning was the content store. I’m now working on a proof of concept to prove it.

So, there’s a bunch of Roshambo (Rock Scissors Paper) apps. Or at least a couple. Or at least two: Roshambo and Fifteen, my personal 15-option version.

So, I know that I’ve played a handful of games, and don’t want to scroll back through them. The app itself doesn’t offer an API itself, so there’s no easy way to get the data out, and I hate screenscraping.

So, I built a query app. XQuery. The homepage kind of documents what it can do so far, but it’s nowhere near done. It was just a one hour hack. Then I built the Roshambo Results Viewer. I also then extracted the logic into a simple Roshambo Python Script — usage ‘python roshambo.py crschmidt’.

Expect more to come of this.

MerriLUG and Ning

Posted in Ning, PHP, Social on November 18th, 2005 at 10:34:45

Attended my old Linux Users Group in NH last night: there was no scheduled speaker, so it was mostly just a “hang out and talk” type of meeting at Martha’s, in Nashua, NH.

Here’s a summary of how the meeting went from my point of view:

Had fun with all the MerriLUG folks last night. I also got to experience driving out of the Boston area during rush hour last night for the first time, which was significantly less fun.

Some things which were discussed:

* Results of the recent quarterly meeting, and location of the next one
* General questions on Linux:
** Why won’t my screen turn off when the computer goes into standby?
** How can I do load testing of MySQL and network traffic?
* Raffling off of books from Ken
* How Vendor/Client relationships are like teenage sex: They’re hormone driven and have no basis whatsoever in reality.

I also led some discussion on Ning. The reason I brought it up was in part because it is following the model of the open source world so much more closely than many other
services out there:

* Ning provides a “hosted” PHP framework
* All code, by default, is “open source” — can be viewed by anyone with an account.
* Users can “clone” applications: take the current application and customize it to their own liking from the same code
* Data is stored in a universal content store, and data is (by default) accessible to all applications across the server. So, my application “gnhlugbookshelf” can also read from the “restaurantreviewswithmaps application
* Income comes in via advertisements sold on the sidebar of the applications, as well as premium services (more space, removal of view source links, and the like)

Most of the time when this is described, it’s described as an “experiment” – can a company make money solely off ads to run their servers? Can premium services pay for all this? My experience with LiveJournal says yes: LiveJournal makes all its money off premium services (no ads), and they gross several million a year. However, their employees are paid much less than Ning’s are, so who knows.

I also mentioned the creation of GNHLUG Bookshelf, an application which “aims to store the suggestions and recommendations of the New Hampshire Linux Users Group on technical books that are the most useful of the bunch.”

Lots of interesting discussion on the business model behind Ning, where it could go from here, and how service is really where the money is these days. Give away the code: sell the service. RedHat learned from this model, and others are doing so too – Ning is simply a widescale demonstration of “give away the code”.

There are aspects of Ning which aren’t given away: the code that runs the playground itself is not open source, but the applications that run on it are. The “secret bits” are still probably important enough to Ning that open sourcing would give away a competitive advantage, but the PHP bits aren’t, since they’re easily reproducible.

Another thing that came up is how much control you have over code you write for Ning and taking it elsewhere. This is a question that has come up in developer discussion before, about how to take your application code elsewhere. What it comes down to is that Ning provides a lot of functionality: shared content store, tagging, user auth, etc., that doesn’t exist anywhere else. There’s no clone of the functionality which you can drop in and replace with something else. There’s nothing to stop people from mirroring the API and creating a way to drop Ning apps into your own webserver, it just hasn’t been done yet. So although you can take the code with you – you own it – it doesn’t do you much good without a lot of work to reproduce the functionality that Ning already provides for you.

Find A Developer

Posted in Ning on October 16th, 2005 at 03:12:34

Ever heard of Rent-a-Coder? Post a project and a bounty, and grab the next person who comes along. Like so many great apps, it’s now got a Ning equivilant: Find-a-Developer.

I’ve been playing with this app, and I can honestly say that it is the best architected web application I’ve seen in a long time. Links where I need them, when I need them, without me needing to think about them. I don’t need to look through navigation or search through mystery-meat menus: everything just flows so nicely.

The only problem I have with the app so far is that there are so few Ning developers. I know there are more people than just me out there who are interested in working on Ning, and feel they’d be up to it. The challenge isn’t that hard: get some code together, knock out an App (or link to some older projects) and get going!

Also, there’s the use case for someone who’s not a developer: the kind of people who want to get something done on Ning, but have more cash than time to throw at it. As you can see from Gina’s example, it’s easy to set out what project you want people to work on. Think you can tackle her request? Just drop her a message via the interface. But before you do, you might want to throw a profile together, just in case.

As with all apps on Ning, Find-a-Dev is clonable. Don’t want to work on Ning, but have a desire to set up a Python marketplace? Clone it, change some words, and you’re off. Want to create your own marketplace for knitting services and projects instead? Go for it.

Want to set up a marketplace for bodyguard services — but don’t think you have the PHP code for it? Well, a great place to start would be to post your idea to find-a-dev, and get some people interested in it. After all, there’s probably lots of people out there looking to help write some code for you — you just need to meet and interact. What more perfect playground to find them in than Ning?

(Meta-info: I had a bug in my RSS feed, so the past two entries were delayed. You’ll probably see three updates at once: sorry about that.)

PeopleFinder

Posted in Geolocation, Mobile Platform, Ning, Python, Symbian Python on October 14th, 2005 at 10:23:43

In my spare time (hah!) I’ve been hacking on an app on Ning, called PeopleFinder. The goal is to be a geolocation app, supporting a variety of things social. One of my many goals for a long time has been to create and use some kind of tool which allows me to generate MeNow data with no effort.

I’ve finally got it.

With the help of Geocoder, I can now type in an address, and have it automatically update my location on the website, including showing my position on a GMaps interface. The PeopleFinder API is still a bit weak, but using it, I can write a Client for Series 60 Python, which allows you to update via a GPS lat and long, or via an address.

I’ve created a token system for authentication via the API — when logged in, you simply hit the token link, grab the token, and put it into the client (in the “token” variable).

Eventually, once I write the functionality, it is my hope that I will be able to provide more features via this API — the ability to look for people nearby you, get their information, send them messages, and so on. However, right now this is just a 2-3 hour hack, and I’ve got piles of work to do – but this is so cool I had to share it.

As far as I know, this is the first example of a Ning App exporting a semi-usable API to remote clients. In part, this may be due to previous limitations on Ning’s end which have recently been resolved: looking at the phone client code, you’ll see the ?xn_auth=no parameter, which allows you to skip cookie authentication. It’s a pretty nice solution to the problem in my opinion — it solves what I need while not interfering with the rest of Ning.

So grab your phone, grab a client, and update your address on the go — then, the next time I see you in the neighborhood, I’ll drop by and give you a wave.

Hey! I was blogged!

Posted in default, Ning on October 14th, 2005 at 01:26:12

Today I did some work improving one of the Ning example apps, making it work faster, better, stronger. The app is Bookshelf, and it’s a ton of fun to watch. Basically, users add books (via the Amazon API), rate them, and comment on them.

Some aspects of the app were running way too slow, since it was designed and tested when the system was under no load at all, a situation which makes load testing very difficult. I won’t go into the technical details, but the long and short of it is that I took the book adding process and quartered the time it takes.

Apparently my changes were important, since Gina blogged about it. Although I’ll admit I had no idea who Marion Jones was until I Googled it, it sure made me feel special.

Gina also passed along the good news to me that helping out other projects in the free time I’ve got isn’t a problem from her end – so long as Ning projects come first. So, if you have interest in working to get an app running on Ning, but don’t have the spare time to learn all the ins and outs, feel free to drop me a line.

This is such a freedom after my last job, where doing any work outside the company was considered treason. It simply reassures me, yet again, that taking the job working for Ning is the best thing that has happened to me since I have left school — I’m working on fun projects, in a forward-looking environment, with great people, and a great management team above it all. While wedu is busy building the next version of We Don’t Get The Web, I’m helping to build the future, and I’m having the time of my life doing it.

Now to get some of my other apps up to snuff: a recent change in the core means that I can get access to pages without the use of cookies, which means it’s time to write that location updater client for my cell phone.

Updates as they come!

Ning Aggregator

Posted in Ning, PHP, Web Publishing on October 6th, 2005 at 04:10:39

Most of my work on Ning thus far has been in editing other apps, a large portion of it in testing and QA work. Since the launch, I’ve been taking a couple days “off” — still playing with ning, but at my own pace rather than at a “Almost time to release” pace.

Today, I built my first complete and clonable app from scratch.

Planet Ning is a planet style aggregation tool, supporting RSS 2.0 fields and the ability to rate any RSS item. This app took a total of about 1.5 hours to put together, a large part of that simply playing with design to get it to look semi decent. It uses the RSS alpha component for RSS parsing, XNC_HTML for the page bottom navigation, XNC_Rating for ratings, and the “bot” option to load new posts.

Pretty cool little app. One spot of trouble I ran into: XNC_Rating is designed to have only one form field per page. I overrode just one function to fix it though, testament to the flexibility of the code behind some of the XNC components. This is also a testament to Object Oriented code, and PHP 5 in general: in PHP4, I’m sure this would have been much harder, but PHP5’s exceptional class support, along with exception handling, make it so much more fun to work with than PHP4 was for me.

You can feel free to clone the app and play with it: it’s not ‘complete’ by any means, but it definitely works.

Build Your Own API Support

Posted in Ning, Social, Web Publishing on October 5th, 2005 at 18:12:39

I noticed someone had said Marc Canter wrote about Ning. I think that he may have missed an important part of what Ning is about, though.

Why?

Well, let’s start from the top:

I’m pleading with Gina Bianchini to have Ning PLEASE support the PeopleAggregator APIs once it’s out – and I don’t see any reason why she won’t.

No longer does the “Someone else needs to do it” mentality need apply: Applications on Ning are open source. Code can be mixed, cloned, and run any way you want to — including a way to load files and modules from other applications! So, if you have an API you want to support, support it: just develop it and let people know to use XN_Application::includeFile(), document it for ning users, and you can develop your API for whatever you want and have other users use it.

So, once the API for the website you’re talking about is complete — write some code, and put it on Ning, then get people to use it. That’s what Ning is about: Sharing, putting things together, and bringing “View Source” back to the people. This is your chance to make good on something web browsers learned that Macromedia never has: the ability to look at the way something works inside is a huge boon to development, as I think we’ll see as time goes on.

Of course, there’s also the question of whether Canter still believes that Andreesen: sure as hell hasn’t done shit since – what 1995? 😉