New Website!

We have a new website and a new logo for our community. Go Smalltalk!

Smalltalk was designed for Kids!

Yes! Alan Kay was trying to develop an environment to be used in the education of our kids.

Did you Know that Smalltalk was created in 70's at Xerox?

The use of the mouse, the "copy and paste", the bitblt and others technologies was firstly created in Smalltalk. Steve Jobs saw those ideas at Xerox and he developed a new language, Objective-C.

Mailing List in Spanish!

Please, go to http://groups.google.com/group/clubsmalltalk and join us!

Showing posts with label Code. Show all posts
Showing posts with label Code. Show all posts

September 17, 2010

Aida/Web 6.1 released

Janko Mivsek has annouced that a new version of Aida/web Application server and Web framework is released for Squeak/Pharo and Visualworks.

What's new in 6.1?
  • Inline translation to multiple languages: to translate your web applications to other languages inline by just clicking the text on the page. Translation is immediately stored in class methods on your web app classes.
  • Standalone web apps, no link to the domain model needed
  • Ajaxified input validation
  • Action blocks (aka callbacks)
  • Routing of web requests
  • Static serving moved to a special StaticServer class
  • IE8 support in IE7 emulation mode to avoid manual checking of IE8 Compatibility view
  • AdvancedSearch widget introduced, for easier implementation of advanced search in web apps
  • Email messenger introduced for easier sending emails with notifications and similar from your web apps
  • RegistrationApp, a standalone web app to guide the user registration process
  • Pluggable authentication, with default authenticator from local security settings included, LDAP authenticator as add-on.
See the release notes for detailed list of all new features and bugs resolved, with most important ones emphasized at http://www.aidaweb.si/release-notes-6.1.
For Squeak/Pharo there is now a Metacello configuration available. To install for instance Pharo just evaluate this script:

Gofer new
        squeaksource: 'MetacelloRepository';
        package: 'ConfigurationOfAida';
        load.

