Okay, so I've proposed this before, in this thread. But I'm doing it again, with a blocks-based mockup:
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?
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)
Offline
that would be cool
Offline
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)
Offline
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?
Offline
Great idea, I support
Offline
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.
Offline
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!
Offline
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.
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)
Offline
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>
Offline
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.
Offline
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.
Offline
@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.
Offline
@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.
Offline
pretty good idea, sadly, 2.0 doesn't come out for probably another year
It's a really nice idea, so it opens a webpage?
-jake451998
Offline
jake451998 wrote:
pretty good idea, sadly, 2.0 doesn't come out for probably another year
![]()
It's a really nice idea, so it opens a webpage?
-jake451998![]()
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
coolstuff wrote:
jake451998 wrote:
pretty good idea, sadly, 2.0 doesn't come out for probably another year
![]()
It's a really nice idea, so it opens a webpage?
-jake451998![]()
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
jake451998 wrote:
coolstuff wrote:
jake451998 wrote:
pretty good idea, sadly, 2.0 doesn't come out for probably another year
![]()
It's a really nice idea, so it opens a webpage?
-jake451998![]()
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
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
Offline
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.
Offline
well, yeah
Offline
I think this is a great idea. (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!)
Offline
Zoomreddin wrote:
I think this is a great idea.
(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!
Offline
1. If you are complaining about the block palette, then use the hide/show blocks like the Motor blocks do!
2. Wouldn't you need a plugin for this?
Offline