Hello
community,
is it possible, to
call a method of a Squeak class by another windows programm, e.g. Excel, via an
API interface?
Thank you very
much.
Best regards Uwe Loew _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Am 03.07.2006 um 11:30 schrieb Loew Uwe (DS/EES1):
> Hello community, > > is it possible, to call a method of a Squeak class by another > windows programm, e.g. Excel, via an API interface? Not easily. Not impossible either, though - what kind of API do you have in mind? Knowing a bit more about the problem might help giving a more specific answer. - Bert - _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Hello,
Thank you very much for your fast response. I have a given program (written in squaek) and i want to automate the program from an other program (e.g. Excel). Is it possible to expose interfaces of classes (written in squeak) like it is possible with MS-COM or CORBA or do i have to write an adapter (maybe via TCP/IP?) for such reasons. I want to automate this program (call Squeak methods) with an other program written in VB6, and i wanted to know if there is any simple way to 'communicate' with squaek programs. Thanks Best regards Uwe Löw ---------------------------------------------------------------------------------------------------------------- Tel.: +49 711 811-45743 Fax: +49 711 811-31800 [hidden email] -----Ursprüngliche Nachricht----- Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Bert Freudenberg Gesendet: Montag, 3. Juli 2006 11:56 An: A friendly place to get answers to even the most basic questions about Squeak. Betreff: Re: [Newbies] API: Control Squaek by Excel Am 03.07.2006 um 11:30 schrieb Loew Uwe (DS/EES1): > Hello community, > > is it possible, to call a method of a Squeak class by another > windows programm, e.g. Excel, via an API interface? Not easily. Not impossible either, though - what kind of API do you have in mind? Knowing a bit more about the problem might help giving a more specific answer. - Bert - _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
On Jul 3, 2006, at 8:01 AM, Loew Uwe (DS/EES1) wrote: > Thank you very much for your fast response. > I have a given program (written in squaek) and i want to automate > the program from an other program (e.g. Excel). Is it possible to > expose interfaces of classes (written in squeak) like it is > possible with MS-COM or CORBA or do i have to write an adapter > (maybe via TCP/IP?) for such reasons. I want to automate this > program (call Squeak methods) with an other program written in VB6, > and i wanted to know if there is any simple way to 'communicate' > with squaek programs. I once hung out while John Pierce and Rob Rothwell wrote a proof of concept of such a thing. It used sockets to communicate between Excel formulas and Squeak. This was just an evening's work, so it wasn't complete, but the concept is good: this is the way the Squeak/.NET bridge originally worked. I've cc'ed John and Rob in case either one of them has more advice. Regards, Benjamin Schroeder _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Loew Uwe (DS/EES1)
Hi Uwe,
There are a number of ways that you can use to communicate with either Excel to Smalltalk or Smalltalk to Excel. The issue is really out of the huge number of options which one do you want to try? The best thing to do is to decide which things are important to you. Here are some things to consider: Will excel be talking to Smalltalk on the same machine? Will excel need to retrieve a response (is the communication two-way)? What are the performance requirements of your system? Does the conversation need to be sub-second or will minutes be ok? Will there be more then one client talking to Smalltalk at the same time? Is there a database involved between excel and Smalltalk (which could be the source of your communication also)? As an example of a really easy communication protocol you could simply define a text structure (say xml and then you could use SAX or DOM... :). Then on a Smalltalk instance you could have a separate process that polls for a text file to appear and then reads in the contents. Now all you have to do is get excel to write a file into a location that Smalltalk can read, which is easy to do. If you answer some of the questions maybe I can help more. Happy coding! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [hidden email] >From: Loew Uwe >Sent: Monday, July 03, 2006 5:30 AM >Hello community, >Is it possible, to call a method of a Squeak class by another windows >programm, e.g. Excel, via an API interface? >Thank you very much. >Best regards >Uwe Loew >Testsystems _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Hi Ron,
Thank you very much for your response. But i just wanted to know if there is a standardized way for Squeak programming language to expose classes / methods in an API-way (like COM or CORBA), so that i'm able to use these exposed classes / methods from another program. I know now that there is a bridge for .NET and Squeak, that might be a solution. Regarding to your questions: Will excel be talking to Smalltalk on the same machine? - may be. Will excel need to retrieve a response (is the communication two-way)? - Yes and it should be a synchron communication. What are the performance requirements of your system? - 1/100 second is the maximum. Will there be more then one client talking to Smalltalk at the same time? - at this time not. Is there a database involved between excel and Smalltalk (which could be the source of your communication also)? - No. Regarding your file or database communication i have to say, that i would not prefer this solution, because it's not safe enough. Somebody could influence the communcation in a very easy way. The second thing is, that if you want to use this communication via network, you have to share folders. Mit freundlichen Grüßen/Best regards Uwe Löw ---------------------------------------------------------------------------------------------------------------- Tel.: +49 711 811-45743 Fax: +49 711 811-31800 [hidden email] -----Ursprüngliche Nachricht----- Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Ron Teitelbaum Gesendet: Montag, 3. Juli 2006 17:03 An: 'A friendly place to get answers to even the most basic questionsabout Squeak.' Betreff: RE: [Newbies] API: Control Squaek by Excel Hi Uwe, There are a number of ways that you can use to communicate with either Excel to Smalltalk or Smalltalk to Excel. The issue is really out of the huge number of options which one do you want to try? The best thing to do is to decide which things are important to you. Here are some things to consider: Will excel be talking to Smalltalk on the same machine? Will excel need to retrieve a response (is the communication two-way)? What are the performance requirements of your system? Does the conversation need to be sub-second or will minutes be ok? Will there be more then one client talking to Smalltalk at the same time? Is there a database involved between excel and Smalltalk (which could be the source of your communication also)? As an example of a really easy communication protocol you could simply define a text structure (say xml and then you could use SAX or DOM... :). Then on a Smalltalk instance you could have a separate process that polls for a text file to appear and then reads in the contents. Now all you have to do is get excel to write a file into a location that Smalltalk can read, which is easy to do. If you answer some of the questions maybe I can help more. Happy coding! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [hidden email] >From: Loew Uwe >Sent: Monday, July 03, 2006 5:30 AM >Hello community, >Is it possible, to call a method of a Squeak class by another windows >programm, e.g. Excel, via an API interface? >Thank you very much. >Best regards >Uwe Loew >Testsystems _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
If you use a database (such as MySQL, SQL Server, Oracle, PostgreSQL),
the path is much more difficult to manipulate [if you use encrypted connections]. Note that by sharing COM over the network you're essentially doing the same as sharing a folder (as it goes through the same IPC$ share mechanism), and that sharing a folder can require a secure channel with encryption between all machines involved and authenticated, on Windows 2000 and above. It would probably be possible to implement COM in Squeak, but I don't know of any implementation at this time. (The same with CORBA.) -Kyle H On 7/4/06, Loew Uwe (DS/EES1) <[hidden email]> wrote: > Hi Ron, > > Thank you very much for your response. But i just wanted to know if there is a standardized way for Squeak programming language to expose classes / methods in an API-way (like COM or CORBA), so that i'm able to use these exposed classes / methods from another program. I know now that there is a bridge for .NET and Squeak, that might be a solution. > > Regarding to your questions: > Will excel be talking to Smalltalk on the same machine? - may be. > Will excel need to retrieve a response (is the communication two-way)? - Yes and it should be a synchron communication. > What are the performance requirements of your system? - 1/100 second is the maximum. > Will there be more then one client talking to Smalltalk at the same time? - at this time not. > Is there a database involved between excel and Smalltalk (which could be the source of your communication also)? - No. > > Regarding your file or database communication i have to say, that i would not prefer this solution, because it's not safe enough. Somebody could influence the communcation in a very easy way. The second thing is, that if you want to use this communication via network, you have to share folders. > > > Mit freundlichen Grüßen/Best regards > Uwe Löw > ---------------------------------------------------------------------------------------------------------------- > Tel.: +49 711 811-45743 Fax: +49 711 811-31800 [hidden email] > > > -----Ursprüngliche Nachricht----- > Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Ron Teitelbaum > Gesendet: Montag, 3. Juli 2006 17:03 > An: 'A friendly place to get answers to even the most basic questionsabout Squeak.' > Betreff: RE: [Newbies] API: Control Squaek by Excel > > Hi Uwe, > > There are a number of ways that you can use to communicate with either Excel > to Smalltalk or Smalltalk to Excel. The issue is really out of the huge > number of options which one do you want to try? > > The best thing to do is to decide which things are important to you. Here > are some things to consider: > > Will excel be talking to Smalltalk on the same machine? > Will excel need to retrieve a response (is the communication two-way)? > What are the performance requirements of your system? Does the conversation > need to be sub-second or will minutes be ok? > Will there be more then one client talking to Smalltalk at the same time? > Is there a database involved between excel and Smalltalk (which could be the > source of your communication also)? > > As an example of a really easy communication protocol you could simply > define a text structure (say xml and then you could use SAX or DOM... :). > Then on a Smalltalk instance you could have a separate process that polls > for a text file to appear and then reads in the contents. Now all you have > to do is get excel to write a file into a location that Smalltalk can read, > which is easy to do. > > If you answer some of the questions maybe I can help more. > > Happy coding! > > Ron Teitelbaum > President / Principal Software Engineer > US Medical Record Specialists > [hidden email] > > > >From: Loew Uwe > >Sent: Monday, July 03, 2006 5:30 AM > >Hello community, > > >Is it possible, to call a method of a Squeak class by another windows > >programm, e.g. Excel, via an API interface? > > >Thank you very much. > > >Best regards > >Uwe Loew > >Testsystems > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Loew Uwe (DS/EES1)
Uwe,
>From your responses: > Will excel need to retrieve a response (is the communication two-way)? - > Yes and it should be a synchron communication. > What are the performance requirements of your system? - 1/100 second is > the maximum. If it were me I would just use XML and UDP, I took a look at Excel and the UDP setups are pretty simple although there are some limitations (not knowing what you are working on it's difficult to know how the limitations will effect you) see: http://www.procdev.com/excelBridge.asp . It should be easy enough for you to add the protection you are looking for to secure the ports. If you decide to go with multiple clients at a later time then have a look at SharedQueue. If you are looking to go with a com object then have a look at: http://translate.google.com/translate?hl=en&sl=de&u=http://www.joops.com/Sma llCOMX.htm&sa=X&oi=translate&resnum=3&ct=result&prev=/search%3Fq%3Dsmallcomx %26hl%3Den%26lr%3D%26safe%3Doff but it's not free for commercial work. I believe there are excel examples included in the download. This will give you an activeX connection to excel which is really cool. There are of course limitations and security concerns with activeX and you will need a basic understanding of DLLs and C. I was very impressed with the software and how nice it was to work with. I used SmallcomX with VW not squeak so I'm not sure about how well it will translate. It turned out that I couldn't use the program because of some threading problems with SmallComX, but that was more the dll I was using then the program, it should work great for excel. I'm not familiar with the .Net to Squeak code so let us know how it works for you; I saw the .net code here: http://www.saltypickle.com/SqueakDotNet . When you get the excel com stuff working maybe you could post it for the community! Good luck! Happy coding! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists [hidden email] > From: Loew Uwe > Sent: Tuesday, July 04, 2006 8:40 AM > Hi Ron, > > Thank you very much for your response. But i just wanted to know if there > is a standardized way for Squeak programming language to expose classes / > methods in an API-way (like COM or CORBA), so that i'm able to use these > exposed classes / methods from another program. I know now that there is a > bridge for .NET and Squeak, that might be a solution. > > Regarding to your questions: > Will excel be talking to Smalltalk on the same machine? - may be. > Will excel need to retrieve a response (is the communication two-way)? - > Yes and it should be a synchron communication. > What are the performance requirements of your system? - 1/100 second is > the maximum. > Will there be more then one client talking to Smalltalk at the same time? > - at this time not. > Is there a database involved between excel and Smalltalk (which could be > the source of your communication also)? - No. > > Regarding your file or database communication i have to say, that i would > not prefer this solution, because it's not safe enough. Somebody could > influence the communcation in a very easy way. The second thing is, that > if you want to use this communication via network, you have to share > folders. > > > Mit freundlichen Grüßen/Best regards > Uwe Löw > -------------------------------------------------------------------------- > -------------------------------------- > Tel.: +49 711 811-45743 Fax: +49 711 811-31800 [hidden email] > > > -----Ursprüngliche Nachricht----- > Von: [hidden email] [mailto:beginners- > [hidden email]] Im Auftrag von Ron Teitelbaum > Gesendet: Montag, 3. Juli 2006 17:03 > An: 'A friendly place to get answers to even the most basic questionsabout > Squeak.' > Betreff: RE: [Newbies] API: Control Squaek by Excel > > Hi Uwe, > > There are a number of ways that you can use to communicate with either > Excel > to Smalltalk or Smalltalk to Excel. The issue is really out of the huge > number of options which one do you want to try? > > The best thing to do is to decide which things are important to you. Here > are some things to consider: > > Will excel be talking to Smalltalk on the same machine? > Will excel need to retrieve a response (is the communication two-way)? > What are the performance requirements of your system? Does the > conversation > need to be sub-second or will minutes be ok? > Will there be more then one client talking to Smalltalk at the same time? > Is there a database involved between excel and Smalltalk (which could be > the > source of your communication also)? > > As an example of a really easy communication protocol you could simply > define a text structure (say xml and then you could use SAX or DOM... :). > Then on a Smalltalk instance you could have a separate process that polls > for a text file to appear and then reads in the contents. Now all you > have > to do is get excel to write a file into a location that Smalltalk can > read, > which is easy to do. > > If you answer some of the questions maybe I can help more. > > Happy coding! > > Ron Teitelbaum > President / Principal Software Engineer > US Medical Record Specialists > [hidden email] > > > >From: Loew Uwe > >Sent: Monday, July 03, 2006 5:30 AM > >Hello community, > > >Is it possible, to call a method of a Squeak class by another windows > >programm, e.g. Excel, via an API interface? > > >Thank you very much. > > >Best regards > >Uwe Loew > >Testsystems > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |