Joachims Small World

Seaside 3.0 and Cancel Buttons

März 5, 2010 · Hinterlasse einen Kommentar

You can add a Cancel Button to forms in Seaside by using the WACancelButtonTag. The code snippet to do so is:

renderContentOn: html
  html form: [
    html textInput....
    html cancelButton
      callback: [];
      with: 'Don't change anything'.]

Seaside does register the action callback for a cancel button with a very high priority (-5, to be exact), which makes sure the cancelButton’s action callback is executed before all the value callbacks in your form get executed.

But be careful: Seaside by default only ensures the callback of the cancel button is executed before all the others, but it does not prevent the others to be executed!

This means that if you add a cancel button to a form, its action callback will be performed first and all the value callbacks will be performed afterwards.

The end result will be that your model objects get updated with the contents of your form controls, just as if you had pressed a normal submit button.

You can however, make the cancel button do exactly what you want it to do by implemtntig the callback in a way that keeps seaside from handle all callbacks with lower priorities. You simply have to send

self handleAnswer: false

in your callback, so that Seaside ignores all other callbacks.

This means you can use a Cancel Button to perform a few operations like rolling back a database Transaction and make sure the changes in the form are nut propagated to the model objects by this.

I was a bit confused by the fact that if you do not provide a callback at all, Seaside also does not add a default callback to the cancel button which stops callback processing.

To summarize: If you want a cancel button on your form, make sure you really cancel by setting handleAnswer to false. Otherwise changes in the form will be propagated to your model like when using a submitButton

→ Einen Kommentar schreibenKategorien: Seaside · Smalltalk
Mit Tag(s) versehen: , , ,

Seaside-Book is now available in Print

März 1, 2010 · Hinterlasse einen Kommentar

If you (like me) sometimes prefer to hold a book in your hands and put it besides your keyboard, this is probably good news for you:

A print-on-demand, softcover copy of the book “Dynamic Web Development with Seaside” is now available from Lulu.

At a reasonable price point, it is the most complete introduction to Seaside available:

The book costs around €28/£24/$40 and will be delivered within 3-5 working days

This is once again a proof of our ESUG sponsorship being useful, since ESUG is among the list of sponsors:

The authors wish to thank the European Smalltalk User Group (ESUG), inceptive.be, Cincom Smalltalk, Gemstone Smalltalk,  and Instantiations for generously sponsoring this book.

This is the first time that a tutorial on Seaside will include specifics for VA Smalltalk, but unfortunately, it doesn’t cover specifics like Flow-less programming in a non-Continuations environment. So there’s still some area for adventure for the VA Smalltalker’s out there (well, this sentence has only be added to this post in order to advertise our brand new Seaside-Training which focusses on VA Specifics if you need that bit of info in your team. But the course is not VA specific.).

It seems the authors chose not to buy an ISBN for the book, so it will probably not end up at amazon and friends…

→ Einen Kommentar schreibenKategorien: Seaside · Smalltalk
Mit Tag(s) versehen: , , , , , , , ,

How to learn more about Smalltalk

Februar 25, 2010 · Hinterlasse einen Kommentar

Are you thinking about using Smalltalk for a project in the near future?
Wondering if it’s the right technology for you?
Have you heard of and/or are fascinated by Seaside?

Want to learn more?

Then Cincom’s european Smalltalk Technology Conference Series is surely a good event to attend. They’re only half a day and free of charge! Both events take place next week in Paris and London.

From the invitation:

Reduce Costs: Spend less time and money on application development, thanks to Smalltalk’s object-oriented environment.
Improve Efficiency: Smalltalk lets you reuse objects instead of starting from scratch every time.
Get to Market Faster: With Smalltalk’s full-tilt application development, you deploy apps faster and start earning revenue more rapidly.
You’ll also be able to interact with Smalltalk gurus Georg Heeg, James Robertson, Arden Thomas and Andreas Hiltner, who will outline specific ways in which Smalltalk products can help you outmaneuver your competition.

→ Einen Kommentar schreibenKategorien: Seaside · Smalltalk
Mit Tag(s) versehen: ,

Congratulations to both Julian and Cincom!

Februar 19, 2010 · Hinterlasse einen Kommentar

Uups, they did it again: Cincom hired another rockstar ( ;-) ) of today’s Smalltalk Scene: Julian Fitzell of Seaside fame!

I’m happy to announce that I have accepted a full-time position with Cincom in the UK.

I guess this is great news for both parties. I wish Julian all the best for his start at Cincom!

Let’s hope they’ll give him some time to continue his work on Seaside.

→ Einen Kommentar schreibenKategorien: Seaside · Smalltalk
Mit Tag(s) versehen: , ,

VA Smalltalk 8.0.2 Dev Build B136 available

Februar 19, 2010 · 1 Kommentar

John O’Keefe just announced on the VA Smalltalk Support Forum the availability of the latest development build of VA Smalltalk Version 8.0.2:

Please pay particular attention to the Programmer’s Reference and the Migration Guide since several changes have been made to better integrate Seaside into the product.

