Rethinking Feeds/Categories and Private Pages

17 views
Skip to first unread message

Paul Stovell

unread,
Jan 16, 2011, 7:51:08 PM1/16/11
to funnel...@googlegroups.com
I think there's an opportunity to simplify a lot of FunnelWeb concepts by making a few design changes. 

I think there are three "states" a page can be in (these are the best names I can come up with):
  • Private - you're composing it, but only logged in users can see it
  • Public Page - anyone can see it, but it doesn't appear on the Recent page or in RSS feeds
  • Public Blog Post - anyone can see it, and it appears on the Recent page and in RSS feeds
Suppose we implement those three states in FunnelWeb, so that when editing a page, you choose the state from a list of radio buttons. 

Next, we change the 'feeds' feature to be called 'categories'. You tick the categories the page (not the revision, as its currently implemented) is associated with. You can consume the site-wide RSS feed (all public blog posts), or a category-specific feed, using the existing URL format.

Finally, we change the RSS feeds and /Recent lists to just select from Published entries and order by PublishDate, rather than any kind of feed silliness. 

I think it would simplify all the issues we have around dates, and makes it easier to understand what's going on. 

The one feature we would lose is re-publishing an old page in the feed. But realistically, you can achieve the same effect just by changing the PublishDate anyway. And in a year and a half of using FunnelWeb, I never used that feature anyway :)

I'm keen to take a crack at this and bring FunnelWeb more in line with normal blogging engines. 

Paul

Matt Hamilton

unread,
Jan 16, 2011, 7:58:43 PM1/16/11
to funnel...@googlegroups.com
+1. This.
 
This is actually much more in line with how Graffiti handles posts and pages.
 
How hard will this be, Paul? A lot of it is just terminology changes but I’m guessing there’s at least one database upgrade in there too.

Andrew Tobin

unread,
Jan 16, 2011, 7:59:14 PM1/16/11
to funnel...@googlegroups.com
Why use categories instead of tags that would already be on the post, and do some type-ahead, or drop-down/checkbox scenario for existing tags?

Just thinking you could do a RSS feed based off any particular tag, or a tag-search page, etc.

Aaron Powell

unread,
Jan 16, 2011, 8:00:55 PM1/16/11
to funnel...@googlegroups.com
Interesting thought, why not make the feeds come out as OData, so you can just provide people a query for a feed of a particular category, so Umbraco posts would be /feeds/?category=Umbraco

That will allow you to have combination feeds (Umbraco & Orchard), and other cool stuff
Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com

Paul Stovell

unread,
Jan 16, 2011, 8:01:38 PM1/16/11
to funnel...@googlegroups.com
Great point, it would definitely be nice to not have Feeds/Categories + Tags - we could implement a tag selector like this:


When you use a tag that didn't exist before, we could dynamically create the tag record. 

Paul

Aaron Powell

unread,
Jan 16, 2011, 8:03:10 PM1/16/11
to funnel...@googlegroups.com
StackOverflow style ;)

We'll have to have a migration step in this to update all existing posts

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Paul Stovell

unread,
Jan 16, 2011, 8:03:36 PM1/16/11
to funnel...@googlegroups.com
Definitely a database upgrade, though it should be possible to do without breaking anything. I don't think it would be a *huge* amount of work, I can probably do it tonight. 

Paul

Paul Stovell

unread,
Jan 16, 2011, 8:04:52 PM1/16/11
to funnel...@googlegroups.com
Yep. Our migration could even look at your existing keywords (which are kind of tags), split them out, and create and populate the Category records, so you don't have to edit any old posts. 

Paul

Aaron Powell

unread,
Jan 16, 2011, 8:05:12 PM1/16/11
to funnel...@googlegroups.com
Just need to string-split the current categories, then map them into a new table. Think you can do it entirely in SQL :P

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Aaron Powell

unread,
Jan 16, 2011, 8:57:34 PM1/16/11
to funnel...@googlegroups.com

Matt Hamilton

unread,
Jan 16, 2011, 9:05:54 PM1/16/11
to funnel...@googlegroups.com
Cool. So you’re thinking we have a TagController so we can visit /tag/foo and see all the posts tagged with “foo”?
I guess in terms of feeds we keep the FeedController, and where we’re currently passing a “feedName” to the Feed method (to get to a given feed) we’d be passing a tag instead. So the feed for posts tagged with “foo” would be at /feed/foo. Does that sound about right?

Aaron Powell

unread,
Jan 16, 2011, 9:08:08 PM1/16/11
to funnel...@googlegroups.com
Not quite, that controller is for the internal workings of FunnelWeb, how you do a lookup of the autocomplete and stuff

As I said before (and maybe i should create a new thread) I think the feed should be OData

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Paul Stovell

unread,
Jan 16, 2011, 9:10:05 PM1/16/11
to funnel...@googlegroups.com
I'm not familiar with odata, I'd like it if you could explain more.

