Posts Tagged ‘mac’

SQLEditor 1.6 final

Wednesday, January 6th, 2010

So, if you’ve seen SQLEditor recently, you’ll hopefully have seen that there is a new version out: version 1.6. This got released just at the beginning of December 2009

1.6 is something that I’ve been working on now for a long time, it is essentially (the unreleased) version 1.5 with improvements and updates. In particular it contains a SQL parser that was written using ANTLR and a new JNI based system for using JDBC drivers with support for Java 6 JDBC drivers.

It’s also the first release version of SQLEditor that is compatible with Snow Leopard. SQLEditor 1.4.7 and earlier had an unusual architecture. When I originally started writing SQLEditor, it was a Java application with a Swing user interface. After some development it seemed clear that java swing was proving limited in some ways. I rewrote the user interface layer in Cocoa, leaving the model layer in Java and using Cocoa Java to connect the two parts together. The application development continued and new versions were released. Eventually though, Apple decided that Cocoa Java was not the future and decided to deprecate it.

Work began immediately on rewriting the crucial components of SQLEditor, although there were some issues.

The first was the model code. Every object in an SQLEditor document is represented by an object and all of the code for these objects was written in Java. All of the object code was rewritten and tested against the earlier versions to check that it still worked. It was very important that files from previous versions continued to work (and as far as I know all of them so far do). New code was written to read and write the SQLEditor document xml format.

The second major issue was that the database interface used JDBC drivers, which are written in Java. Native code would use ODBC drivers. Although similar this might mean that users wouldn’t be able to use existing arrangements to access databases.

Eventually code was written to bridge between SQLEditor native code and the JDBC drivers using the Java Native Interface (JNI).

The other crucial problem was the SQL parser. This is used if you paste SQL code into SQLEditor or if you import a file. The SQL parser was written using JavaCC, a parser generator that is written in and produces Java code. Several parser generators were looked at to replace JavaCC and eventually ANTLR was chosen.

A new SQL parser was written and tested during 2009 in ANTLR and is included in SQLEditor 1.6. The new parser is completely rewritten compared to the one that existed in SQLEditor 1.4.7 and no code is shared between them.

A major step in developing the new parser was to port all of the SQL test cases from Java (in 1.4.7) to objective C (in 1.6). These automated unit tests are run against the parser to ensure that the new parser behaves correctly compared to both the 1.4.7 parser and the assorted SQL standards.

It is still something of a work in progress though, there are things it doesn’t support and it’s still being actively worked on. One particular thing that makes this somewhat harder than it might otherwise be is that it must accept SQL in several different dialects, not just a single standard.

SQLEditor 1.6 also included user interface improvements and various performance fixes.

Overall it’s an improved program, although I do wish that it had been released sooner.

Thanks to everyone using SQLEditor for your patience and also for trying the beta versions.

SQLEditor 1.4.4 Released

Thursday, April 30th, 2009

SQLEditor 1.4.4 was just released on Tuesday, the main feature improvement is the support for compound foreign keys. I posted a bit about this before and the final version is pretty much the same as I described.

Unfortunately there were a couple of bugs that slipped through relating to clicking objects. :-(

These are going to be fixed in a point release that should appear soon.

The new version is available from the automatic update system or download here:


3.9MB dmg File
Change Log
Product Notes
Expires
21st January 2009

SQLEditor: Compound Foreign Keys

Thursday, April 9th, 2009

The newest version of SQLEditor (1.4.4b1) now has support for compound foreign keys. This is something that people have been asking about for a while now, so I’m pleased that it got included.

There are some things that may need to be improved, but I’m fairly happy with the first revision of this.

Diagram showing compound foreign key

Diagram showing compound foreign key

The compound foreign key object is a new table level object that you can add from the Object menu just like a field or index. Then you drag from the foreign key to the target table. Finally you use the inspector to create pairs of columns to link together.

When importing from a database SQLEditor will try to create field-to-field links on foreign keys with only 1 pair of columns unless you tell it otherwise. (There is a new preference to do this)

Support is fairly complete, SQL parsing, database import, database export and SQL export are all available so it should work fairly well. I think the only thing it doesn’t do is auto-create indexes, so you may need to do this by hand on referenced columns (for those databases that need this)

There is naturally a new inspector palette to go with the table object.

Compound foreign key inspector

Compound foreign key inspector

This allows you to add pairs of columns using the + button at the bottom. Choose your columns using the little popup menus.

The whole thing is completely new, so please send in your thoughts to the usual address.

Download SQLEditor 1.4.4b1

(or enable the “Check for beta versions” preference and then use the check for updates feature)

Handy database of recommended Mac Apps

Thursday, February 21st, 2008

Johan Basberg (who designed the beautiful SQLEditor icon) has a handy list of recommended mac applications at

http://dittverk.no/mac/files/tag-editor.php

And SQLEditor is on this list :-)

SQLEditor 1.4b2

Friday, August 17th, 2007

Another day, another beta. (Kind of)

SQLEditor 1.4b2 is now available, which is pretty much bug fixing against 1.4b1.

There were several issues with 1.4b1 including an annoying bug that would sometimes delete foreign key connectors when you deleted an unrelated table.

There are some fixes for other bugs which turned up and some improvements to undo/redo, to make it more stable when you undo or redo lots of things, one after the other.

I’ve also moved SQLEditor to Sparkle. Sparkle replaces an update system that I wrote myself and it should offer better update support as well as a nice html based ‘what’s changed’ window.

SQLEditor also now tells people that it is a beta and exactly when it will expire. It probably should always have done this, but it does it now, which is probably good.

There are also some minor fixes to the live source view, so that it changes with the document sql dialect and appears correctly when reopening existing documents.

[Download] (3.4MB DMG File, changelog)

WWDC keynote: Games

Monday, June 11th, 2007

(Watching WWDC keynote log over at MacRumors.com)

(It seems to be a blogging day for me?)
Gaming seems to be one of the big things at this year’s WWDC keynote. EA is apparently going to be doing simultaneous releasing of some games this year including Harry Potter. This is interesting because EA is so important in mainstream gaming.

Whether EA will follow Blizzard in putting both games on the same CD (hopefully YES) or have separate releases for the two platforms will be a point to note. Dual platform releases like Blizzard are great because it means that you can buy Mac games at mainstream gaming stores and the titles then get released on budget labels (often with the Mac part still attached). I’ve picked up several of the Blizzard games at my local branch of Game here in Edinburgh this way as impulse purchases.
(Of course where this leaves the Mac Porting development companies is anyone’s guess)

They also had John Carmack doing a demo of 3D stuff which looked interesting, but, since I’m reading a transcript and looking at photos, doesn’t really make as much impact.

Openoffice aqua looking good

Monday, June 11th, 2007

I just downloaded the new aqua port of OpenOffice a few days ago and it looks good. There are some bits which aren’t finished yet, but it runs quickly, it runs natively and it runs the same as the other OpenOffice platforms. (So far as I can tell). It may well be the best upgrade path for people using VBA macros on the Mac.

What have I been doing recently?

Monday, June 11th, 2007

Well no updates for a bit. Humm?

The main things I’ve been working on:

1) SQLEditor. Lots of things are being worked on. The user interface is being rewritten to improve speed and increase flexibility, the data layer is being rewritten to switch it to cocoa (instead of java), the JDBC code is being rewritten to make it use JNI instead of cocoa/java and a new crash reporting system based on Google BreakPad is being worked on. There are also some other things too like live source view and assorted bug fixes.
2) HTMLValidator. Also undergoing development. It recently moved across to use Sparkle (yey!) instead of the SQLEditor derived update system (which will also be replaced eventually). The final 1.0 release is due very soon now and several people have set in nice comments.
3) A new idea (still secret) :-)

4) Web site improvements for malcolmhardie.com. Some have been deployed, others are still waiting to be deployed. Although the biggest one which is almost entirely invisible is the rewritten order processing system, which now supports multiple different products and better management features. But only I (and my somewhat-trusted minions) will ever see it. ;-)

Then when I’ve not been working I’ve been playing Pikmen on my new gamecube. (Many thanks to Leynos!). I’ve wanted to play this game properly for years and years and it definitely meets and exceeds my expectations.

Although I also played some theme hospital this morning using Parallels 3.0 (new release). It runs really nicely, although since it is an ancient game (1997) this shouldn’t be too surprising. I hope to try out some of my other really old games to see how they perfom under parallels.

Google Talks: Camino

Friday, February 23rd, 2007

Mike Pinkerton of Google talks about the Mac web browser Camino. It also includes some interesting history of the Mozilla and Gecko projects.

http://video.google.com/videoplay?docid=6765603919277760697

HTMLValidator beta 2

Friday, February 16th, 2007

HtmlValidator beta 2 has just been released. The new version offers assorted fixes and a slightly improved interface (a green tick or red cross now appear in the validation window!)

There is also a new downloads page which currently offers an Applescript to validate the source of the front page in Safari.

Usefully it validates the actual source that the browser received, it doesn’t download the url itself.

HTMLValidator

Friday, February 9th, 2007

HTMLValidator 1.0b1 has just been released.

It runs on PowerPC or Intel Macs with Mac OS X 10.4 or later.

The current version expires 28th February 2007.

HTMLValidator is a new desktop HTML validator that works on both web pages and files. It’s something I’ve been working on for a while now in between SQLEditor releases. The main motivation is that I often seem to use the W3C validator, but I can’t always do that with files I’m working on locally. I also tried installing the W3C validator on a local web server and although it works, it seems to require a lot of installation effort, with different dependencies. So the idea occurred to me: what if you could have a drag and drop installation. From there came a web version using drag and drop and finally the application bundle version that is being distributed from today.
The earlier application versions actually displayed the results in an html webview in a window, while the newer releases display the results in a table.

On the drawing board for future releases are more validation options, the capability to validate multiple pages and the ability to watch pages for changes and then validate. Also better printing and Applescript support (although both of these are present in the current version).

I’m really interested to know what you think of HTMLValidator so feel free to send in comments, either to me personally Angus [DOT] Hardie [AT] malcolmhardie [DOT] com or to the support [AT] malcolmhardie [DOT] com email address

SQLEditor 1.3.2

Wednesday, January 17th, 2007

SQLEditor 1.3.2 received a very limited release to a few selected testers at the end of 2006. However there were some additional issues that needed a bit more work, so the current plan is for a 1.3.3 release before the end of January.

MacFuse released – userspace Mac OS X file systems

Friday, January 12th, 2007

I just noticed this announcement on the google mac blog.

Amit Singh has released a mac version of Fuse, which is way for people to write interesting extensions to the file system without writing kernel code. The way it works (as I understand it) is that the Fuse system runs one kernel module which communicates with the actual file system code in userspace.

It looks really clever and there are already a number of useful file systems available for fuse (including ssh as a filesystem and a ntfs driver).
[link]

SQLEditor 1.3.1

Sunday, December 10th, 2006

SQLEditor 1.3.1 got released on Friday afternoon, this was really just a bug fix release which fixed a handful of problems that were identified. I think the only major fix was that the new UID system was slightly broken in that if you copied an object, or duplicated it in some cases, then SQLEditor would not always recreate the unique ID numbers that represent each object. This had the effect that if you copied an object, SQLEditor couldn’t distinguish between the objects when reloading and so all connectors would be attached to the original object and not the new one. An unfortunate bug. :-(

It has now been fixed, along with slight improvements to image saving and a fix for a menu shortcut not being correct. The latter was an odd problem in that a shortcut was set, but it actually conflicted with an existing shortcut and the cocoa menu system is smart enough not to display the same shortcut for more than one menu.

[Download] 2.8MB DMG

For some reason also I don’t think I posted about the 1.3 release. But the 1.3 release was posted on November 23rd and is the first non-beta release to be released since May 2006. It rolled all of the improvements that had been made during the beta testing phase into a new release and is definitely worth upgrading (especially since the upgrade is free). However the 1.3 release has been superceded by the 1.3.1 release, so download that instead.

Writing Unit tests for Cocoa

Wednesday, November 15th, 2006

I realized something interesting today.

I use unit testing to (hopefully) improve the quality of my code.

With Java I use JUnit. With native Mac stuff I use OCUnit.

One really clever thing about OCUnit that I realized today is that if you have several SenTestCase subclasses, each with multiple tests in it, you can put all of them into one XCode target and OCUnit will automatically run them as suites in one test run. This means that you get a summary of all of the tests at the end.

Previously I had a separate XCode target for each test case, where each test case class reported its results separately, which isn’t nearly as good.

static link library to replace dylib in mac os x

Thursday, October 26th, 2006

This post on the xcode-users list explains a neat trick on how to get xcode to link a static library instead of a dynamic library.

Imagine the circumstance: you want to use a particular non-standard version of a native library which is already part of the system; perhaps you want to use an old version with better compatibility, or a newer version with more features. The obvious thing to do is to take a static build of the library and add it your xcode project.

However this typically won’t work. The linker will choose the system version instead because by default it looks in all possible locations for a dynamic library first before looking through the same list of locations for a static library. If there is a dynamic library in any of the search locations it will always get chosen. There are some good reasons for this, but what if you really want to include your own statically linked version?

The answer is to add the -Wl,-search_paths_first flag to the other link flags option (under linking in target settings).

When this is set each possible location for a library is inspected first for a dynamic library and then for a static library. This means that the static library will get linked correctly.

It’s not exactly something that will be needed frequently though.

Edit: Apple have a technical Q&A article (1393) on this very subject which appeared a couple of days back and which I somehow missed.
It offers this exact method. [Link]