((Smalltalk at: #ConfigurationOfAida) project version: '6.1') load.
SwazooAida demoStart.

July 5, 2010

Gaucho, a direct manipulation environment for programmers in Pharo

Fernando Olivero has announced the first release of Gaucho, a direct manipulation software for Pharo Smalltalk for programmers who firmly believe that programming is modelling. This version provides:
  • Direct manipulation of Classes, methods and packages
  • Easily perform rename refactorings of classes and methods
  • Draggable arrows for manipulating the inheritance relationships between classes
  • Creating and runing tests for all the classes in the system
  • Creating workspaces for taking snapshots of the current pampas
  • Smart searching for any object in the system
  • Keyboard shortcuts associated to the most important operations
  • Logging all the changes to the system
  • Saving/Loading developers and workspaces to the default local directory
You can get more information at the Gaucho's website: http://gaucho.inf.usi.ch/
You can see a screencast here, that shows most of the features of Gaucho.


July 1, 2010

XMLRPC Support for Pharo/Squeak will be supported by ESUG

Germán Arduino has announced in his blog that his project XMLRPC Support for Pharo/Squeak will be supported by ESUG. Congratulations Germán!
More information of the scope of the project and details of the implementation at his blog post here.

What is XML-RPC?
It's a spec and a set of implementations that allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet.
It's remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned.


April 26, 2009

The SqueakDBX team has announced the first stable version of the OpenDBX Wrapper

The SqueakDBX team has announced the first stable version of the OpenDBX Wrapper, here is the announcement in the Squeak List: 
After a continuous work since January 08, we are very glad to announce our first stable version of SqueakDBX.
For those who don't know what this is about, the aim of this project is to build an OpenDBX (http://www.linuxnetworks.de/doc/index.php/OpenDBX/) wrapper which will allow users to perform relational database operations (DDL, DML and SQL) through a truly open source library. Through this feature, the squeak community will hopefully be able to interact with major database engines, such as Oracle and SQL Server, besides those which are open source, like PostgreSQL, MySQL or Sqlite. Moreover, by integrating this with GLORP (http://www.glorp.org/), will allow us to generate a complete and open source solution to relational data base access.

Why did we do squeakDBX?

There are several approaches to persistence in Squeak, some very interesting: OODB like Gemstone and magma, image, CouchDB or TokyoT/C, and so on. All of this options get sense if you can actually decide the way you will persist your objects.
However, this is not something that happens very frequently. FREQUENTLY, the client (the one who pays you for making the software) requires you to use a particular persistence strategy (RDBMS). Not only that, but also a database in particular (like Oracle, MS SQL, and so on). They have lots of reasons: they already have license for it, they have support and companies for it, they know SQL, they want to do selects, legacy systems, and so on. But Squeak only provides drivers for MySQL and PostgreSQL natively, so... what would you do in the rest of the cases? move to another language? OK, we don't. We want to program systems in Squeak.
If you know about SqueakDBX you can just see changelog here: http://wiki.squeak.org/squeak/6109; If you don't, you should continue reading ;)
SqueakDBX features:

  • Runs on Squeak and Pharo.
  • Own SqueakDBX plugin (experimental). Ability to easily change the external call strategy (FFI or our own plugin).
  • Support for: Oracle, PostgreSQL, MySQL, MS SQL Server, ODBC and SQLite3
  • Automated database connection ralease (although manual disconnection is recommended ;-)
  • Automated results retrieving in order to do another query, after doing a query and not iterating ALL results 
  • Error handling: Not only errors, but levels associated with an error in order to avoid FFI calls (if you get a fatal error, it has no sense to do another query and the resources must be free). See http://wiki.squeak.org/squeak/6076
  • Very completed documentation in wiki and getting started.
  • Code critics and SwaLint were run several times.
  • Good design (at least all the major refactors demonstrated that).
Full documentation, installation and getting started instructions can be found at wiki page: http://wiki.squeak.org/squeak/6052. We spent a lot of time in it. It has all the information you may need and is in continuos development.
Benchmarks: We have a lot of SqueakDBX benchmarks and also some for native squeak drivers (PostgreSQL and MySQL) and SqueakDBX seems to be faster than both of them. You can read more here: http://wiki.squeak.org/squeak/6063
Packages can be installed from Universe (3.10) or SqueakMap. Current version is 1.0. Sources can be download from SqueakSource http://www.squeaksource.com/SqueakDBX (it requires FFI installed).

OpenDBX version: 1.4.
Remember that you can compile OpenDBX by yourself or use precompiled binaries. For more information please read: http://wiki.squeak.org/squeak/6129.

GLORP integration: Actually, this may include two parts: The integration of GLORP with squeak is completely hardcoded with PostgreSQL native driver. Because of this, first we will do a refactor in GLORP in order to enable it to support different drivers. We will create a PostgreSQL driver with the things that GLORP already has. We invited Alan Night to have dinner with us when he came to Argentina. We told him our ideas and discuss for a while till we got a first design of this refactor. We have already started this part.
Create a SqueakDBX driver for GLORP just like the one we are planning to do for PostgreSQL.

The last squeak port of GLORP is very old and there is nobody to do it. A friend of us, Diogenes Moreira, has accepted this job, so, thanks to him, we hope to have latest GLORP releases in Squeak.
You can see our Glorp progress here: http://wiki.squeak.org/squeak/6132

Help is always wanted. We would really appreciate if you:

Give us opinions, comments, ideas, new features, complaints and so on.
Tell us if you find a bug. Tell us if you test SqueakDBX with other RDMBS or OS different from the ones we tested. Just to know if it works or not :)

If you try SqueakDBX and you write something somewhere like a blog, let us know. We have this link: http://wiki.squeak.org/squeak/6131 where we put useful links for all the people.
Special thanks to:

  • ESUG, for supporting us through Summer of Talk 08; 
  • To Norbert (author of openDBX) for his help and to all the people who tested it and help us.
Cheers,
SqueakDBX team

October 19, 2008

SmallFaces, a widget toolkit for Seaside

The crucial benefit is getting rid of the tag idea, so basically you have widget objects for the web, for which can configure visual aspects (layout, appearance) and AJAX events (using SASE). SmallFaces includes common GUI objects as TextFields, Buttons, ListBox, CheckBox, CheckBoxGroup, RadioButton, RadioButtonGroup, etc.
Web applications are growing every day, and with the explosion of the AJAX technology few years ago, the web trends move towards desktop-like applications, making a fuzzy limit between both. Those who experienced pure desktop GUI developement (and believe the markup way to do things is fine for simple user interfaces, but do not scale very well when complex applications come), will feel the SmallFaces API a second nature.
See the following page at the Squeak swiki for instructions http://wiki.squeak.org/squeak/6088
Spanish documentation about the project is located here http://cs.hernanmorales.com.ar/projects/smallFaces/sf-es.php

Download and Installation Info

Prerequisites
  • Seaside and Scriptaculous
    • Phantasia (CSS) package from Monticello adding the following repository:
      MCHttpRepository
      location: 'http://www.squeaksource.com/Phantasia'
      user: ''
      password: '' 

      Installation

      • Load SmallFaces-bll.1.mcz package from Monticello adding the following repository:
      MCHttpRepository
      location: 'http://www.squeaksource.com/SmallFaces'
      user: ''
      password: ''
      • To see useful examples load SmallFacesExamples-bll.1.mcz package

      Tested under

      • Official Squeak 3.9
      • Damien Cassou

      Authors

      • Hernan Morales Durand, Norberto Manzanos and Juan M. Burella

      August 29, 2008

      New version of Chalten

      It's a new version uploaded to SqueakSource (for Squeak) and to the Cincom Public Repository (for Visualworks) a new release of the project called Chalten 2.0 that is an implementation of the Time Domain (not only of the Gregorian Calendar now).

      Here are some examples:

      "Create some time entities"
      August twentieth, 2008 --> Creates an instance of the gregorian Date for 20/08/2008
      August twentieth --> Creates an instance of the gregorian DayOfMonth for 20/08
      August, 2008 --> Creates an instance of the gregorian MonthOfYear for August of 2008

      "But, not only gregorian entities"
      Shaban seventeenth, 1429 --> Creates an instance of the islamic Date for 17/08/1429
      Shaban seventeenth --> Creates an instance of the islamic DayOfMonth for 17/08
      Shaban, 1429 --> Creates an instance of the islamic MonthOfYear for Shaban of 1429

      JulianAugust seventh, 2008 --> Creates an instance of the julian Date for 07/08/2008
      JulianAugust seventh --> Creates an instance of the julian DayOfMonth for 07/08
      JulianAugust, 2008 --> Creates an instance of the julian MonthOfYear for August of 2008

      Av nineteenth, 5768 --> Creates an instance of the hebrew Date for 19/05/2008
      Av nineteenth --> Creates an instance of the hebrew DayOfMonth for 19/05
      Av, 5768 --> Creates an instance of the hebrew MonthOfYear for Av of 5768

      "Converting dates between diferents calendars"
      (August twentieth, 2008) asIslamic --> Return Sha'ban 17, 1429
      (August twentieth, 2008) asHebrew --> Return Av 19, 5768
      (August twentieth, 2008) asJulian --> August 7, 2008 (julian)

      (Shaban seventeenth, 1429) asHebrew --> Return Av 19, 5768
      (JulianAugust seventh, 2008) asIslamic --> Return Sha'ban 17, 1429
      (Av nineteenth, 5768) asGregorian --> August 20, 2008 (gregorian)

      "Measuring distances"
      August twentieth, 2008 distanceTo: December thirtieth, 2008 --> Return an instance of Measure <132 days>
      Shaban seventeenth, 1429 distanceTo: Muharram second, 1430 --> Return an instance of Measure <132 days>
      Av nineteenth, 5768 distanceTo: Tevet third, 5769 --> Return an instance of Measure <132 days>

      "Also, measuring distance expressed in diferents way (calendars)"
      August twentieth, 2008 distanceTo: Tevet third, 5769 --> Return an instance of Measure <132 days>
      Shaban seventeenth, 1429 distanceTo: December thirtieth, 2008 --> Return an instance of Measure <132 days>
      Av nineteenth, 5768 distanceTo: Muharram second, 1430 --> Return an instance of Measure <132 days>

      "Collect some entities"
      (ChaltenYear number: 2008 calendar: GregorianCalendar) months
      collect: [:monthOfYear | monthOfYear lastDate] --> Returns all the last dates of the 2008 months.
      (ChaltenYear number: 2008 calendar: GregorianCalendar) dates select:
      [:date | date is: Monday] --> Returns all Mondays of 2008
      (ChaltenYear number: 5768 calendar: HebrewCalendar) dates select:
      [:date | date is: YomShabbat] --> Returns all yom shabbats of 5768

      "Let's create a filter for all dates..."
      nonWorkingDays := TimeLineFilter named: 'Non Working Days'

      "Now, we want Saturdays to be on that filter"
      nonWorkingDays addDayRule: Saturday

      "Now we want Sundays from January 1st of year 1000 to the end of time..."
      nonWorkingDays
      addRule: (nonWorkingDays dayRule: Sunday)
      from: (January first, 1000)
      to: TheEndOfTime

      "Now we want all July 9th since 1816 because is the Independence Day in Argentina".
      nonWorkingDays
      addRule: (nonWorkingDays dayOfMonthRule: July ninth)
      from: (July ninth, 1816)
      to: TheEndOfTime

      "Testing some dates..."
      nonWorkingDays includes: (July ninth, 2008) --> Returns true
      nonWorkingDays includes: (July eighth, 2008) --> Returns false
      nonWorkingDays includes: (July twelfth, 2008) --> Returns true, it is Saturday

      "But, how about to filter some like the hebrew new year day"
      nonWorkingDays addDayOfMonthRule: Tishri first
      nonWorkingDays includes: (Tishri first, 5769) --> Return true, it is the next hebrew new year
      nonWorkingDays includes: (September thirtieth, 2008) --> Return true, it is the next hebrew new year (in gregorian)

      "21/08/2008 is a Thursday"
      timespan := TimeSpan from: (August twentyfirst, 2008) duration: (48 * TimeUnits hour)
      settleDate := RelativeDate timespan: timespan using: nonWorkingDays negated

      nonWorkingDays includes: (August twentyfifth, 2008) --> Returns false because 25/08/2008, a Monday, is a working day
      settleDate absoluteDate --> Returns 25/08/2008

      "Now a new non working day is added to the filter"
      nonWorkingDays addDateRule: (August twentyfifth, 2008)
      nonWorkingDays includes: (August twentyfifth, 2008) --> Return true.

      "Now 25/08/2008, is a not working day"
      settleDate absoluteDate --> Now it returns 26/08/2008 because the filter has changed

      "Working with time zones"
      buenosAiresDateTime := TimeZonedDateTime
      dateTime: (DateTime
      date: August twentieth, 2008
      timeOfDay: (TimeOfDay hours: 19 minutes: 35))
      zone: TimeZones buenosAires.

      greenwichDateTime := TimeZonedDateTime
      dateTime: (DateTime
      date: August twentieth, 2008
      timeOfDay: (TimeOfDay hours: 22 minutes: 35))
      zone: TimeZones greenwich.

      buenosAiresDateTime = greenwichDateTime --> Return true, it is the same instant but measure in diferent zone
      buenosAiresDateTime distanceTo: greenwichDateTime --> Return a measure <0 days>, because it is the same instant

      buenosAiresDateTime := buenosAiresDateTime next: (TimeUnits hour * 3)

      buenosAiresDateTime = greenwichDateTime --> Return false, the hour is the same but the zone is different
      (buenosAiresDateTime distanceTo: greenwichDateTime)
      convertTo: TimeUnits hour --> Return a measure <-3 hours>, just the offset between zones

      February 24, 2008

      Seaside and Ruby on rails

      In this video, we can see an example of a "hello world" in Ruby on rails and the same example done in Seaside. It's interesting to see how to do an example in Ruby on rails, which is a "copy" of the Seaside framework. Ruby is a language very influenced by Smalltalk, but it is still a language.
      In this video the author James Robertson is using a MAC OS and VisualWorks Smalltalk.