From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e429176c9adb07b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-18 05:22:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: [OT] Best way to isolate a GUI? Date: Tue, 18 Feb 2003 08:08:53 -0500 Organization: MindSpring Enterprises Message-ID: References: NNTP-Posting-Host: d1.56.b3.30 X-Server-Date: 18 Feb 2003 13:10:25 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Xref: archiver1.google.com comp.lang.ada:34193 Date: 2003-02-18T13:10:25+00:00 List-Id: It depends on just how isolated you want to go. When I've built things with GtkAda, I've wanted the GUI to be unbundled from the "real" app so I'd have an easy time changing front ends if that seemed to be necessary. To do that, I just create an isolation package that responds to the callbacks & sends data to the GUI - the rest of the app is one or more objects that do all the computational work. If you want to swap out front-ends at will without changing any code, I can suggest what happens in various military systems I've worked on. You pick some standard communications link and carefully define a message catalog that specifies the exact format and content of the communications to run between the subsystems. (A command/response protocol is usually simplest, but not always possible depending on how many different things are communicating & what has to happen) This lets you substitute *anything* at the front end so long as it can properly produce & respond to the message catalog. It would be good for Ada to have some kind of conventional GUI and maybe this suggests a possible answer: Define a message catalog and Ada interface to it that would allow adaptation to any number of possible GUI environments. Most GUI things tend to work on the concept of "messages" anyway, so its hardly a big stretch. I think there are some things that would have to be overcome (like lack of certainty about representation with stream operations or various problems with tagged records - things that might be overcome by using some kind of text based protocol like XML - which has its own downsides). A little creativity might result in a clean, simple way of getting Ada a "standard" GUI without killing any existing GUI builders. MDC -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jsf.mil/ Send Replies To: m c o n d i c @ a c m . o r g "Going cold turkey isn't as delicious as it sounds." -- H. Simpson ====================================================================== Jano <402450@cepsz.unizar.es> wrote in message news:MPG.18b98425db7e9aef989698@News.CIS.DFN.DE... > Hello, > > as for my (lately) frequent questions, you may be aware I'm starting a > new project in Ada. Well, the matter is that I want the core > functionality to be isolated from the GUI. And that's the question: > how's the best mean to do that. > > I've thought the following: > > 1) Use AWS and let any browser do the rendering. That's not really > isolating the GUI, because all the generating code would be inside the > core (unless I also apply): > > 2) Use sockets to communicate the two processes. > 2.a) Use regular Ada streams to pass data types. > 2.b) Use some other protocol, for example [compressed] XML. > > 3) Your sugestions welcome. > > I would want that the isolation be such any kind of GUI can be build on > top. Maybe even made two of them run concurrently. For example, web > reports via AWS and a control GUI with native look. > > Any have prior experience? Some successful example on the wild to check? > > Thanks in advance, > > -- > ------------------------- > Jano > 402450[at]cepsz.unizar.es > -------------------------