It’s packed with bugfixes within and for Seaside (i.e. changes to Grease) and is intended to give users the chance to see how Seaside in VA Smalltalk is evolving. I havent’t played with it yet, but in another post on the Forum John said the Seaside port includes all bugfixes of Seaside Alpha 5 as of Wednesday last week (March 10th, 2010). This would mean that quite a few problems I’ve run into should be gone. There are some other fixes as well, but Seaside seems to be the current main focus at Instantiations.

Hope it’s not too long before we can welcome Beta 1 and soon afterwards also a VAST port of it. This will be a great day since we’ll be part of the Seaside family and can hopefully welcome lots of new users to VA Smalltalk ;-)

→ 1 KommentarKategorien: Seaside · Smalltalk
Mit Tag(s) versehen: , , ,

How saving a few bits almost sunk the earth and we still learned nothing ;-)

Februar 18, 2010 · Hinterlasse einen Kommentar

Remember the Y2K problem? We all filled our bath tubs with drinking water and bought loads of candles befor new year’s eve 1999 because we feared the world would simple explode or something even worse. We’re probably laughing about this today, but we weren’t back then.

The whole reason for the almost extinction of mankind and all life on earth was the need to save storage when writing bytes onto tapes. Back in the 60ies (or so), people decided that saving only the last two digits of a year would save a few bits per record, since you can save all the numbers between zero and 99 in 7 bits, whereas you need some more bits  for the century (depending how many years you plan as a minimum/maximum).

When the end of the century came closer, people thought: well, we still have thousands of tapes and files with only one byte for the year, so let’s assume that if that number is smaller than, say, 30, it must mean a year in the 21st century and still keep that date format.

This was okay for most purposes like birthdays of people signing a contract because very little people grew older than 99 years.

Beginning in the 1990′ies, some people worried that this cannot go on forever and decided that it’s better investing in another byte for a year than risking the end of the planet. This would at least work for a few thousand years from now.

In Languages like Smalltalk, there is an even better answer to that: Numbers in Smalltalk are of infinite size, so you could just manage years as Integers (which internally might become LargeIntegers) and be safe until shortly after the next big bang or so.

But our habits still haven’t changed, even in the face of THE END: We’re still talking about ‘08 or ‘05 and mostly mean 2008 or 2005, because nobody we talk to was living back in 1908 or 1905.

Why am I writing such a long story which is nothing new to anybody?

Because Boris Popov just sent a bug report to the VisualWorks NC mailing list:

(Date newDay: 1 monthNumber: 1 year: 10) year

7.6 = 2010
7.7 = 10
Couple of things,

- this isn’t mentioned in release notes (but I did find AR 57002 Date>>newDay:monthNumber:year: converts years <100 in to the current century) and affects quite a chunk of existing code, at least for us

- the comment inside the method hadn’t been updated to match new functionality, it still says years since the beginning of century are okay,

Answer with an instance of Date which is the day’th day of the month numbered

monthNumber in the year’th year.  The year may be specified as the actual

number of years since the beginning of the Roman calendar or the

number of years since the beginning of the current century.

I am *not* posting this here in order to bash any particular product or developer, just to say how we sometimes seem to be unable to get rid of bad habits. Maybe this even was just some stupid bug with no real intention behind it.

But we still try to find smart algorithms for determining what a user is really talking about. Shouldn’t we not just change our habbits and expect users to type in a full date? If a user tells me about a year 10, he’s simply not giving me enough information. If he’s a archeologist, he might mean 1510, 10 AC or even 10 BC or 310 BC.

Of course, the above mentioned problems with breaking existing code wouldn’t go away, but on the other hand every approach to solving this problem will be wrong for either an insurance agent or a paleonthologist. So in the end, whatever kind of fix one might come up with here, it will always be insufficient until it means that the user needs to enter complete information.

Funny we didn’t really start getting used to talk in full dates after the panic and fear back in 1999…

→ Einen Kommentar schreibenKategorien: UnorderedCollection
Mit Tag(s) versehen: ,

10.000 visitors!

Februar 18, 2010 · Hinterlasse einen Kommentar

I know, there are lots of Blogs that have 10.000 visitors a day, so it’s probably not really a sensation that mine has reached 10.000 visitors since the move to wordpress on September 16th 2009.

But still that’s a number that sounds impressive to me. Who’d have thought I’d have more than a handfull of readers…

→ Einen Kommentar schreibenKategorien: UnorderedCollection

New iPad, old iBugs

Februar 18, 2010 · Hinterlasse einen Kommentar

Everybody’s talking about iPads, iPhones and why Steve’s company will soon own all content on earth. It’s good to be innovating, and it’s great that Apple offers great new devices.

But it would also be good if they could simply fix some of their long-standing bugs in snow leopard. One that’s annoying me daily is the folder saving problem on Samba-Shares. Somehow there are problems copying folders to an external USB disk or smb-shares. This bug is now several months old and also hits every Mac user who uses Keynote or other programs that save their documents as bundles. Saving a Keynote presentation on a Samba share takes several minutes while saving it locally is done within 2 seconds. And this has nothing to do with network speed here at my end.

Even worse is that you cannot copy folders with subfolders onto a Samba server without getting stupid errors stating the topmost folder is already there.

So, please, Apple, don’t forget to do your boring homework in the shadow of a bright new future in controlling news, movies, books and music!

Your long-term users might walk away and look for better options…

→ Einen Kommentar schreibenKategorien: Mac
Mit Tag(s) versehen: ,

More on NoSQL and Object databases

Februar 18, 2010 · Hinterlasse einen Kommentar

There is a nice Collection of opinions and discussion about NoSQL databases, object databases and all kinds of “post-relational” database technologies over at ODBMS Industry Watch.

Since CouchDB, MongoDB and other new DBs are showing up weekly, the question whether RDBMS is really the way to go for all scenarios and whether there are easier, cheapier and more effective ways of persisting objects and documents is heating up. Just about one and a half decades after everybody agreed that OODBMS are dead.

Which they are not. Just take a look at Gemstone/S aka GLASS. Seems they are generating quite some buzz. Smalltalk has been a playground for OODBMs for at least two decades, apart from gemstone, there surely are a few more that are still around:  Magma and VOSS come to mind.

There also are some adapters for interfacing Smalltalk to databases like Amazon’s SimpleDB (project Cloudfork) or other RESTful Web Services-capable Databases (CouchDB).

So if you want to combine the highly productive and stable programming language Smalltalk with databases that fit nicely into the object paradigm and let you forget about relational restrictions (which of course also bring quite some benefits), feel warmly welcomed in the Smalltalk community, there are lots of choices for you.

In the above-mentioned article, I had a great laugh about this one:

” it is an interesting discussion. I have heard the term “NoSQL”. I did find the comment about relational databases not supporting key/value stores amusing: “…and index key/value based data, another key characteristic of “NoSQL” technology. The schema seems very simple but may be challenging to implement in a relational database because the value type is arbitrary.”
In Oracle, one simply needs a table as follows:

CREATE TABLE key_value (
the_key NUMBER,
the_value BLOB);

There you go! Key/value. How much simpler can you get? “

That’s clearly a case of “best of both worlds” !!!

Unfortunately, I know a few projects that really use such a DB design.
Unnecessary to say that using such a model throws away most benefits of both techniques… So, please read it as a joke, or at least don’t call me to fix your project, it’s going to be expensive ;-) ))

→ Einen Kommentar schreibenKategorien: Smalltalk
Mit Tag(s) versehen: , ,

Konkurrenz belebt das Smalltalk-Geschäft

Februar 18, 2010 · Hinterlasse einen Kommentar

In den letzten Tagen bekomme ich immer wieder Mails von Kunden, die von einer anderen Firma angeschrieben wurden. Darin stellt sich die Firma Tricept als neuer Business Partner von Instantiations im Bereich VA Smalltalk vor.

Für den einen oder anderen stellt sich dabei die Frage, was aus uns geworden ist.

Die Antwort ist ziemlich einfach: es gibt nun zwei Anbieter für VA Smalltalk am deutschsprachigen Markt, und bei uns hat sich nichts geändert.

Zwar werden wir uns sicher an der einen oder anderen Stelle als Konkurrenten gegenüberstehen, aber wir werden uns auch ergänzen.

Schliesslich zeigt der Vorgang ja auch, dass es neben Instantiations und der uns noch weitere Firmen gibt, die einen Markt für Smalltalk im Allgemeinen und VA Smalltalk im Besonderen sehen. Da auch unser neuer Konkurrent in erster Linie ein Beratungshaus ist, geht es natürlich auch darum, Projektaufträge zu akquirieren, also den Smalltalk-Markt insgesamt zu vergrößern. Aus Smalltalk-Sicht ist das ja eine gute Nachricht: es wollen mehr Leute etwas vom Kuchen ab.

Wir haben uns auch über Massnahmen gemeinsamer Marketingaktionen unterhalten und arbeiten bereits an konkreten Vorbereitungen. Wir sind also Waffenbrüder und Konkurrenten zugleich. Erst machen wir den Kuchen größer, und später versucht jeder von uns die größeren Stückchen abzubekommen…. ;-)

Die objektfabrik ist also weiterhin ein kompetenter Ansprechpartner für alle Themen rund um Smalltalk, Seaside und Konsorten, und wir werden weiterhin bemüht sein, mit viel Engagement und Sachverstand bei den Problemen unserer Kunden mitzuarbeiten. Wir haben die letzten Jahre ja immer mit viel Energie am Ausbau der Smalltalk-Community im Allgemeinen und an der VA-Smalltalk-Nutzeraschaft im Besonderen gearbeitet, und werden das auch weiterhin tun.

Und wer mit uns nicht zufrieden ist, kann sich immerhin an die Konkurrenz wenden. Wir werden versuchen, unseren Kunden diesen Aufwand zu ersparen ;-)

→ Einen Kommentar schreibenKategorien: Smalltalk
Mit Tag(s) versehen: , ,