So in your change set, how far along are you? I was just writing some SQL scripts to create the new tag tables, but if you've already made a start...

Paul

Matt Hamilton

unread,
Jan 16, 2011, 9:11:57 PM1/16/11
to funnel...@googlegroups.com
Ah right. Yeah, surfacing the posts as OData feeds (which are just ATOM feeds anyway), makes total sense. Heck, if it was an updatable feed then we’d have an API right there.

Aaron Powell

unread,
Jan 16, 2011, 9:12:15 PM1/16/11
to funnel...@googlegroups.com
I've just written out a series of test scenarios and a stub repository interface.

No persistance or UI started

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Paul Stovell

unread,
Jan 16, 2011, 9:44:28 PM1/16/11
to funnel...@googlegroups.com
OK, here's a SQL script that will be part of the migration (there's a second part to drop the current columns, but I'll do that later)

I just ran it over a backup of PaulStovell.com and it seems to work OK. Can you run it over a backup :) of your databases and see how it behaves?

(You can get a backup from the StudioCoast database page)

Matt Hamilton

unread,
Jan 16, 2011, 9:45:59 PM1/16/11
to funnel...@googlegroups.com
I have a backup at home so I can give it a try tonight.
 
Sent: Monday, January 17, 2011 1:44 PM

Paul Stovell

unread,
Jan 16, 2011, 10:03:33 PM1/16/11
to funnel...@googlegroups.com
Just updated the script at that gist to include dropping the tables/columns, and building a "tag cloud" - here's mine:

wpf 59
magellan 38
mvc 13
navigation 10
mvvm 9
silverlight 8
binding 7
.net 6
c# 6
visual-studio 4
patterns 3

Matt Hamilton

unread,
Jan 17, 2011, 2:29:11 AM1/17/11
to funnel...@googlegroups.com
Script ran successfully! I’d post my tag cloud but this was a backup I took quite some time ago when there were only ~8 posts. It was definitely an up to date version of the database schema though.
 
Matt

Paul Stovell

unread,
Jan 17, 2011, 2:49:24 AM1/17/11
to funnel...@googlegroups.com
Great. I added some changes for the 'status' column on entries now, and most of the app is working. Should be able to check in shortly :)

Paul

Matt Hamilton

unread,
Jan 17, 2011, 2:53:37 AM1/17/11
to funnel...@googlegroups.com
Deploy somewhere so we can see! Either FWHQ or your own site?

Aaron Powell

unread,
Jan 17, 2011, 3:58:45 AM1/17/11
to funnel...@googlegroups.com
How goes the unit tests I wrote, they all passing ;)

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Paul Stovell

unread,
Jan 17, 2011, 4:03:35 AM1/17/11
to funnel...@googlegroups.com
Nope. There's no such thing as a 'TagController' in my version :)

Aaron Powell

unread,
Jan 17, 2011, 4:04:03 AM1/17/11
to funnel...@googlegroups.com
So you're not having an auto-complete for the tags?

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Paul Stovell

unread,
Jan 17, 2011, 4:06:00 AM1/17/11
to funnel...@googlegroups.com
Not yet, main focus was just to get it working (which it does), then spice it up later. 

Aaron Powell

unread,
Jan 17, 2011, 4:07:11 AM1/17/11
to funnel...@googlegroups.com
That's what the controller was for :P

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Paul Stovell

unread,
Jan 17, 2011, 4:14:21 AM1/17/11
to funnel...@googlegroups.com
Alright, I've just pushed this. 


You can see a list of tags appearing under my posts. They're hyperlinks, but they don't go anywhere yet. 

Capture.PNG

They also appear on the post for the page:

Capture.PNG

When you edit a page, you still type them in as comma, semi-colon or space seperated:

Edit.PNG


Note that this means:

  • Tags can't have spaces - they have to be dashes
  • They'll be converted to lowercase
  • They can contain other symbols, like #, but we'll have to make sure we url encode them properly
When you run the database upgrade script, this happens for you automatically

Lastly, when you write a page, you get to control the access level:

Capture.PNG

Private pages are still public - I'll fix that shortly. But pages that aren't Blog Post won't appear in the feed.

Paul
Edit.PNG
Capture.PNG
Capture.PNG
Capture.PNG

Matt Hamilton

unread,
Jan 17, 2011, 4:19:11 AM1/17/11
to funnel...@googlegroups.com
That’s a great start! Will the tags eventually link to a page that lists all posts with that same tag? And I imagine that page would be serving up a feed.
 
Coming along very nicely!
Capture.PNG
Capture.PNG
Edit.PNG
Capture.PNG

Paul Stovell

unread,
Jan 17, 2011, 4:27:42 AM1/17/11
to funnel...@googlegroups.com
Dare you to deploy it to your site :)

