GSoC : Port Rails Active Support to Seaside

Seaside Active Support is a set of libraries that are shared by all Seaside components. Active Support also extends some of Squeak base image classes in interesting and useful ways.

Seaside ActiveSupport is a port of Rails’ ActiveSupport library. Includes sync with the Chronos-ST library.

Rails ActiveSupport is the unsung hero of Rails. Much of what makes Rails code beautiful and powerful is implemented in ActiveSupport

Active Support is a collection of utility classes and standard library extensions that will be useful for Seaside developers. All the additions will be implement in a bundle that make Seaside code a step closer to natural language. Active Support gives us common way to solve common problems. It’s contextual standardization.

The main idea behind the active support api desing is to remain close to natural language. The minimize the learning curve.

Some examples :

“Peanut Butter” starts_with ‘Peanut’ // => True
“1985-03-13” toTime // => Wed Mar 13 00:00:00 UTC 1985
2 days ago from_now // => Sun Mar 13 00:34:55 -0800 2007
Time.days_in_month(2) // => 28 + 3.days + 12.hours

Set of new features :

* Enumerations and Arrays
– Keys
– diff
– reverseMerge
– classMethods
– date
– sum
– to_s_db :

* String Extensions
– StartsEndWith
– conversion
– iterators
– access

* Extensions to Numbers
– date
– EvenOdd

* Time and Date Extensions using Chronos-ST library
– calculation

* Extension to Smalltalk Symbols

=== Development plan : ===

The methodology will be Test driven development.

0) before the project : learn Squeak idiomatics.

1) Identify an external using the Seaside and the Squeak mailing list and the Active Supports Rails docuemtation. And document their behavior. (Using Sunit) (1st week)

2) Discuss the pros and cons of the different techniches (1st week) –
– A set of wrapper class
– Meta programming
– Extends methods

2) Enumerations and Arrays (2nd week)

3) String Extensions (3rd week)

4) Extensions to Numbers (4th week)

5) Time and Date Extensions, integrate Chronos-st (6th week)

6) Extension to Smalltalk Symbols (7th weeek)

=== Benefits to the Community ===

Having a package that simplifies the creation of Seaside-based web applications will help lower the barriers to entry for new Seaside developers and will be helpful in advertising Seaside and Squeak. It may also highlight possible areas of improvement for Seaside and Squeak.

Seaside Active support can bee, also useful, for Squeak developer that works out of Seaside.

=== Related frameworks : ===

* Chronos-ST library.

=== About me: ===

…….=== Motivation and interests: ===

Why I want to take part in it… I’ll be honest. I saw Seaside at the first time, when I read a post ‘on smalltalk blog’ comparing Rails vs Seaside a month ago. I was surprise about this new way to develop web application. And I liked it.

In my first year in the university I have gone to a ground OOP course using Smalltalk.

So, I think, I can do this task.

=== Available time: ===


2 comments so far

  1. Ramon Leon on

    You should use Smalltalk idioms when building such a library, underscores in method names are ugly and not idiomatic. Use camelCase instead.

    Also, you’d be duplicating stuff that’s already in Squeak. Squeak already has far more of this natural language style API than Rails. #beginsWith: is already on the string class, along with hundreds of other helpers on just about every base class that’d need them.

    If you port ActiveSupport to Squeak without respecting existing code and conventions, no one will use it. It’s a good idea, just be aware, most of this stuff already exists, where do you think Ruby copied it from? In fact, I’d be surprised if you could find much at all in ActiveSupport that wasn’t already in Squeak.

    If you haven’t programmed in Seaside for a while, you need to do that before trying to port Rails code to it. Just a little friendly advice. Looking forward to seeing what you do.

  2. Pedro on

    I have no much experience using Squeak, and just a little beat using Seaside.

    Of course, i must learn the smalltalk idioms. But i think part of the GSoC is learn this idioms, and The Seaside way, form the mentor.

    I pick this idea from hear :

    Thanks for the advice, i appreciate.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: