Fri 14 May 2004
Weblog and DNS Enabler Bug Fixes
Category : Technology/weblogbugfix.txt
There was a problem with the "Search This Weblog" function on the left side-bar. If there are more entries found than we've provided space for, there is a Read More... link at the bottom. The problem was that the Read More... anchor was acting funny. It didn't lead to the next set of entries properly. This has been fixed and the PHP code can be found in the Weblog article on the right side-bar.
Also, I wrote something called a DNS Enabler once to help people get around some problems when they're running a server behind an old Airport Base Station (the original ABS) - they're not able to "see" the server from machines sitting inside the local network, unless they run a local DNS server.
When Panther came out this little application broke and I never had the time to fix it. Until yesterday. I didn't think anybody needed it still until this week. So, that is also available for download from that page that talked about running an Internet server behind an Airport Base Station.
Now, that DNS Enabler is fixed, it's possible to build further on it. It's now programmed to identify a server on a fixed IP address (10.0.1.201) on an Airport network. But it should be possible to make it work with any user-specifiable IP address, and for multiple domains, and multiple servers.
The best interface I've ever used is QuickDNS Pro from Men and Mice, back in the days of OS 9. They've probably gone beyond the Mac, now. I'm thinking it's possible to do an interface quite like theirs, if imitation is the sincerest form of flattery. No, better do something different. If I can find the time.
So, the Mac's really good value for money, considering that you've got all these Internet services, built-in, out-of-the-box. They just need to be turned on and provided with configuration tools.
So we've got a lttle catalog of these : Sendmail Enabler, Postfix Enabler, DNS Enabler (no web page or tutorial for it, yet), and Luca. Hopefully, one day, you can go to this page and find all you need to turn on and run a business out of your Macs.
About Cocoa and Java, and Luca
Category : Technology/JavaCocoaSummary.txt
About six to eight months ago, when we thought of putting a Cocoa interface on top of our accounting system, there wasn't much information we can find about doing Cocoa development using Java. Even now. So this is what we've found.
First thing, we wanted to be able to do most of the common things we would expect to see on an Aqua interface, using Java instead of Objective-C, e.g., drawers, sheets, dialog boxes, the search mechanism, radio buttons, check boxes, pop-up menus, the notification mechanism, tables with hierarchical data views, page setup, print previews, etc.
It's very difficult to find material on this but this page at Whiningdog.net helped. Not nearly enough, but it kept us going. Even things like printing and exporting - they're no cakewalk. I believe Hai Hwee had to be pretty tenacious to find the answers to doing all these things.
But we now know that it can be done. And that the Model-View-Controller paradigm works very well. We've retained the ability to use 60-70 % of the code as a webserver-based application, and we've abstracted out the database access, so we can plug in a wide range of databases. These were the two main reasons why we had to stick with Java. But we've got almost all the interface elements pinned down now, so we can concentrate on building the application.
The accounting application was written originally using 4th Dimension. Comparing the two, I'm impressed with the amount of code we didn't have to write using Cocoa.
For example, when you open up a lot of windows, you may be providing different views of the same piece of information from different angles. So when you change the data in one view, you want all the views to be updated quickly. I've written the code to do that myself in 4D, but it's always been pretty messy. Think about all the things you have to coordinate. But Cocoa's notification manager is really neat. You can set up the updating mechanism with just a few lines of code.
Another example is ability to show a hierarchical view of tabular information. Again, I wrote all the code to do that when I was using 4D. With Cocoa, it's a breeze. So I can immediately appreciate the benefits that Cocoa brings from the productivity angle. The best code is the code you don't have to write.
It's a wonderful development environment. I would like to show this to more Java programmers but I think, as usual, the thing that will come up again and again is the Mac's limited market share.
Anyway, if you're looking at Luca, look at the navigational aspects, the ability to relate one piece of information to another, and the thought that went into the data structures (I think MYOB can only do Chart of Accounts maybe four levels deep and we've asked ourselves why not any number of levels deep - the answer lies in the design of the data structures).
Luca may be no great shakes to look at now (from the romantic point of view), but the beauty that we're talking about is from the classical viewpoint (in Robert Pirsig's terms, as I've written about in "Awk", the classically-minded person is pre-disposed towards looking at things below skin deep).
The problem we wanted to solve was how to make the relationships between all these accounting figures clear, and how to prove the accuracy of the data through the ability to audit the information from many different angles. And then to take this ability and make it available through the web, through a client-server application, or through web-service calls, using largely the same body of code. We're not through with this yet, not by a long way. If you're interested to build on top of it, e..g, through embedding the system as a Jar library within a larger project, through the API's we're going to make available, just let me know.