Hi ALL!
Let's assume there is a big application. I would like to realize modular architecture. Whether there is any opportunity dynamically load in the application additional modules? I would like to write this modules in ST too (no such ActiveX library). That these modules could use all functionality of the host application freely. Modules are necessary because the application can have very much greater functionality. And in my opinion it is not reasonable to have it all at once in base image. Especially if to the user in current of a session 5 % from it can be demanded only. Whether it is possible to make out such modules as packages and dynnamically load into host application image? It is better even to ask so - Whether use of packages for realize modular architecture is possible? Or is exist way better? Pavel PS. Sorry for my English, I hope You can understand me. |
Pavel,
> Let's assume there is a big application. I would like to realize modular > architecture. Whether there is any opportunity dynamically load in the > application additional modules? I would like to write this modules in ST > too (no such ActiveX library). That these modules could use all [...] > Whether it is possible to make out such modules as packages and dynnamically > load into host application image? I assume your best choice would be to use binary packages (see http://www.object-arts.com/docs/htm_packagefiles.htm - PAK files). The package format was used to deploy Dolphin "Applets" and is a binary represenation of classes, definitions etc. like in a "regular" package. Some time ago Andy posted a "WebStart for Dolphin" application which basically consits of a host application which dynamically downloads and executes Dolphin Code (look here for more information: http://groups.google.com/group/comp.lang.smalltalk.dolphin/browse_thread/thread/49c8314748bfd24c/ac0c3bce457fa516?q=WebStart&rnum=1#ac0c3bce457fa516). As far as I understood you this is what you want to achieve. Do you allready deploy regular (resource-) DLLs with your app. If yes I could send you code which allows you to load Smalltalk packages from resource DLLs. CU, Udo |
Udo, Tnx alot for reply!
> > Whether it is possible to make out such modules as packages and dynnamically > > load into host application image? > I assume your best choice would be to use binary packages (see > http://www.object-arts.com/docs/htm_packagefiles.htm - PAK files). The > package format was used to deploy Dolphin "Applets" and is a binary > represenation of classes, definitions etc. like in a "regular" package. from docs: "The Binary Package facilities are not available in all versions of Dolphin but are introduced as part of the Web Deployment Kit" What does it mean - "as part of the Web Deployment Kit"? Can I use "Binary Package facilities" for non Web application? > Some time ago Andy posted a "WebStart for Dolphin" application which > basically consits of a host application which dynamically downloads and > executes Dolphin Code (look here for more information: > http://groups.google.com/group/comp.lang.smalltalk.dolphin/browse_thread/thread/49c8314748bfd24c/ac0c3bce457fa516?q=WebStart&rnum=1#ac0c3bce457fa516). > As far as I understood you this is what you want to achieve. Tnx, it's very interesting! Especially - Andy say: "If you choose to deploy the WebStart package you will see that it generates the launcher/VM executable. Remember, this is just a sample so you may want to take what is here and use it as a model to implement your own automatic application deployment and updating system based on binary packages." That's COOL! What now the status of "WebStart"? > Do you allready deploy regular (resource-) DLLs with your app. If yes I > could send you code which allows you to load Smalltalk packages from > resource DLLs. No, I'm just thinking about "how to". But I'll be very appreciative for sample - "how to load binary package at run-time". Pavel PS. Sorry for my English. |
Pavel,
> from docs: > "The Binary Package facilities are not available in all versions of Dolphin > but are introduced as part of the Web Deployment Kit" > > What does it mean - "as part of the Web Deployment Kit"? > Can I use "Binary Package facilities" for non Web application? Yes, you can. Although the web deployment kit does not officially exist anymore all of it's functionalities (e.g. binary filing, certficates, PluginViews ...) are still part of the image. > What now the status of "WebStart"? You can still download it ... but it's not part of the DST5 base image. I think it was intended to be a sample showing the binary packaging and "WebStart Deployment capability". > No, I'm just thinking about "how to". But I'll be very appreciative for > sample - "how to load binary package at run-time". If you download the Dolphin WebStart installation you'll the source of the WebStart application. This should give you a good idea how to handle the binary package loading stuff. Basically you'll need a ClassLocator to locate the Package and the Class within the package. Then you'll pass this locator to ClassStub and that's it. Taken from the WebStart package: start | locator | self isAutoUpdate ifTrue: [self checkForUpdates]. locator := ClassLocator codeBase: self codeBase packageName: self rootPackageName key: self entryClassName. (File exists: locator localFileSpecForPackage) ifFalse: [self unzipAppZip]. ^(ClassStub withClassLocator: locator) show Hope this helps. CU, Udo |
It occurs to me that this might be a good way of implementing servlets
in Dolphin as well. Or is this a bad idea? From what I can see people implmenting web applications deploy whole images - or VNC into a server and just load up a package... but that feels a bit unsatisfactory, I quite like how with Java servlets you test the hell out of them and then just autodeploy them... Of course I want my cake and to eat it too... so if there is a problem, getting hold of the debugger is important. Maybe I'll add this onto my todo list. Of course my original answer was going to be - don't bother with autoloading compnonents for an application - its a pain in the ass. Look at windows and all the version dll's and api methods like - ReadSocket2 calls... disk space and memory are reasonably cheap (and smalltalk apps do seem quite small compared to Ms-Word or Firefox) so save yourself the hassle and just deploy everything in one go such that its standalone. Tim |
In reply to this post by Pavel
Pavel,
> Let's assume there is a big application. I would like to realize modular > architecture. Whether there is any opportunity dynamically load in the > application additional modules? I would like to write this modules in ST > too (no such ActiveX library). That these modules could use all > functionality of the host application freely. Modules are necessary because > the application can have very much greater functionality. And in my opinion > it is not reasonable to have it all at once in base image. Especially if to > the user in current of a session 5 % from it can be demanded only. The other replies list the options to do what you want, so I will instead try to talk you out of it. Unless you are envisioning something truly _huge_ it is indeed reasonable to have it in the image at one time; the IDE does it, right? Get rid of the change log and the development tools, class builder, etc., and things are no longer so big. I am frequently amazed at how small my deployed apps are, and see almost no reason to deal with the complexity of modularization, at least in my world. IMHO, spend your time on unit tests so you can confidently redeploy where there is a need, and leave the modules (and their ugly twins, the boundary and the interface) to the other guy. Just my 2 asCents. Have a good one, Bill -- Wilhelm K. Schwab, Ph.D. [hidden email] |
Free forum by Nabble | Edit this page |