Paul

Matt Hamilton

unread,
Jan 17, 2011, 4:39:03 AM1/17/11
to funnel...@googlegroups.com
Do you double dare me?

Aaron Powell

unread,
Jan 17, 2011, 5:33:14 AM1/17/11
to funnel...@googlegroups.com
So any issue merging in the branch and starting on an autocomplete now?

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Paul Stovell

unread,
Jan 17, 2011, 8:09:55 AM1/17/11
to funnel...@googlegroups.com
Nope - go right ahead. I won't be doing any work on FW tomorrow :(

Paul

Aaron Powell

unread,
Jan 17, 2011, 8:22:35 AM1/17/11
to funnel...@googlegroups.com
Oh noes, are you going to have to do client work? How rude :P

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Paul Stovell

unread,
Jan 17, 2011, 8:28:15 AM1/17/11
to funnel...@googlegroups.com
Yeah, I think my free ride here is coming to an end :)

Matt Hamilton

unread,
Jan 18, 2011, 6:21:37 PM1/18/11
to funnel...@googlegroups.com
So what are our plans in terms of making the tags link to a list of posts, and having tag-specific feeds?
 
Do we reuse the WikiController’s Recent method such that it takes a tag name and produces a page the same as the home page except just for posts with that tag? I don’t know what the route would be, but perhaps something like /tagged/foo to show all posts with the “foo” tag.
 
Likewise the FeedController’s Feed method could take a tag name too, giving us a route like /feed/foo to show an ATOM feed for all posts with the “foo” tag.
 
That would keep things simple, but perhaps you guys had something else in mind, like putting all that logic into the TagController and having special routes like /tag/foo/recent and /tag/foo/feed.
 
It’d be interesting to allow the tag name parameter to be a space-separated list. You could subscribe to the /feed/comicster+halfwit feed to get news just on those projects.

Aaron Powell

unread,
Jan 18, 2011, 6:26:28 PM1/18/11
to funnel...@googlegroups.com
I was thinking that /feed/tag will return you a feed for that tag.

We could build a simple DSL down the track like so do:
/feed/+umbraco/-orchard/+mvc
And then have basic tag queries

The /tag/* route will be internal only and used for the autocomplete IMO.
Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Matt Hamilton

unread,
Jan 18, 2011, 6:29:15 PM1/18/11
to funnel...@googlegroups.com
That sounds great then. The DSL for tag queries would be a nice addition too.
 
How about viewing lists of posts for a given tag? Does /tagged/<tag name> make sense as the route?

Aaron Powell

unread,
Jan 18, 2011, 6:31:35 PM1/18/11
to funnel...@googlegroups.com
Hmm yeah I guess it does

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Paul Stovell

unread,
Jan 18, 2011, 8:37:49 PM1/18/11
to funnel...@googlegroups.com
I like /tagged

Miguel Madero

unread,
Jan 18, 2011, 11:29:50 PM1/18/11
to funnel...@googlegroups.com
I think it woudl be nice to use the same route for the Html and the feed just with a different extension since they essentially represent the same resource.
 
tagged/foo
tagged/foo.rss
tagged/foo.atom
 
That's the approach the Rails take and it makes sense.
--
Miguel A. Madero Reyes
www.miguelmadero.com (blog)
m...@miguelmadero.com

Matt Hamilton

unread,
Jan 18, 2011, 11:32:08 PM1/18/11
to funnel...@googlegroups.com
That does make sense, except what happens if a user defines a tag called foo.rss? That’s a legal tag AFAIK. Something to ponder anyway.

Aaron Powell

unread,
Jan 18, 2011, 11:40:45 PM1/18/11
to funnel...@googlegroups.com
Disagree, cuz where would you're "master" feed sit at? /tagged/ or something?

/feed/tagName makes sense to me as you're looking for a feed which is tagged in a particular way.

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Matt Hamilton

unread,
Jan 18, 2011, 11:49:23 PM1/18/11
to funnel...@googlegroups.com
Another good argument against.

Miguel Madero

unread,
Jan 19, 2011, 12:24:29 AM1/19/11
to funnel...@googlegroups.com
What about tag/feed instead of tag.feed?
 
tagged/foo/feed
 
That keeps it consistent with the master feed, not sure if foo/feed is a valid tag name. Also, I woudl like to subscribe to pages. I don't think that feeds should be unique to tags. For example, in some wikis I'm subscribing to pages and sub-pages and then they send diffs with the changes. Good example is I want to subscribe to the projects or presentations, but I don't care about blog posts.
 
So a bunch of Urls
myblog.com/feed     <-- master
myblog.com/projects/feed    <-- feed for a page
myblog.com/tagged/foo/feed   <-- feed for a tag
myblog.com/tagged/foo+bar/feed   <-- feed for a set of tags
Reply all
Reply to author
Forward
0 new messages