Klumsy![]() Administrator Posts: 1061 From: Port Angeles, WA, USA Registered: 10-25-2001 |
i am starting to play around with linux, after not touching it all since the mid 90's.. i have some tehcnical question, wondering if anybody may know the answers one of the most powerful things in windows (and also one of the things that makes it so slow) is COM (activex, ole etc). i am wondering if linux has such a model yet.. the nice thing about some microsoft products (as if anything is nice) is how i can automate different functionality of them through com, i can make a program that drives any office application, in so many ways possible.. i can automate internet explorer and use so many interfaces to mess with its internals, add functionality in my own app etc is there something like COm at all in linux (and don't say corba) and if so, is it used by many another question: i know linux has its equivilent of DLLS, but does it have object orientated dlls (as many activeX ones are), but also microsoft visual C++ has its own special dll format to make DLL's object oriented rather than just a list of functions. Karl ------------------ |
CobraA1![]() Member Posts: 926 From: MN Registered: 02-19-2001 |
Hmm, I don't know the answer to all those questions. COM sounds dangerous - with that level of integration, what kind of damage could a virus do (ActiveX comes to mind . . .)? What do you automate with it anyway? I think there is some form of it - I see a lot of programs that use the gecko renderer for displaying HTML, so I think it might be possible. How it's done exactly, I don't know. But I personally dislike the "app within another app" idea of doing stuff. Creates more problems than it solves, IMHO. ------------------ Switch Mayhem now available! Get it here |
Klumsy![]() Administrator Posts: 1061 From: Port Angeles, WA, USA Registered: 10-25-2001 |
well first i'll answer your questions, but my main need with linux is not such a deep automation interaction with other applications as i specified with com, but basically shared objects, DLLs that are object orientated. There is a danger of such intergration, but its not as huge as you think, but i'll cover that a little later What sort of things do i use COM and ole automation for? another example of using the internal interfaces of IE is something i am working on now.. we use reporting services for reporting, which generates itneractive webpages, we have our own front end that generates the requests, sets everything up etc, that is all fine.. however reports can have drill through links to other reports (i.e you have a customer report, that lists the customers orders, and then if you click on the order it will go and run a specific order report for that order).. reporting services makes this link automatically , and if you click on it, it will automatically run it.. i don't want this behaviour, i want it to be if they click on a report, our system with intercept that click, then we'll add a report request in our reporting engine, to the reporting queue, and the the server will go and run the report, and it will come into their reporting inbox.. so using com again, i can override the event for when a link is clicked, and if its a link of importance to me, run my own code as above.. another example of using the webbrowser is internet explorer comes with a MSHTML editing control, and many applications that have WYSIWYG use that control in their applications.
also maybe you want to imbed a pdf viewer into your application.. maybe all your customers will have excel installed, so you can imbed an excel sheet into your application, using COm to set various restrictions, and various calculations etc.. one example i've used excel for, is a certian product outputs only excel XP sheets, and our users used excel 2k, so i used a copy of excel 3k on a server and using COM, i wrote a program that opens all these3 excel XP files, then exports them to excel 2k. another example with excel is first autoting some SQLSERVER functionality to do a DTS (data transform), then creating an excel file, populating the fields accordingly and saving it. the list goes on and on and on but this isn't the main use of com, these are using external applications, you can see these applications not only as applications but also as libraries. another area of com/activex is visual controls.. lets say i made a commerical control for resale that is a image viewer and it can load a JPG and BMP formats. being an object is absolutely necciary (a standard DLL would be very very tedious to use), because you can basically just create a new instance of this Imageviewerclass.. set its visual container, run methods to load, save, maybe edit, apply some filters zoom etc.. and because its a proper object (whether a COM one, a delphi component, a C# assembly, or a java class) somebody can decent from it and make a version that can load PNG's and maybe have some more filters, maybe color reduction or whatever. trying doing that with a standard DLL.. you can have ZIP libraires that are plain dll's but having one that is an object is much better alot of the time.. my interest really isn't the automation side of things, but whether linux SO's natively support objects or are just plain old windows DLLS (plain old windows DLLs) don't support objects, they are just a list of functions, and only specify the function name actually, a raw entry point into code.. the dll can't tell you what calling convention that function has, it can't tell you whether it has a return value, or any of the parameters, the person who writes code that communicates with the DLL just has to know that, many dlls don't even have a function name, but rather just a NUMBER, so the table is just a list of number indexes and their relative entry point, the calling code has to have a header file that links up that DLL export number with the correct name, correct parameters, and correct calling convention. i'm wondering if linux SO's are the same i'm wondering if maybe GNU C++ has such a method (and i suppose it wouldn't have to be compatible since its the standard C compiler) also delphi has special DLLS (packages) that can contain classes and components. i wonder what languages in linux can contains Shared Objects that are acutally object orientated, and i'm curious about compatibility between languages in linux. i was just hoping that they would have build a standard object orintenated shared object into the kernal by now (and hopefully a better one than COM). it would so increase the value of linux, because such code reuse is sooo useful and flexible and probably one of the most powerful things about windows (though when used wrong it makes windows sooo slow) as for the security stuff of COM etc.. well people getting viruses etc from activeX controls in web pages is not so much because of COM technologies but because by running that activex control is just letting internet explorer be the UI host for a program, so its the same as downloading a program from the net and running it on your computer, because that activex control has its own code, and it can run and do whatever it wants.. activex controls inside webpages weren't designed for that scenario..
good concepts, bad implementation - bad neighbour ------------------ |
MadProf Member Posts: 181 From: Larnaka, Cyprus Registered: 01-24-2001 |
Hi klumsy, I have not done much GUI programming in linux, but I believe it is possible. In gnome, there is (lib)bonobo, which is a system for sharing functionality, embedding abiword or gnumeric or whatever. I think KDE has something similar. Actually, KDE probably has something better, but I irrationally dislike KDE (dunno why) and so can't tell for sure. I know one can embed mozilla into apps fairly easily, many do so. I don't know if it is as easy as embedding IE in VB (I doubt it. I once wrote a veeery simple browser in VB, back in my windows days, embedding IE was almost just drag and drop). Um, anyway. Bonobo might be what you are looking for. And KDE almost definately has something. About C++/OO SO files, I expect so. I have not ever done C++ though, so I'm not sure. KDE uses C++ for everything though, and they embed all kinds of weird things (take a look at some of the konquerer screenshots sometime), so I would guess so. Here is an article about something... looks rather horrible to me, but what do I know Here is a KDE article, which tells about how they do it (I think) it doesn't look so bad here. If you are into C++ and embedding and all that, you will probably find KDE more your thing. Anyway, before I spout any more rubbish, and say any more stupid things, I'm off to bed. Hope I haven't offended you or said anything too truely inane, Dan ------------------ |
Klumsy![]() Administrator Posts: 1061 From: Port Angeles, WA, USA Registered: 10-25-2001 |
you haven't offended me, thank you for the time and effor you put into researching this info for me, it is quite insightful and helpful.. from the first article it shows me that linux doesn't have that functionality built into it , but you rather have to make creative hacks to 'simulate' it yourself.. rather sad.. the kde looks interesting and promising though ther is a possibility its components are only visual.. it would be good to use nonvisual ones also thanks again ------------------ |
CobraA1![]() Member Posts: 926 From: MN Registered: 02-19-2001 |
First off, it's possible to some extent - I've seen the Gecko engine from Mozilla in many projects. In fact, that's probably what you'll want for most of the webpage stuff. Not sure what CORBA is, or why you dislike it - but you might want to take another look at it? "i can automate internet explorer and use so many interfaces to mess with its internals" hint: Open source = you can mess with the code directly, not just through interfaces . . . In fact, AFAIK, most people who do the kind of stuff you describe will actually take advantage of Open Source and directly edit one or both programs to fit their needs. You might want to do what other peeople have - use the Gecko engine. And consider complaining to the bank about IE-only pages . . . As far as your reporting problem - well, I personally use PHP to generate webpages, perhaps you can find an open-source or more pluggable-friendly version of your reporting program? Or, if it's a relatively simple program, just make your own? "another example is flash, you can imbed flash into your own applicatins" The last thing I need is flash in an app . . . (and in any case, I program w/Java, which has its own built-in HTML engine and 2D drawing stuff "also maybe you want to imbed a pdf viewer into your application.." GhostScript "maybe all your customers will have excel installed" You'll have to use Windows, because there's no Excel on Linux I can't say much about whether Linux DLLs are object-oriented, because I've never programmed DLLs, it might be worth a look at the GCC docs. If object-oriented dlls are part of the C/C++ specs, then yes - I do know that GCC follows the specs very closely. If not, then maybe, maybe not. "i think java classes are similar" Yup ------------------ Switch Mayhem now available! Get it here |