This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-12-19 16:52:15

AddZero
Scratcher
Registered: 2007-08-11
Posts: 100+

If I had to rebuild ScratchR from scratch.

To start, I apologize.  I know it's pretentious to suggest a complete rebuild of ScratchR.  Especially since I've never seen its code, and my knowledge of CakePHP is very limited.  I'm certain much more thought went to ScratchR's architecture, than what I could do.  Awesome work Andrés and team!  I am very impressed and inspired by the ScratchR platform.  I wish it a long life. 


This is more of how I would do it if I had to rebuild something like it myself.  It's an interesting problem for me and I hope some of these thoughts can be helpful somehow.  Maybe they'll help sprout better ideas.

(If you need to skip down, skip to "Project groups", and "Suggestion system" As I think those might be of interest now.)


I'd start with the Drupal CMS/framework.
Yes, I'm biased.  I build Drupal websites.  I've used/looked at several other cms systems/web application frameworks, but I was drawn to Drupal for its flexibility.  It's not perfect, but it has a ton of momentum right now.  It makes it relatively easy to build community sites with tons of integrated functionality.  (see Drupal case studies for examples.)

At the core, it's built for social websites with simple but extensible permissions, content, comment, caching, url handling... systems.  The base install is small, but can be used as a simple multiuser blog site out of the box.

The main popular modules (CCK (Content Construction Kit), Views, Taxonomy, og (Organic Groups)...) let me build a huge amount of functionality, with just them.  Then there's many other free contributed modules to do more specialized things.  Most time is spent planning, finding and configuring modules instead of coding.

A little about how drupal works:
All content in drupal is a 'node'.  You or a module can define node types: article, scratch project, forum thread, support request, poll, event, product, wiki page... 
All nodes have the id of the creator, date of creation, body text...

Modules can extend what the 'node' can do.  So when you turn on the comments module, each node type now has an option to turn on comments.  Its comments become part of that node's object.  When you go to a node's url, the theme layer then sees the comments and renders them.

And other modules can extend what comments or nodes can do, like for allowing users to vote them up or down or reporting as inappropriate content


Specifically, I'd start with Acquia Drupal
Aquia, is Drupal 6, plus a package of the popular modules that are supported by the Acquia company.  (Kind of like the RedHat of Drupal.)  They offer extra free goodies like the mollom captcha/spam service.


Re-create Scratchr's existing functionality:
Install/Activate these modules:
CCK (Content Construction Kit) (For making custom content types with fields.)
Views(Indispensable query builder, for making pages and blocks, of projects/users/forums/flagged content/friends/whatever with or without thumbnails... in whatever order you want.)
Devel (Like Firebug for Drupal, Indispensable while theming and module building/debugging.)
i18n (Internationalization) (Amnisty International is a good example of a multi-language Drupal site.)
Taxonomy (for allowing tags and free tagging of content.  A very flexible system.)
Services (for letting Scratch talk to drupal.)
Advanced Forum
Flag (For flagging friends, favorite projects, and inappropriate content.   Maybe use Flag Weights?)

(Or perhaps instead use Friend List or User Relationships for buddy system.)
Also perhaps: VotingAPI
Vote-Up-Down


I've probably overlooked some things.  Module finder and irc are handy.  (But  choose healthy modules or take on maintaining them.)

Most of the work now should be configuring these modules.

Setup Content Construction Kit (CCK):
Make The "Scratch Project" Node Type...
Perhaps make a node reference field to link to the parent project if remixed.  This might require a custom module to make it work nicely with Scratch.

Setup Views:
Make page views and blocks for the "Newest Projects", "Featured Projects" (allow moderators to flag as featured)...

The permissions system comes with anonymous and authenticated groups.  So you can allow 'anonymous' users to view content.  'authenticated' users can add scratch project nodes, add forum threads nodes, edit own scratch projects, edit own profile, change active theme, comment on scratch projects...
Also create groups like: moderator, administrator, project leader...

Getting scratch to talk to drupal with Services, will require some coding.
Some of the AJAX stuff as in ScratchR may require some work. Jquery is included.

For theming, I'd probably make a sub-theme from Zen.  A rtl sub-theme may be needed for some languages.  And use theme developer in the Devel module.
I'd use Panels for the front page, user pages, and other places if it becomes stable any time soon...  Otherwise the layout of those pages will probably have to be themed.

...and much much more.  Man, a ton of work went into ScratchR.

Expanding ScratchR:
Project Groups Like JSO's "co-work" idea.
Use og (Organic Groups) to let users make project groups.  Group members can post projects, polls, issues... Group leaders can allow members to signup. Or it can be open invitation.  It can also send notifications to members.)  Drupal Groups is a good example of this in action. 

Suggestions system:  Something like this was mentioned in the suggestions forum a while back.
It's possible to build something like Ubuntu Brainstorm (built with drupal) as a replacement for the "Suggestions" forum, for managing Scratch suggestions from the community.  Suggestions can be voted on and duplicate suggestions can be merged.

Manage Scratch Software Development:
Drupal also has project management systems for handling cvs and issues, (may not work for squeak development?)...  You can see one of them in action by seeing issues for a module on Drupal.org...

(It may also by possible to integrate CakePHP with Drupal.)

