tag:blogger.com,1999:blog-12753102.post8069143761578920559..comments2024-03-18T03:44:29.957-04:00Comments on Ben's Journal: A Scheme Application Configuration StrategyBen Simonhttp://www.blogger.com/profile/09833753747177544979noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-12753102.post-32720299972869487842009-01-13T13:30:00.000-05:002009-01-13T13:30:00.000-05:00Grant -I actually didn't investigate customization...Grant -<BR/><BR/>I actually didn't investigate customization all that much. I had started off storing some customized values in a structure - like, say the max number of floors in a building this client may have.<BR/><BR/>But, it quickly became clear that have a structure to hold onto all this configuration data was just not going to work.<BR/><BR/>The structure would be huge, and it would require every client to fill out their structure completely.<BR/><BR/>So, I basically stumbled on this approach (not that it's rocket science - it's pretty basic) and really liked the shape of it.<BR/><BR/>I need a better story than this ;-)Ben Simonhttps://www.blogger.com/profile/09833753747177544979noreply@blogger.comtag:blogger.com,1999:blog-12753102.post-30409236681536880512009-01-13T13:27:00.000-05:002009-01-13T13:27:00.000-05:00John -Thanks for the feedback - that's an interest...John -<BR/><BR/>Thanks for the feedback - that's an interesting suggestion about how generic functions could play out here.<BR/><BR/>I'll have to keep an eye out to see if the configuration pattern grows in that direction.Ben Simonhttps://www.blogger.com/profile/09833753747177544979noreply@blogger.comtag:blogger.com,1999:blog-12753102.post-36605365964658137212009-01-08T00:12:00.000-05:002009-01-08T00:12:00.000-05:00What approaches did you consider that you didn't l...What approaches did you consider that you didn't like or didn't pan out?grant rettkehttps://www.blogger.com/profile/09439997834215273665noreply@blogger.comtag:blogger.com,1999:blog-12753102.post-85605269856461814582009-01-08T00:08:00.000-05:002009-01-08T00:08:00.000-05:00Did you look to DrScheme for inspiration?Did you look to DrScheme for inspiration?grant rettkehttps://www.blogger.com/profile/09439997834215273665noreply@blogger.comtag:blogger.com,1999:blog-12753102.post-87168825167026247212009-01-07T17:50:00.000-05:002009-01-07T17:50:00.000-05:00This is essentially a super-lightweight AOSD tool,...This is essentially a super-lightweight AOSD tool, right?<BR/><BR/>Along these lines: pretty soon, you're going to run into scoping / hygiene issues. Say, for instance, you have this code:<BR/><BR/>(oh heck, I can't use "pre" or "code" tags...)<BR/><BR/>(let ([customer-name (get-customer-name)])<BR/> (cv '(application render-name) <BR/> (show-string customer-name <BR/> (lookup-address customer-name))))<BR/><BR/>Note that 'customer-name' is used twice in the customizable piece of code.<BR/><BR/>New if you want to customize this, you're probably going to want to be able to write a piece of code that refers to 'customer-name'. <BR/><BR/>Of course, you can solve this problem by refactoring so that the customizable point is a fresh function that takes the customer-name as an argument, but at that point I would suggest you're probably better off just re-using an existing framework for generic functions.<BR/><BR/>John ClementsJohn Clementshttps://www.blogger.com/profile/15701081040575095781noreply@blogger.com