. .


Smalltalk Daily 08/17/10: A Blog Server in WebVelocity

August 17, 2010 11:14:49.532

Today's Smalltalk Daily builds a simple Blog Server in WebVelocity 1.1 - 3 methods and 5 minutes. To jump to the video now, click here. Or, if you want to view the video on YouTube, go here.

The code I added is:


renderActionsOn: html

	super renderActionsOn: html.
	html button
		class: #comment;
		callback: [self addComment];
		with: 'Comment'.

	| comment |
	comment := Comment new.
	(self call: (CommentEditUI on: comment)) ifTrue:
		[comment bePersistent.
		object comments add: comment.
		object commitUnitOfWork]


renderDetailsOn: html

	| sorted |
	sorted := SortedCollection sortBlock: [:a :b | a created >= b created].
	sorted addAll: self objects.
	sorted do: [:each |
		html anchor 
			callback: [self call: (PostViewUI on: each)]; 
			with: each title. 
		html text: ' -- ', each created printString.
		html paragraph: [html text: each content].
		html horizontalRule]

Click on the viewer below to watch it now:

You can follow the Smalltalk channel on YouTube for all the "Smalltalk Daily" videos. You can also check out the videos on Vimeo, where the quality is higher, or over on Facebook, if you are a member.

You can download the video directly here. If you need the video in a Windows Media format, then download that here. If you like this kind of video, why not subscribe to "Smalltalk Daily"?

Technorati Tags: , , ,

posted by James Robertson

 Share Tweet This