st4u
ST 4U 113: Building Our First Component in Seaside
July 29, 2011 7:37:14.523
Today's Smalltalk 4 You continues the VA Smalltalk Seaside tutorial with the first visual component for the blog server application. You can download the initial domain model as a file out here. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:
.
If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.
You can also watch it on YouTube:
Today we'll start building the first component that will make up the main entry point for our Seaside application. Before we can get started, we need to create an open edition of our application:
Once you've done that, you'll see that the latest edition has a timestamp rather than a version - that shows that it's open (i.e., it can be modified):
Next, we'll create a new subclass of WAComponent, and call it BlogServerView. This class needs two instance variables - listComponent and menuComponent. We'll set up the #initialize method to work with two additional components that we'll also create - BlogListView and BlogMenuView. Seaside uses component based assembly, so we proceed as follows: create a container view, which in turn will hold references to all the views that need to render within it.
The #initialize method looks like this:
initialize "set up our basic components" super initialize. listComponent := BlogListView new. menuComponent := BlogMenuView new.
At this point, you should also have defined two other subclasses of WAComponent - BlogListView and BlogMenuView. The first of these (BlogListView) needs one instance variable, entries. With that all done, we can get to the rendering part - #renderContentOn: in BlogServerView:
That code looks like this:
renderContentOn: html html heading: 'Simple Blog Server'. html div class: 'menu'; id: 'menuid'; with: self menuComponent. html div class: 'list'; id: 'listid'; with: self listComponent.
We need one more method - typically an #initialize method on the class side of the main view class. In this case, we'll add it to BlogServerView, and then execute the comment:
initialize "BlogRootUI initialize" WAAdmin register: self asApplicationAt: 'blogView'.
With that done, bring up a web browser and navigate to the port you are running the server on (8080 if you took the default):
Notice the new link to blogView? Click that, and you should see the following:
That wraps it up for now. In the next section, we'll take a look at building out the sub-components
Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.
Technorati Tags: smalltalk, va smalltalk, seaside
Enclosures:
[st4u113-iPhone.m4v ( Size: 5996855 )]
comments(0) | permanent link | printer friendly | del.icio.us | diggIt | next | prev
js4u
JS 4U 77: More on Slide Down
July 28, 2011 8:33:34.701
Today's Javascript 4 You. Today we continue looking at slideDown() in JQuery. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. Join the Facebook Group to discuss the tutorials. You can view the archives here. |
To watch now, click on the image below:
If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.
You can also watch it on YouTube:
Technorati Tags: javascript, jquery, tutorial
Enclosures:
[js4u77-iPhone.m4v ( Size: 1666376 )]
comments(0) | permanent link | printer friendly | del.icio.us | diggIt | next | prev
smalltalk
Who Looks at Smalltalk?
July 27, 2011 20:49:34.561
interesting thoughts on who took what ideas from Smalltalk, from Bruce Badger
comments(1) | permanent link | printer friendly | del.icio.us | diggIt | next | prev
smalltalk
The VisualWorks GUI Framework Explained
July 27, 2011 8:24:22.000
In a message to the vwnc mailing list, Travis Griggs has laid out the best explanation of how the VW UI works that I've ever seen - shedding light on the good, the bad and the ugly.
Technorati Tags: visualworks, wrapper
comments(1) | permanent link | printer friendly | del.icio.us | diggIt | next | prev
st4u
ST 4U 112: A Domain Model for the Seaside Tutorial
July 27, 2011 8:37:04.198
Today's Smalltalk 4 You continues the VA Smalltalk Seaside tutorial with a domain model that we'll be using for the tutorial. You can download the code as a file out here. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:
.
If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.
You can also watch it on YouTube:
Today we'll continue with the Seaside tutorial using VA Smalltalk. To start, download this file - it's a file-out of the base application we'll be using in this tutorial. It contains the basic domain classes we'll be using:
Before we can start building the Seaside part of this application, we need to examine the application. If SeasideComponentApp is not a pre-requisite, then the class
Now you'll just need the domain classes in the linked file above - BlogStorage, BlogPost, and BlogUser. To keep things simple, we'll be storing posts in a class variable collection in BlogStorage. That's so that we can concentrate on the Seaside part of things rather than anything else:
In the next section, we'll start in on the first view component.
Need more help? There's a screencast for other topics like this which you may want to watch. Questions? Try the "Chat with James" Google gadget over in the sidebar.
Technorati Tags: smalltalk, va smalltalk, seaside
Enclosures:
[st4u112-iPhone.m4v ( Size: 3893211 )]
comments(0) | permanent link | printer friendly | del.icio.us | diggIt | next | prev
gadgets
So Much For Insanely Great
July 27, 2011 0:19:31.780
Apple has always been about profit margin, but it used to be the case that they were also all about the user experience. Now that they are enforcing the "no link to outside stores" rule, they are all about a worse customer experience.
Someone ask Jobs this: do you really think that the extra margin you'll get from this rule will outweigh the irritation experienced by end users who suddenly have a less useful device with crappier features?
Technorati Tags: apple, stupidity
comments(2) | permanent link | printer friendly | del.icio.us | diggIt | next | prev
js4u
JS 4U 76: Slide Down with JQuery
July 26, 2011 7:38:05.572
Today's Javascript 4 You. Today we'll take a look at the slideDown() function in JQuery - you can gradually slide content on a page instead of fading. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. Join the Facebook Group to discuss the tutorials. You can view the archives here. |
To watch now, click on the image below:
If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.
You can also watch it on YouTube:
Enclosures:
[js4u76-iPhone.m4v ( Size: 1369613 )]
comments(0) | permanent link | printer friendly | del.icio.us | diggIt | next | prev