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

#1 2010-06-02 22:53:43

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Scratch 2.0 Web Data

Okay, so I've proposed this before, in this thread. But I'm doing it again, with a blocks-based mockup:
http://img707.imageshack.us/img707/755/scratch20httpproposal.gif
My proposal calls for a new data type in Scratch called a WebSensor. You can create one with a button similar to "make a variable/list", and it will produce a reporter like a variable and a list.

Here's the rundown of what each piece of the script does. Here we are going to load some data from a hypothetical Scratch Resources site. This site has a file called getRandomResource.php which takes HTTP POST data and gives you a random resource. It might be a costume, a sound, a string, or maybe a video! Who knows?  big_smile

So we have our sensor, we have a URL string, and a list of data pairs. Note that in this imaginary version of Scratch it is possible to use a string as an index in a list.

Now the script adds the data to the WebSensor and then gives the sensor a URL and sends it on its way. The script waits until the resource is completely loaded or an error has occurred. Depending on the result, it either complains about the error, or simply loads the data as a costume or sound.

Simple, huh? What do y'all think?

Last edited by fullmoon (2010-06-02 22:54:02)


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#2 2010-06-02 23:33:34

PlayWithFire
Scratcher
Registered: 2010-01-20
Posts: 1000+

Re: Scratch 2.0 Web Data

that would be cool


http://scratch.mit.edu/static/projects/PlayWithFire/1610180_sm.png
Check out the DG Games Website For the latest news on games like Infected

Offline

 

#3 2010-06-03 01:26:27

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

Re: Scratch 2.0 Web Data

Cool, this could be useful!

Have you played with http://www.designblocks.net/ ? they have a flickr image block, you put in a search term and it loads an image.
Very simple. 

You're going for more flexibility.  Cool.
I think it would be good if the blocks could work without having to add error detection or urls... very simple by default... but optional flexibility for more experienced scratchers somehow.

Last edited by JTxt (2010-06-03 01:27:27)


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

Offline

 

#4 2010-06-03 07:12:36

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Scratch 2.0 Web Data

Yup. Definitely could be used to some extreme advantages - so I support.

Offline

 

#5 2010-06-03 09:57:08

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: Scratch 2.0 Web Data

JTxt wrote:

Cool, this could be useful!

Have you played with http://www.designblocks.net/ ? they have a flickr image block, you put in a search term and it loads an image.
Very simple. 

You're going for more flexibility.  Cool.
I think it would be good if the blocks could work without having to add error detection or urls... very simple by default... but optional flexibility for more experienced scratchers somehow.

That's like a Scratch online!

2.0, anyone?


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#6 2010-06-03 11:46:41

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: Scratch 2.0 Web Data

Great idea, I support  smile


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#7 2010-06-03 15:34:04

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Scratch 2.0 Web Data

fullmoon wrote:

Simple, huh? What do y'all think?

Not really xD

The problem is that it's adding too many more blocks.

Remember - whenever creating a suggestion, think about what it will look like to a beginner. Firstly, it will be confusing to people who don't do so much web developing, and secondly, it just adds to the block palette, which we generally want to limit on, and focus on other things.


http://i.imgur.com/WBkM2QQ.png

Offline

 

#8 2010-06-03 15:42:45

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Scratch 2.0 Web Data

JTxt wrote:

Cool, this could be useful!

Have you played with http://www.designblocks.net/ ? they have a flickr image block, you put in a search term and it loads an image.
Very simple. 

You're going for more flexibility.  Cool.
I think it would be good if the blocks could work without having to add error detection or urls... very simple by default... but optional flexibility for more experienced scratchers somehow.

Woah! I never saw that before! Awesome!


http://i.imgur.com/WBkM2QQ.png

Offline

 

#9 2010-06-03 15:51:45

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Scratch 2.0 Web Data

Lucario621 wrote:

Not really xD
The problem is that it's adding too many more blocks.

Okay, maybe it's relatively simple compared to textual programming languages. I see this example as similar to the list blocks introduced in 1.3. They more than doubled the size of the Variables palette and were undoubtedly confusing to new users -- but think about the possibilities they opened.

Also, imagine that you're learning to program. Would you rather learn the concepts of making HTTP requests in Scratch, or some other more complicated language? Consider this Actionscript code equivalent to the blocks example I gave.

Code:

var request:URLRequest = new URLRequest("http://resources.scratch.mit.edu/getRandom.php")
var urlVars:URLVariables = new URLVariables()
urlVars.resourceID = int(Math.random()*10000).toString()
request.data = urlVars
request.method = URLRequestMethod.POST
//Now we finally get to load something.
var loader:URLLoader = new URLLoader()
loader.addEventListener(Event.COMPLETE,
function(e:Event):void{
  trace(e.data)
})
loader.addEventListener(IOErrorEvent.IO_ERROR,
function(e:IOErrorEvent):void
{
  trace("Oh, snap, some sort of error")
})

This is even simpler than the blocks I gave, because all it will do is print out any textual data it loads. Pretend you're a new user for a second and take your pick: learning to make HTTP calls in Scratch, or something far more complicated?

Last edited by fullmoon (2010-06-03 15:52:49)


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#10 2010-06-03 16:02:02

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Scratch 2.0 Web Data

JTxt wrote:

Have you played with http://www.designblocks.net/ ? they have a flickr image block, you put in a search term and it loads an image.
Very simple.

I agree, DesignBlocks is very cool, but the Flickr block is exactly what I don't want to see in Scratch 2.0

I am going to rant here, and please know that it is in no way a rebuke to the post above. It's just something that's on my mind.

<rant mood="angry" style="know-it-all">

The problem I see with only linking Scratch up to specific Web 2.0 sites is that I think it reduces Scratch's power as a creativity engine and would turn Scratch into "just another social media mashup tool". Consider how limiting it will be after the first twenty minutes to continue using tailor-made blocks like that. Eventually it would be more satisfying for users to just buckle down and learn how to make the requests, and eventually parse the data they return. These are big programming concepts, especially in the Flash world that Scratch will soon reside in.

Also, I don't think it will be very simple at all to implement social network connectivity to Scratch. Using a Facebook API requires making like a dozen calls just to read someone's status. I'd be impressed if the Scratch team found a way to do this that was simple yet not limiting.

My last point is that if Scratch 2.0 implements both procedures (which mres said would happen in the Scratch Day video) and a general HTTP library, other people (like myself) would be thrilled to write libraries to connect to social media sites. Don't underestimate the ability of the Scratch community.
</rant>


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#11 2010-06-03 16:09:40

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Scratch 2.0 Web Data

fullmoon wrote:

JTxt wrote:

Have you played with http://www.designblocks.net/ ? they have a flickr image block, you put in a search term and it loads an image.
Very simple.

I agree, DesignBlocks is very cool, but the Flickr block is exactly what I don't want to see in Scratch 2.0

I am going to rant here, and please know that it is in no way a rebuke to the post above. It's just something that's on my mind.

<rant mood="angry" style="know-it-all">

The problem I see with only linking Scratch up to specific Web 2.0 sites is that I think it reduces Scratch's power as a creativity engine and would turn Scratch into "just another social media mashup tool". Consider how limiting it will be after the first twenty minutes to continue using tailor-made blocks like that. Eventually it would be more satisfying for users to just buckle down and learn how to make the requests, and eventually parse the data they return. These are big programming concepts, especially in the Flash world that Scratch will soon reside in.

Also, I don't think it will be very simple at all to implement social network connectivity to Scratch. Using a Facebook API requires making like a dozen calls just to read someone's status. I'd be impressed if the Scratch team found a way to do this that was simple yet not limiting.

My last point is that if Scratch 2.0 implements both procedures (which mres said would happen in the Scratch Day video) and a general HTTP library, other people (like myself) would be thrilled to write libraries to connect to social media sites. Don't underestimate the ability of the Scratch community.
</rant>

Eh - I see your point, but it helps kids create interactive media - what can I say? Adding all of those complicated website feed whatever stuff would just make things complicated to new users.


http://i.imgur.com/WBkM2QQ.png

Offline

 

#12 2010-06-03 16:11:46

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Scratch 2.0 Web Data

fullmoon wrote:

Pretend you're a new user for a second and take your pick: learning to make HTTP calls in Scratch, or something far more complicated?

Probably neither - because Scratch isn't a tool made for learning to make HTTP calls. Scratch isn't some super web-developing tool, and most "new users" - most like kids, what Scratch is designed for, don't even know what HTTP calls are, and don't care.


http://i.imgur.com/WBkM2QQ.png

Offline

 

#13 2010-06-03 16:14:54

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Scratch 2.0 Web Data

@fullmoon

Scratch isn't something for just teaching programming concepts, or creating different complicated projects. It's something to help kids easily create interactive media, and express their feelings, and make different unique projects! Multi-dimensional arrays and such might be something wanted by the advanced users like you, to create advanced projects, however, that's not essentially what Scratch is for.


http://i.imgur.com/WBkM2QQ.png

Offline

 

#14 2010-06-03 17:05:57

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Scratch 2.0 Web Data

@Lucario

I agree that Scratch should definitely be seen primarily as a way for people to express themselves. The points I made earlier focused on Scratch's use not as a teaching tool, but as a way for people to learn to program. I speak only from my own experience here, but when I started using Scratch I had almost no programming knowledge, but I knew enough about computers in general to know that what I had discovered was pretty cool. No, make that absolutely brilliant. However, within minutes of opening Scratch 1.1 I was disappointed with a few things:

-Why can't I duplicate sprites?
-Why can't I broadcast to just one sprite?

It wasn't until later as I got the hang of Scratch that I began wishing for a way to connect to the internet. I would have said it in those terms, not, "I wish I could make HTTP calls". The fact that I used that terminology indicates that I had to go beyond Scratch to learn how to do that sort of thing. All the time I spent getting the hang of language syntaxes just to read a web page could have been spent actually doing fun things with Web data if only Scratch had that functionality.

You pointed out that you have no interest in learning how to program with web data, but from my point of view it seems that many other people do, including the Panther team. A lot of the suggestions in the forums are about this, and Scratch 2.0 is going to have a way to do this regardless of what is written in this thread. My purpose in posting was to propose one way of doing it that would be broader than just social media.

One more thing; I concede that this is not the easiest thing in the world for new users to pick up immediately. I just think that connecting Scratch 2.0 to only certain parts of the web will discourage, rather than encourage creativity. And I also agree that there are simpler ways to do this. I would really like to see the persistent Shariables from NetScratch brought into the next version.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#15 2010-06-06 12:42:47

jake451998
Scratcher
Registered: 2009-04-01
Posts: 100+

Re: Scratch 2.0 Web Data

pretty good idea, sadly, 2.0 doesn't come out for probably another year  sad
It's a really nice idea, so it opens a webpage?

-jake451998  cool

Offline

 

#16 2010-06-06 12:46:08

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Scratch 2.0 Web Data

jake451998 wrote:

pretty good idea, sadly, 2.0 doesn't come out for probably another year  sad
It's a really nice idea, so it opens a webpage?

-jake451998  cool

I'm pretty sure it would draw content from the internet. For example, if I made an image and uploaded it to the internet, the suggested blocks would take that image and turn it into a new costume. Same for sounds, etc.

Offline

 

#17 2010-07-09 09:33:43

jake451998
Scratcher
Registered: 2009-04-01
Posts: 100+

Re: Scratch 2.0 Web Data

coolstuff wrote:

jake451998 wrote:

pretty good idea, sadly, 2.0 doesn't come out for probably another year  sad
It's a really nice idea, so it opens a webpage?

-jake451998  cool

I'm pretty sure it would draw content from the internet. For example, if I made an image and uploaded it to the internet, the suggested blocks would take that image and turn it into a new costume. Same for sounds, etc.

I see, so could it work like in flash and open a webpage using a web browser?

Offline

 

#18 2010-07-09 12:40:22

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Scratch 2.0 Web Data

jake451998 wrote:

coolstuff wrote:

jake451998 wrote:

pretty good idea, sadly, 2.0 doesn't come out for probably another year  sad
It's a really nice idea, so it opens a webpage?

-jake451998  cool

I'm pretty sure it would draw content from the internet. For example, if I made an image and uploaded it to the internet, the suggested blocks would take that image and turn it into a new costume. Same for sounds, etc.

I see, so could it work like in flash and open a webpage using a web browser?

Well, it would draw the content of the webpage - because what you see on the internet isn't what's written - you get code. You could probably make an internet browser in Scratch with this feature by drawing the code from a webpage, but it would likely be slow, etc.

Offline

 

#19 2010-07-14 07:24:19

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Scratch 2.0 Web Data

You know fullmoon, you're very right on all of it. We shouldn't be calling the Scratch community "graphical programmers: keep away C++" Kids like me have big support blocks to programming in text. Listen, I'm under ten and I'm capable of very advanced programming. If you guy don't agree with us, we'll just have to make our own version of scratch that has capabilities for the web. If scratch 2.0 is still in squeak, I'll learn squeak. If they convert to flash, I'll work on sending and retriving request using the post method via action scripts. Anybody agree?
-Derek


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#20 2010-07-14 07:25:42

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Scratch 2.0 Web Data

And if SCratch 2.0 really was in flash, it would be super cool if there were to be an action script view/editor/block.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#21 2010-07-14 12:44:38

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Scratch 2.0 Web Data

Well I know Actionscript so I'll be playing with the 2.0 source regardless.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#22 2010-07-16 15:11:56

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Scratch 2.0 Web Data

well, yeah  big_smile


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#23 2010-07-27 22:13:24

Zoomreddin
Scratcher
Registered: 2009-03-27
Posts: 100+

Re: Scratch 2.0 Web Data

I think this is a great idea.  smile  (Though I don't know how the project will be able to download the costume or sound...) But otherwise it's an awesome idea! (I love reading posts like this!)


http://mag.racked.eu/image/46.1/Bombs+Away%21/mca.png

Offline

 

#24 2010-07-27 23:35:03

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Scratch 2.0 Web Data

Zoomreddin wrote:

I think this is a great idea.  smile  (Though I don't know how the project will be able to download the costume or sound...) But otherwise it's an awesome idea! (I love reading posts like this!)

Thanks for your support! Loading images/sounds would be really simple. Basically you can put a URL into the switch to costume/play sound blocks, and if Scratch downloads a valid file (image/sound) then it will display it or play it!

If you agree be sure to vote this idea up on Scratch Suggestions!


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#25 2010-08-20 16:53:50

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Scratch 2.0 Web Data

1. If you are complaining about the block palette, then use the hide/show blocks like the Motor blocks do!  big_smile

2. Wouldn't you need a plugin for this?


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

Board footer