Post #225,630
9/20/05 2:09:54 PM
|
I think its easy, once you install squeak + seaside image
And Avi has a prebuilt image ready to go.
It is already its own web server, I typically stick it behind apache using mod_proxy and let apache serve the static content.
"Whenever you find you are on the side of the majority, it is time to pause and reflect" --Mark Twain
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." --Albert Einstein
"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses." --George W. Bush
|
Post #225,633
9/20/05 2:18:52 PM
|
There a good step by step "how to set this up" anywhere?
===
Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats]. [link|http://DocHope.com|http://DocHope.com]
|
Post #225,744
9/21/05 1:11:09 PM
|
You mean seaside?
I assume you know how to set up postgres.
You need a squeak vm. [link|http://squeak.org/download/index.html|http://squeak.org/download/index.html]
Squeak requires 3 additional data files. A .sources, .changes, and .image file. The .sources is just there, you only need one. The .image/.changes files are used in pairs. To launch squeak, you typically drag and drop a .image file onto the vm exe (or if using the command line you just do something like %squeak myfile.image).
There is a prebuild seaside image at: [link|http://seaside.st/Download/Images/|http://seaside.st/Download/Images/]
You'll need to load up the postgres client. To do this, click in the main squeak window background (not on one of the squeak tool windows) to bring up the "world" menu. Choose "open..."->"SqueakMap package loader". This is squeak's CPAN equivalent, find the postgres client and right click on its name in the scrolling list - choose "install". Browse the connection class in the postgres package and setup the login parameters for your database.
You're set.
"Whenever you find you are on the side of the majority, it is time to pause and reflect" --Mark Twain
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." --Albert Einstein
"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses." --George W. Bush
|
Post #225,753
9/21/05 2:08:33 PM
|
Sounds Windows-specific ... that work on Linux?
===
Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats]. [link|http://DocHope.com|http://DocHope.com]
|
Post #225,754
9/21/05 2:19:31 PM
|
Of course
[link|http://www-sor.inria.fr/~piumarta/squeak/|http://www-sor.inria...~piumarta/squeak/]
"Whenever you find you are on the side of the majority, it is time to pause and reflect" --Mark Twain
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." --Albert Einstein
"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses." --George W. Bush
|
Post #225,820
9/21/05 7:47:20 PM
|
Raises a question in my mind:
How is site-specific configuration for things like database connections usually handled with Smalltalk images? Edit the image itself, some sort of standard config file, or something different?
The Java equivalent would be app.xml deployment files for webapps with site-specific data source entries.
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #225,881
9/21/05 11:41:54 PM
|
Everything in the image is typical
So you'd likely write a class side factory method to return a configured object. You could also just create the connection object and save the image. Since the image "freezes" a copy of your app state when you save it, restarting will reconstruct all the connections.
"Whenever you find you are on the side of the majority, it is time to pause and reflect" --Mark Twain
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." --Albert Einstein
"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses." --George W. Bush
|
Post #225,888
9/22/05 12:11:31 AM
9/22/05 12:11:46 AM
|
Yeah, but where does the config info come from?
The database host, port, uid and pw are not going to have the same values (ok, maybe the port) on some random machine a user has installed my app on as they do on my dev box.
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
Edited by admin
Sept. 22, 2005, 12:11:46 AM EDT
|
Post #225,895
9/22/05 12:43:55 AM
|
Prompt them for it?
I don't quite follow your scenario.
"Whenever you find you are on the side of the majority, it is time to pause and reflect" --Mark Twain
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." --Albert Einstein
"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses." --George W. Bush
|
Post #225,921
9/22/05 9:21:08 AM
|
Re: Prompt them for it?
I make an application, say, for example, stIWT. This app uses Seaside and PostgreSQL.
On my dev machine, I have the image set up to point to forumuser:pw@localhost:5432/forum/.
Someone downloads my app to create YouUsThem, and they need it to point to forumuser:wp@pgserver:2345/myforums/. They're running it headless.
Do Smalltalk applications generally require the installer to modify the image through the ST GUI for configuration information like this?
I guess you could always have a configuration web page that comes up before any database connections are made...
If you're keeping the config info in the image, how do you handle upgrades?
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|
Post #225,923
9/22/05 9:40:56 AM
|
There are various ways
Seaside has a fairly elaborate app configuration system with a web UI. [link|http://seaside.st/Documentation/ConfigurationandPreferences/|http://seaside.st/Do...onandPreferences/]
You could trap db connection failures and send the user to a "please set up your db connection" page, get the info, and modify the method that returns the connection config and save the image. This is typical.
As for updates, most of us are using Monticello which does differencing and has a nice merge tool. There is a component called WAVersionUploader which allows you to download incremental updates from a server. Its all there and pretty sweet.
A new project designed to provide stable urls for published resources has just started, this is, I believe, your biggest objection to seaside and is being addressed for apps that are more like iwethey.
FWIW, big river books urls are like a combination IWETHEY url with a bunch of seaside type state tracking stuff tacked on at the end.
for instance ttp://www.bigriver.com/exec/obidos/tg/stores/detail/-/toys/B000096L5J/ref=pd_qpf_gw/104-3225208-4242306
You can delete everything after the B00 bit and the url will still work, its stable up to then, the last bit is session tracking info. Seaside is doing something similar.
"Whenever you find you are on the side of the majority, it is time to pause and reflect" --Mark Twain
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." --Albert Einstein
"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses." --George W. Bush
|
Post #225,927
9/22/05 9:56:55 AM
|
Thanks.
Regards,
-scott anderson
"Welcome to Rivendell, Mr. Anderson..."
|