Hi,
I want to install a package from a deployed EXE, and I've found that the PackageManager doesn´t work as I expected. Anyone knows if there is an easy way to do this?. The idea is to change an application while it's running (or at startup) adding classes, methods or resources. I guess it should be similar to using binary packages with the web applet, but I've never used it, in my case loading the packages from disk. Unitl know I only had success compiling some chunk code, but I would like to know if there is an esay way to do it that I didn´t find yet. Any ideas?. Thank you very much. Diego |
Diego,
> I want to install a package from a deployed EXE, and I've found that the > PackageManager doesn´t work as I expected. Anyone knows if there is an > easy way to do this?. The idea is to change an application while it's > running (or at startup) adding classes, methods or resources. I guess it > should be similar to using binary packages with the web applet, but I've > never used it, in my case loading the packages from disk. > Unitl know I only had success compiling some chunk code, but I would like > to know if there is an esay way to do it that I didn´t find yet. Any > ideas?. Thank you very much. I think that binary packages are the answer. With that said, I think the preferred approach is to get very good at deploying executables, and just change/deploy/install when needed. Yes, I realize that is sometimes easier said than done, but so is making sense of multiple versions of executables and binary packages. Also, Dolphin executables tend to be quite small. The minimum size could be better (and it is getting smaller with time), but the marginal cost of additional features is usually small. High speed connections are common, so download size is often not as important as it once was. Have a good one, Bill -- Wilhelm K. Schwab, Ph.D. [hidden email] |
Thank you for the answer, but perhaps I didn't explain well what I'am
looking for. I have an application that must be installed in serveral places, with minor differences in each installation, like tax policies, language, etc. I want to distribute my EXE file (and DLLs) with some packages that apply these differences (sort of service packs). For example if I install the system in Spain, the EXE folder would contain a SpainTaxPolicy.pac and a SpanishLanguage.pac. If a user ask me for a special module I would put a SpecialModule.pac. Having in mind that I can distribute the compiler it makes sense to me to make this kind of dynamic regionalization or improvements. I don´t care about the size of the packages, and I don´t even care if they are compiled. In fact I see I would have more flexibility with non compiled packages (like loose methods). I beleive that for this kind of systems this aproach could solve a very old problem, that is usually solved using parameters or components. It's seems great no to have to worry at fist what parts of your system should be "prepared" to be changeable. I also think that I would like to factorize those packages after some time and maybe move some behavior to the EXE. Thank you for your answer. Diego |
Diego,
> Thank you for the answer, but perhaps I didn't explain well what I'am > looking for. You did - I simply disagree with the "accepted" solution to the problem. That might sound hostile, but it is not intended that way. > It's > seems great no to have to worry at fist what parts of your system should > be "prepared" to be changeable. Yes, but that is the first thing to be lost with the addition of artificial boundaries. > I also think that I would like to > factorize those packages after some time and maybe move some behavior to > the EXE. But with a monolithic exe, you don't have to worry about moving anything - just change it, hopefully making it better. I believe that you and your users will be better off if you build one exe, ship it to all users, and simply activate the correct portions for each locale. Then you can more quickly get to the business of making it all better, w/o worrying about boundaries that do not need to exist. My experience suggests that components add far more complexity than functionality. Just my 2 asCents. Have a good one, Bill -- Wilhelm K. Schwab, Ph.D. [hidden email] |
I agree with you about components, but I don´t see these packages are
components, because they don't define an interface. They just add more behavior, or change existing one, to the application (ie the EXE). I see them as plugins without the componet limitation. If I understand you well, you said that I should make an EXE with everything in it, and then activate its parts. But I see the limitation of not being able to add, not predicted parts. Thank you for your comments. Diego |
In reply to this post by DiegoC
"DiegoC" <[hidden email]> wrote in message
news:[hidden email]... > Hi, > I want to install a package from a deployed EXE, and I've found that the > PackageManager doesn´t work as I expected. Anyone knows if there is an > easy way to do this?. The idea is to change an application while it's > running (or at startup) adding classes, methods or resources. I guess it > should be similar to using binary packages with the web applet, but I've > never used it, in my case loading the packages from disk. > Unitl know I only had success compiling some chunk code, but I would like > to know if there is an esay way to do it that I didn´t find yet. Any > ideas?. Thank you very much. The source package system is not really intended to support run-time package loading, and as such the Lagoon deployment system attempts to remove it. You could probably press the PackageManager into service for the purpose you describe, and persuade Lagoon not to unload it by creating your own ImageStripper subclass, but I don't really see how it gains you much over just loading in a chunk file unless you also want to be able to unload packages. There might be licensing implications as well (I can't remember off the top of my head). Regards Blair |
Blair, you are right, that's my problem. I'am reading the licence and I see
what you said, I'am not allowed to ditribute ChunkSourceFiler and other necessary classes. I will see if I write something or use a goodie I saw at smalltalking.net that have similar behavior. As I undestand I'am allowed to use and distribute the compiler. Thank you. Diego |
In reply to this post by DiegoC
Diego,
> If I understand you well, you said that I should make an EXE with > everything in it, and then activate its parts. But I see the limitation of > not being able to add, not predicted parts. Thank you for your comments. My concern is that as you add things not in the exe, you will get a soup that could do some very confusing things. I am much more comfortable with the idea of deploying from an image (so all classes are the "version") that passes tests. From there, let InnoSetup or something like it do the best it can at compressing the result. Of course, if you have users with slow connections, then you might have problems. In my case, I have a pathetic connection at home, but do most of my downloads at work. Have a good one, Bill -- Wilhelm K. Schwab, Ph.D. [hidden email] |
I don't have problems with the size of the application, I will distribute
it on CD. The problem I have to solve is that each installation will be different one from the other, it could be seen as a different system en each application. And also, during the time they will be changing. They will be in different countries and circunstances. In the classic paradigm of systems where you have program+data, it is expected to have the same program(EXE)in each installation and complety different data on each one. Having an ambient like Smalltalk I feel that every installation is different, so that's why I see important to have several alternatives to load behavior dynamically. I'am not sure I understood what you mean about passing test. Diego |
In reply to this post by DiegoC
DiegoC wrote:
> I want to install a package from a deployed EXE, and I've found that the > PackageManager doesn´t work as I expected. Anyone knows if there is an > easy way to do this?. The idea is to change an application while it's > running (or at startup) adding classes, methods or resources. I guess it > should be similar to using binary packages with the web applet I suspect that using binary packages directly would be a better match for your requirements than attempting to duplicate the functionality of the Package system. -- chris |
Chris,
Would you have any idea how I could do it?, I mean loading binary packages from en exe?. Should I install the web depelopment kit?. Thank you !!! Diego |
In reply to this post by DiegoC
"DiegoC" <[hidden email]> wrote in message
news:[hidden email]... > Blair, you are right, that's my problem. I'am reading the licence and I > see > what you said, I'am not allowed to ditribute ChunkSourceFiler and other > necessary classes. I will see if I write something or use a goodie I saw > at smalltalking.net that have similar behavior. As I undestand I'am > allowed to use and distribute the compiler. Thank you. I don't think we would necessarily have a problem with you distributing ChunkSourceFiler, assuming you aren't distributing an application that makes available the ability to do Smalltalk development to an end-user. Such an application would require a special license. Regards Blair |
In reply to this post by DiegoC
DiegoC wrote:
> Would you have any idea how I could do it?, I mean loading binary packages > from en exe?. Should I install the web depelopment kit?. Thank you !!! You would need the web development kit, yes. Andy recently posted a link to an example of an application that is designed to load binary packages "in the field", in fact it is a simple framework like the Java WebStart architecture. The thread can be found here: http://groups.google.com/groups?threadm=40773ac9%40news.totallyobjects.com&rnum=1 Also, I've appended an extract from an old post of mine which may help a bit. Whatever you do, you'll have to find some way to deal with methods from the base image that are /only/ used by the dynamically-loaded add-ins, since the default image stripper will probably remove them. You could try to ensure that they are included with the binary packages, or you could use an image stripper that leaves the core classes untouched (which is what I think Andy's "WebStart" does). BTW, I think this is the best argument against dynamically loading add-ins; Bill's suggestion of just including /all/ the "optional" code in the deployed .exe and ignoring (or letting the garbage collector remove) the unwanted code/objects has the advantage that you don't need to take special care of the stripping process. -- chris ------------------------------------------- Here's an example: Create a new package, say called 'Temp' Create a new class in that package, say called 'AAATemp'. Give it a method: ============== AAATemp>>tryMe Notification signal: 'It worked'. ============== In the package browser, select the package and "Deploy Binary Package". You'll be prompted for a "certificate", just click OK (which will deploy with no certificate). You should now have a 'AAATemp.pak' file. Start a clean image, from it evaluate: cl := ClassLocator codeBase: '' packageName: 'Temp' key: 'AAATemp'. class := cl locateClass. You'll be prompted for whether you want to "trust" the loaded code (with no certificate). Answer yes. Now you can use your dynamically loaded class: class new tryMe. should print 'It worked!' to the Transcript. |
Chris,
Thank you very much!!!!!!!!, I will study it carefully. Another good news is that I can use the ChunkReader from my application, what already allowed me to do this using source packages. Perhaps for my solution source packages would be better because I can add loose methods, that are mostly what I will want to distribute. Anyway what you sent is very usefull and me makes me think that I could use it to do remote updates or things like that. Thank you again. Diego |
In reply to this post by Blair McGlashan-3
I don't want my users to make Smalltalk development, I want to use the
power that have Smalltalk for being updated while it's running, I will write the code. Thank you for your comments. I already solving my problem using the ChunkReader, I will write OA when finished to check if it's OK what I have done. Distributions will start in 4 or 5 months, I think. Diego |
Free forum by Nabble | Edit this page |