[Vm-dev] Request: VM support for opening browser

Esteban Lorenzano estebanlm at gmail.com
Thu Jul 19 18:35:23 UTC 2012


AFAIS, opening an url in an external browser already "weakens the boundaries of the VM"
... nothing that cannot be solved by OSProcess and an strategy to see which command you need to execute. An approach that also allows you to control the parameters you need to open the browser or to configure it's behavior... something that becomes a pain in the VM, and not necessary at all. IMO, what does not need to take care about that is the VM... 

Esteban

On Jul 19, 2012, at 8:09 PM, Bert Freudenberg wrote:

> 
> On 19.07.2012, at 10:45, Esteban Lorenzano wrote:
> 
>> yes... but problem is "how"... we already has OSProcess plugin to manage that... 
> 
> The OSProcess plugin does not provide a specific functionality in the VM. It weakens the boundaries of the VM - if the image has to use FFI or OSProcess, then the machine you are programming in Smalltalk is not virtual anymore. Instead, it becomes a "real" machine: you are programming a PC or a Mac or a Linux box or an iPad or an Android phone etc. For some purposes that's exactly what you want. But not in general, and certainly not for something as useful as opening a URL in a browser.
> 
>> why add another plugin? 
>> why ScratchPlugin is better than OSProcessPlugin?
> 
> Because it hides the platform differences behind a simple interface. The implementation of primitiveOpenURL is different on Mac, Windows, Unix, iOS, Android, etc. The image does not need to care about that.
> 
> - Bert -
> 
>> 
>> On Jul 19, 2012, at 7:28 PM, Bert Freudenberg wrote:
>> 
>>> 
>>> On 19.07.2012, at 09:51, Esteban Lorenzano wrote:
>>> 
>>>> problem is that we have lots of "this basic function"... 
>>>> OSProcess is the place where it belongs... this basic function and all the others. 
>>>> I don't want to pollute VM with things that can be loaded in different ways. Don't want to require OSProcess? include it in core distribution... don't start to make the vm grow (and maintainability complexity increases even more) just because you don't like to require packages. 
>>>> 
>>>> Esteban
>>> 
>>> The purpose of the VM is to provide services to the image, and hide platform differences. A primitive in a plugin is precisely the right way to expose this functionality. Ever heard of capabilities? If I want to give my application the capability to open a web browser, why would I have to allow it executing any program on the system via OSProcess, or call any library function via FFI?
>>> 
>>> The primitive already exists. Are you opposed to including ScratchPlugin? If so, why?
>>> 
>>> - Bert -
>>> 
>>> 
>>> 
>>>> On Jul 19, 2012, at 6:42 PM, Bert Freudenberg wrote:
>>>> 
>>>>> 
>>>>> On 19.07.2012, at 00:16, Torsten Bergmann wrote:
>>>>> 
>>>>>> In the days of web based applications and Smalltalk web
>>>>>> frameworks etc. it is often very usefull to open a browser/URL
>>>>>> from within Smalltalk.
>>>>>> Currently one has to load FFI and ExternalWebBrowser
>>>>>> package.
>>>>>> 
>>>>>> Why not add support into the VM for that.
>>>>> 
>>>>> 
>>>>> +1
>>>>> 
>>>>> There is a primitiveOpenURL in the ScratchPlugin. Maybe one more reason to include it?
>>>>> 
>>>>> And -1 to requiring OSProcess or FFI for this basic function.
>>>>> 
>>>>> - Bert -
>>>>> 
>>>> 
>>> 
>> 
> 
> 
> 



More information about the Vm-dev mailing list