(edited)
Ok, I hope some of this can be helpful somehow.  It's fun to try to figure out.
Drupal has a ton of functionality that can be plugged in and quite a community.
But it's not perfect.
If I was able and had the resources to write and maintain custom code, CakePHP looks like an excellent way to go.  And that's how it was done!
I hope to learn this way of working too.

Last edited by AddZero (2008-12-19 22:08:41)


http://scratch.mit.edu/static/icons/buddy/524717_med.png?t=2010-06-15+09%3A48%3A36

Offline

 

#2 2008-12-20 16:15:17

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: If I had to rebuild ScratchR from scratch.

Thanks for the comments!

If I were to build ScratchR from scratch I would do a lot of things different too. For starters, I would for sure build it using a cloud computing  architecture to run it on top of AWS or the Google App Engine. I  underestimated the effort it takes to support a high-traffic website and I envy those "elastic" and "scalable" sites I read all the time on reddit  :-) I've read Django plays well with the Google App Engine and it seems very promising. 

I would also look at Drupal again. At the time I started with this project Drupal didn't seem the right choice. It seemed like it would be easy to reach 60% of the features I wanted but the remaining 40% would take a lot of work: trying to understand other people's code, tweaking modules that were still in development, etc.  It was also uncertain what the features to implement were going to be. A lot of features have been evolving with the community. I had no idea how people were going to use the web site or if it was going to be used at all! Drupal seemed to provide a good structure, but like any structure it provides constrains. I didn't want to have that many constrains as it was all in the air.

I looked a lot of  MVC frameworks and CakePHP was the best fit for us because it had all "power" of PHP with the philosophy of Rails. With "power" I mean that there are so many people, modules, docs  for PHP.  Apache and Linux play very well with PHP and I used to use Perl a lot so transitioning to PHP was easy.

We have been thinking about the future of Scratch and I am very excited about a future  Scratch that is completely web-based, cloud-friendly, service-oriented (basically with all the web2.0 buzzwords :-)

Do you think Drupal would be a good tool for that? Do you think we can find friendly Drupal developers willing to volunteer and advice us?


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

#3 2008-12-21 18:39:42

BWOG
Scratcher
Registered: 2008-09-19
Posts: 1000+

Re: If I had to rebuild ScratchR from scratch.

what is ScratchR?

Offline

 

#4 2008-12-23 02:00:51

Buddy_ca111
Scratcher
Registered: 2008-08-30
Posts: 100+

Re: If I had to rebuild ScratchR from scratch.

ya, what is scratchR?


By reading this you agree to giving me your soul, money, passwords, projects, abiltys and your bases

Offline

 

#5 2008-12-23 04:12:36

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: If I had to rebuild ScratchR from scratch.

BWOG wrote:

what is ScratchR?

ScratchR is the name of the Scratch Website application.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#6 2008-12-23 04:24:25

Buddy_ca111
Scratcher
Registered: 2008-08-30
Posts: 100+

Re: If I had to rebuild ScratchR from scratch.

oh


By reading this you agree to giving me your soul, money, passwords, projects, abiltys and your bases

Offline

 

#7 2011-06-09 09:38:09

filo5
Scratcher
Registered: 2008-01-08
Posts: 1000+

Re: If I had to rebuild ScratchR from scratch.

andresmh wrote:

Thanks for the comments!

If I were to build ScratchR from scratch I would do a lot of things different too. For starters, I would for sure build it using a cloud computing  architecture to run it on top of AWS or the Google App Engine. I  underestimated the effort it takes to support a high-traffic website and I envy those "elastic" and "scalable" sites I read all the time on reddit  :-) I've read Django plays well with the Google App Engine and it seems very promising.

Well now I'm planning to rewrite ScratchR in stuff like Django and Dojo, since I'd like to get to know these frameworks better. It won't be verbatim, though, as I'd probably change stuff (allowing downvotes, an upload form for projects since Scratch doesn't support multiple servers, better comment system with rating comments, "video replies" - you can link your project as a reply to someone else's project, symmetrical friends, etc.)
I'll learn much from this experience, since this kind of site covers many design problems and various situations. I will use current ScratchR original (current) as a codebase of sorts, and I'll probably put up the finished version on the forums somewhere. This might be fun!

Oh, and also:
http://img337.imageshack.us/img337/1169/necroposting.jpg


Converting my Scratch projects to Python!

Offline

 

#8 2011-06-11 16:07:48

JTxt
Scratcher
Registered: 2010-05-19
Posts: 100+

Re: If I had to rebuild ScratchR from scratch.

Hi, I used to go by AddZero.
Oops, I should have replied to Andres' helpful response.
We've discussed this since.
I made a couple big suggestions, you can check those out in my signature.
I would not use Drupal for this anymore. I also looked into yii,, django, nodejs, redis... toyed with a number of things.
I now have a rather consuming job, so I backed away from this for now.
Best wishes working on this filo5, it's a fun problem! 
And I'm looking forward to seeing what the scratch team makes.

Last edited by JTxt (2011-06-11 16:08:18)


http://scratch.mit.edu/static/icons/buddy/524717_med.png?t=2010-06-15+09%3A48%3A36

Offline

 

Board footer