Posts Tagged ‘smalltalk modeling’

Smalltalk image persistence – definitive developer advantage

February 9, 2009

Difference between good and bad application model design can make or brake the application. Having bulletproof app spec can help, but let’s not kid ourselves. There’s no such thing as rock solid application model. Models are prone to change every so often and you can easily paint yourself in the corner.

Any SQL based software suffers from this issue and there’s little you can do. ORM helps to offload this burden, but all it actually does is mask under laying SQL statements. With every update to SQL schema, you need to restart the database server, update application code, restart the application itself and hope you didn’t introduce another bug or two. If all goes well, users probably won’t notice few seconds of downtime.

The story is different with Smalltalk. For small to medium sized projects you can use Smalltalk image as data persistence. This offers quite some advantages, both while developing and when in production:

  • no need for third-party software (SQL servers)
  • no server and application restarts upon model change
  • you edit live code while application is being used
  • faster data access – data is stored in RAM, not on remote TCP accessed server
  • some serious tools to help you craft, debug and maintain your code like a pro ­čÖé

With real-time object reflection you can play with the application model all you want and still be on top of it. As there are no restarts and with changes visible the moment you make them, modeling becomes almost trivial compared to code-fu you need to do with SQL based models. It’s not all honey and milk, but the difference is big enough it should make you interested.

However, there is a down side too. You have to get used to Smalltalk. It’s so different you have to make the effort to really grasp it. Newcomers, including me, tend to leave too soon and not really take enough time to understand the power Smalltalk gives you. Don’t make this same mistake I did a year ago. If you’re interested in Smalltalk, invest the time to really understand it.