 |
 |
Apple and Scripting - Water and Oil
|
 |
|
 |
|
Forum Regular
Join Date: May 2001
Location: Mnt View, CA
Status:
Offline
|
|
I have been working a lot on Windows 2000 lately and I have to admit that I was shocked how much Windows has changed for the better the past years.
Ok, their interface is not as nice as OS X, far from it
But what I was surprised to see is that how powerful the COM revolution actually is. I was writing some scripts to automate and virtualize some things in Exchange Server. This is fairly complicated application, distributed on multiple machines etc. Everything I wanted to do was super easy to do, no matter if I was doing things locally or over DCOM. Compare that to ssh and shell scripts on Unix hahaha
This doesn't come for free and the developers of Exchange deserve a lot of credits. But they could only do this because Microsoft has provided a very flexible and powerful platform for shared objects and scripting. It was not an easy birth, we saw dll, ole, com, activex, dcom, mts and com+. But now that it is here and most applications support this and windows allows me to use these objects from practically whatever language I want to, it is revolutionary.
Microsoft has managed to take the leap from standalone applications to multi-tier distributed system.
(Note: it may sound that I'm already a little off topic but I have too much to write about this  ).
What is Apple thinking with their scripting policy?
Most things Apple has done I've liked, some things I really love, but there is one thing from Apple that is so ugly and bad that it gives me the creep every time I try to use it - it is AppleScript.
I have done tons of scripting both on Linux and - yes - on Windows. Well, people may have their mixed opinion on Microsoft but one thing they have done well is making absolutely everything scriptable through COM objects. Again, not everybody likes the COM implementation, but the fact still remains, Microsoft's combination of the Windows Scripting Host and COM is powerful and very convenient, and people can choose between many scripting languages.
I think Microsoft have done two things correctly regarding scripting. First, 3rd party objects are not tied to one language. Secondly, over the years, most applications from Microsoft are highly scriptable.
Someone was complaining the other day in another thread that all those iApps, like iTunes, iPhoto, iMail do not work together. Something like the iPhoto slide show can only play single song. I bet you if these application would export a proper COM like interface we would over time see all these apps start working more and more closely together. With something like DCOM capabilities there would be no reason why I can't use my iTunes on my iBook to control the iTunes on my desktop (that one is connected to my stereo).
So what does Apple have to do to fix it.
Well, first they should replace the ugly duckling - AppleScript with something else.
Then, as I see it they need to decide how applications can export interfaces and register them, similar to COM on Windows.
Microsoft is these days pushing their .NET framework heavily and from what I have read it should replace COM over time. It is maybe not fair to say that .NET is a reimplemented Java but it share a lot of the same ideas.
And Apple has its JAVA runtime in OS X already. Maybe they can use that as a base.
Scripting is in my opinion very important and powerful tool to integrate and customize applications. It has come a long way since only useful to write simple batch programs in shell scripts and bat files.
If Apple does not provide us with an decent platform all the applications will be islands. One only has to explore how applications on Windows are truly multi-tier and a lot of them share huge trunk of code/technology that would be virtually impossible without the COM revolution (ok evolution).
Maybe I am far off here but I really think Apple needs to do something.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Location: London
Status:
Offline
|
|
there would be no reason why I can't use my iTunes on my iBook to control the iTunes on my desktop (that one is connected to my stereo).
Of course you can - applescript has worked over IP for years! I control my server (which is hooked up to my Amp with iTunes) from my pismo PB.
There are several ways of achieving this - I suggest you go to versiontracker and search for itunes - there are plenty of remotes.
I think Microsoft have done two things correctly regarding scripting. First, 3rd party objects are not tied to one language. Secondly, over the years, most applications from Microsoft are highly scriptable.
You don't actually have to use AppleScript English - as far as I remember someone recently released a JavaScript language plug-in - So you can write AppleScripts in JS - if you want to.
Almost all of Apple's own s/w is scriptable - and adding Applescript support to Cocoa apps is supposedly pretty easy.
[ 03-21-2002: Message edited by: Diggory Laycock ]
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: May 2001
Location: Mnt View, CA
Status:
Offline
|
|
Originally posted by Diggory Laycock:
<STRONG>
You don't actually have to use AppleScript English - as far as I remember someone recently released a JavaScript language plug-in - So you can write AppleScripts in JS - if you want to.
Almost all of Apple's own s/w is scriptable - and adding Applescript support to Cocoa apps is supposedly pretty easy.
[ 03-21-2002: Message edited by: Diggory Laycock ]</STRONG>
I found a Javascript OSA from
www.latenightsw.com, and I have to admit, it is wonderful.
No more AppleScript 
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Apr 2001
Status:
Offline
|
|
Applescript is object-oriented, user-oriented. That means user productivity.
For programmers, please take a look at the Cocoa development tools in OS X.
Cocoa has an object-oriented API, and you can use C++, Java, Objective-C, and Applescript. It comes free with OS X.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jul 2000
Location: Washington, DC
Status:
Offline
|
|
This is the lamest argument ever made: Microsoft software works for me, thus AppleScript sucks.
Why don't you do a little researching before you spout off next time?
I won't claim to know the slightest thing about this COM stuff you speak of, but it sounds like it works. Great. But from an end-user standpoint, can the average user easily pick it up and control any (that's right, every mac app can be controlled at some level - sometimes just opening, quitting, manipulating windows, but always something) application? Doubtful, otherwise I'd have heard of it.

|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status:
Offline
|
|
Originally posted by aladdinsane:
<STRONG>I have been working a lot on Windows 2000 lately and I have to admit that I was shocked how much Windows has changed for the better the past years.</STRONG>
This is true
<STRONG>
Ok, their interface is not as nice as OS X, far from it
</STRONG>
A matter of taste, but I agree
<STRONG>
But what I was surprised to see is that how powerful the COM revolution actually is. I was writing some scripts to automate and virtualize some things in Exchange Server. This is fairly complicated application, distributed on multiple machines etc. Everything I wanted to do was super easy to do, no matter if I was doing things locally or over DCOM. Compare that to ssh and shell scripts on Unix hahaha
</STRONG>
perl anyone? perl/tk, Tcl/tk? applescript xml-rpc?
<STRONG>
This doesn't come for free and the developers of Exchange deserve a lot of credits. But they could only do this because Microsoft has provided a very flexible and powerful platform for shared objects and scripting. It was not an easy birth, we saw dll, ole, com, activex, dcom, mts and com+. But now that it is here and most applications support this and windows allows me to use these objects from practically whatever language I want to, it is revolutionary.
Microsoft has managed to take the leap from standalone applications to multi-tier distributed system.
</STRONG>
I agree that it is very easy on Windows and I'm sure there are many large corporations that use Excel spreadsheets scripted to use MSSQLserver.
<STRONG>
(Note: it may sound that I'm already a little off topic but I have too much to write about this  ).
What is Apple thinking with their scripting policy?
Most things Apple has done I've liked, some things I really love, but there is one thing from Apple that is so ugly and bad that it gives me the creep every time I try to use it - it is AppleScript.
</STRONG>
I know what you mean - the syntax is harrowing for people who come basic or c based languages, but, as others have noted here, OSAX let's you use other languages.
<STRONG>
I have done tons of scripting both on Linux and - yes - on Windows. Well, people may have their mixed opinion on Microsoft but one thing they have done well is making absolutely everything scriptable through COM objects. Again, not everybody likes the COM implementation, but the fact still remains, Microsoft's combination of the Windows Scripting Host and COM is powerful and very convenient, and people can choose between many scripting languages.
</STRONG>
Here I must add that the Win scripting host is from a security aspect an absolute nightmare - It enables windows to do things like have a webpage as a desktopbackground but it has no inbuilt protection against people using outlook vb virii or the xml javascript virus to gain full access to the machine. In a multi-tiered environment security becomes even more important and I must say that MS doesn't even seem to have put anything apart from a cursory look into security, which is why java is the dominant language for multi-tiered applications
<STRONG>
I think Microsoft have done two things correctly regarding scripting. First, 3rd party objects are not tied to one language. Secondly, over the years, most applications from Microsoft are highly scriptable.
</STRONG>
see what the others wrote on this
<STRONG>
Someone was complaining the other day in another thread that all those iApps, like iTunes, iPhoto, iMail do not work together. Something like the iPhoto slide show can only play single song. I bet you if these application would export a proper COM like interface we would over time see all these apps start working more and more closely together. With something like DCOM capabilities there would be no reason why I can't use my iTunes on my iBook to control the iTunes on my desktop (that one is connected to my stereo).
So what does Apple have to do to fix it.
Well, first they should replace the ugly duckling - AppleScript with something else.
Then, as I see it they need to decide how applications can export interfaces and register them, similar to COM on Windows.
</STRONG>
again you've seen that javascript is available as an OSAX plugin
<STRONG>
Microsoft is these days pushing their .NET framework heavily and from what I have read it should replace COM over time. It is maybe not fair to say that .NET is a reimplemented Java but it share a lot of the same ideas.
And Apple has its JAVA runtime in OS X already. Maybe they can use that as a base.
Scripting is in my opinion very important and powerful tool to integrate and customize applications. It has come a long way since only useful to write simple batch programs in shell scripts and bat files.
</STRONG>
Tcl and perl say anything to you? Perl has been around since the early eighties and supports everything plus the kitchen sink including c-calls, remote scripting, system scripting, you name it(although the syntax sucks badly)
<STRONG>
If Apple does not provide us with an decent platform all the applications will be islands. One only has to explore how applications on Windows are truly multi-tier and a lot of them share huge trunk of code/technology that would be virtually impossible without the COM revolution (ok evolution).
Maybe I am far off here but I really think Apple needs to do something.</STRONG>
They have. Micorosft needs to do something about security. Judging from all the holes in whs and already appearing ones in .Net I doubt that .Net will unseat java in a hurry.
|
|
weird wabbit
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|