The
Ultimate
Business Machine

Technology, business
and innovation.

And, not least, about
the Mac.

Weblog Archive Cutedge

by: Bernard Teo






Latest Joy of Tech!

Joy of Tech ... from Geek Culture



Creative Commons License

Copyright © 2003-2012
Bernard Teo
Some Rights Reserved.

Tue 03 May 2016

Duomo

Category : Technology

I'm working on this app, which I'm calling Duomo, that I hope can make a user (me, first of all) super-productive when working on web site design.

DuomoScreenShot.jpg

The picture shows how it's organised.

Window 1: The user might be managing the design for several sites. So this window stores the connection parameters for each site – account ID, password, how to connect, where the root folders are, that contain all the web site resources (pages, images, downloadable files, etc), for each site.

Window 2: For each site, this window connects the designer's private copy of the web site resources with the one that's sitting on the live web server, and its job is to keep both ends synchronised. A lot of designers, like me, work from places like Starbucks that have very slow Internet connections. So there's some Unix magic done here so that the uploading/downloading can go reasonably fast. 

Window 3: This is where the design of a single web page gets done. You see how the web page looks like, but you also see how the page is structured. Panel 4 shows you the content of the web page – how it is structured into sections, articles, headers, footers, asides, pictures, navigation links, summaries, etc. And panel 5 shows you how each element, listed above, looks like (with respect to colours, type-faces, spacing, margins, etc) and where each element sits, precisely, on the web page, whether absolutely, or relative to some other element.

The most powerful idea here is that you separate the content of a web page from the way it looks (its presentation, as controlled by something called a stylesheet). This way, the same content can be easily depicted in any number of ways, and each way can be designed to evoke a different sentiment from the viewer/reader.

The first time I saw this concept at work was at the csszengarden web site many years ago (css means cascading style sheets).

http://www.csszengarden.com

And I felt, this concept is so powerful.

In my work with databases I can see, in the future, that a lot of the content will be automatically collected, generated and filtered. That's what shows up on Panel 4 in the picture. You want the content and the structure here to be very clean (and accurate and verifiable). 

Then in Panel 4, this is where you play with the way the content looks, where you are concerned with colouring and the emotions.

So this why I wanted a tool that will work like that – you work with both your left brain and your right brain. And you go back and forth like that. Like a Renaissance Man, where there were no boundaries between knowledge. And things can move effortlessly between the arts and the science. 

So I thought, Duomo would be a nice name for an app like that (like in building a great cathedral – the Renaissance people worked with their whole brain; there was no separation between engineering and architecture). if I can actually build it, by hacking Apple's WebKit and Web Inspector. This is, of course, still a work very much in progress. But it's getting clearer, I think it can be done.

Posted at 10:44AM SGT | permalink

Thu 21 Apr 2016

com.apple.product-type.tool

Category : Database

I have been searching Google for the solution to this very cryptic error message, "target specifies product type com.apple.product-type.tool but there’s no such product type for the iphonesimulator platform", for months.

We've now come to trust Google to index even the minutest and most inconsequential of web pages so that if anyone in the world had mentioned that they've been stymied by a problem and, better still, they've found a solution to get past it, then Google would have found it on our behalf. Right? That's Google's prowess, and that's why they're worth billions, trillions even. Right?

But, no. I've searched fruitlessly for months. Nothing turned up. I was building libmysqlclient as an Xcode project, but every time the build will halt when it hit that "com.apple.product-type.tool" error. I have since found a way to hack around that problem, but it held me up for months

Today, I restarted work on my Duomo project, my own replacement for Dreamweaver, etc. To do that I need to understand Safari WebKit. And the first thing I read today while working on Safari WebKit? "The first time after you install a new Xcode, you will need to run sudo Tools/Scripts/configure-xcode-for-ios-development in the Terminal to enable Xcode to build command line tools for iOS Simulator. Otherwise you will see the [stupid] error message ...”. 

FixXcode.png

There. So big. The solution's there. On Apple's web page. Or does Google avoid indexing Apple's web pages : )

Posted at 9:39PM SGT | permalink

Wed 20 Apr 2016

MySQL Connector – Or how to build libmysqlclient with just one click

Category : Database

I’ve created a project that could build libmysqlclient (for macosx, iphoneos, and iphonesimulator), with just one click.

libmysqlclient is a small client-side software, that will allow a Mac or iOS device to connect to a remote MySQL database. Once you have the ability to make such a connection, you could build complete database-driven apps that will store/retrieve data from the remote database, as though the database sits right inside your device. This really is magic. You could do lots of useful stuff with it.

I’ve had a hard time figuring out how to build the libmysqlclient, especially for iOS and iphonesimulator, ever since MySQL decided to use cmake for their builds. But I had to persevere, because a lot of my apps depend on this crucial piece of "plumbing”.

I’ve seen a lot of people looking to do the same thing. So, here’s the way to do it. You could download the folder that contains the project here. It’s called BuildMySQLClient (download by clicking on that link).

Once downloaded, you should see two folders:
The "Building libmysqlclient” folder contains the Xcode project that actually builds the libmysqlclient. Hit Build (Command-B) and the project will build the required libs and include folders for all three variations (for macosx, iphoneos, and iphonesimulator). Once the build is complete, you can find them inside the user’s ~/Library/SDKs folder, which the project will create.

The “TestMySQLConnection” folder contains another Xcode project that will allow you to test that the connection works, while showing you how to use the lib and include folder inside your own project. Again, it shows all three variations (for macosx, iphoneos, and iphonesimulator).

The example project shows just the rudiments of connecting programmatically to a MySQL server from a Mac or iOS device, using a C programming interface. The complete language guide can be found at the MySQL C API site.

To help you get everything you need, at one go, to test/learn about using a MySQL database programmtically, I have a MySQL 5.7.x database installer you can download.

And you can use my other app, Liya, on the Mac, to very quickly set up a “test” database that the example code, above, uses. It just requires that you have a table called “Table1” with any number of string/character fields, and you can enter any number of records, like I’ve shown below:

setUpTheTestDatabase.png
On the Mac, you can set all this up very easily. Install and run the MySQL database on the same development Mac. You can connect to this database simply, using Liya, via the localhost connection, using the account root without password, and look for the database test. Set up the test database, as shown. Install libmysqlclient. Use the latest Xcode (Version 7.3). Build for the latest Mac OS X (10.11) and iOS and simulator (9.3). And then run the example code to test the connection. And you can build from there.

That’s all there is to it.

As usual, this is all fun to do, but this is provided without guarantee and without offer of support. Please don’t write in to get me to hand-hold you every step of the way. I’ve spent countless hours figuring this out. You could at least put in a bit more effort. But I would love to hear how, and if, this has helped you, and if you have better ideas on how we could improve the process. Thanks.

And, Enjoy!

Posted at 2:57PM SGT | permalink

DNS Enabler 9.0.4

Category : Technology

Released a new version of DNS Enabler 9.0.4 today, which includes a new binary of BIND 9.10.3.

You can download it from the DNS Enabler for El Capitan page.

Posted at 10:17AM SGT | permalink

Tue 08 Dec 2015

MariaDB for El Capitan

Category : Technology

I’ve given up trying to build MariaDB 10.1.9 from source for El Capitan. It’s too difficult and they don’t seem interested. I’m not interested in using HomeBrew. I want to be able to build it from source cleanly, without using an intermediary, like on other Unixes. Life is too short to waste on unnessary complexity.

Posted at 6:55PM SGT | permalink

Mon 07 Dec 2015

New SQL Installers for El Capitan

Category : Technology

I’ve built the latest MySQL 5.7.9 Installer for Mac OS X El Capitan, as well as the latest PostgreSQL 9.4.5 Installer.

Both are available from my home page at :

Enjoy!

Posted at 11:47PM SGT | permalink

Sat 21 Nov 2015

MailServe for El Capitan 9.0.5 with Dovecot Replication

Category : Technology

I love the Dovecot Replication feature. I have always wanted to set up a backup of my live server, that is ready to go if (and when) my live server goes down.

I thought the hardest problem that I’ll need to solve to solve is to find a way to do a live backup of the mail server, so that one is a perfect, totally up-to-date replica of the other. 

That was until I discovered that Dovecot has a most excellent replication feature. It took me some time to figure out how to do all the Unix incantation to make it work – the documentation being quite sketchy. But here it is, in all its glory :)

I’ve implemented the user interface for the replication feature in MailServe 9.0.5.

DovecotNewFeature.png

Just 4 steps : 

1) enter the address of the replica server (that is also running Dovecot, as set up by MailServe), 
2) enter a shared secret between the two servers, 
3) turn the replication feature on, 
4) Restart Mail Server. 

And you need to mirror the same steps on the replica server. 

That’s it.

If one fails, you’ve got all your users’ mail folders completely backed up on the other. And it runs automatically. When new mail comes, or when a user rerranges the contents of his mail folders, the backup mail server gets all the changes, within seconds. And it works in both directions. Make changes in one server – the changes will all automatically show up on the other. Great?!

Dovecot and its author(s) – they’re so brilliant.

Enjoy...

Posted at 7:05PM SGT | permalink

WebMon For El Capitan 9.0.2 • new version released

Category : Technology

I have a new version of WebMon for El Capitan. Details are on : http://cutedgesystems.com/software/WebMonForElCapitan/

NewWebMonFeatures902.png

Posted at 6:19PM SGT | permalink

Wed 14 Oct 2015

El Capitan Server Upgrading

Category : Technology

I’ve finished moving my live server to El Capitan. It took too long. This is the first time I’ve done an upgrade instead of a clean install. I upgraded from Mavericks, actually, rather than Yosemite, and I’m already seeing quite a few problems.

For example, the Apache files on my upgraded Mac Mini look to be different from the Apache files on my development machines, which I’ve always kept clean by doing clean installs (mostly). So my web server couldn’t start up and it took a while to debug it. Mail and the DNS server both started up fine.

But I’m having problems with the Keychain. My apps can’t seem to be able to save passwords onto the upgraded Mac Mini’s keychain.

So, quite a few puzzles to sort out.  It wasn’t as smooth as I hoped it would be.

Posted at 12:56PM SGT | permalink

Upgrading to El Capitan

Category : Technology

I’m upgrading my live server to El Capitan. As in, right now. If you see the server disappear, it’ll hopefully be only for a while.

I’ve only got this Mac Mini that I’m using as a server because I’ve been saving my money for the next incarnation of the Mac Mini from Apple and that’s taking too long to appear. So if I want to move my one and only server right now to El Capitan, I’ve got to move it in-situ.

Once I finish typing and uploading this post, I’m going to start the upgrade process. 

And then start up all my Internet services using my own “enabler” apps. Time to eat my own dog food...

Posted at 8:44AM SGT | permalink

Mon 05 Oct 2015

El Capitan News

Category : Technology

If you happen to be looking for El Capitan versions of my apps ...

Posted at 4:59PM SGT | permalink

Mon 27 Oct 2014

Liya 3.0.5 now works with iCloud Drive on Yosemite

Category : Technology

I have a new version of Liya on the Mac App Store. This latest version, 3.0.5, when run on Yosemite, now works with the iCloud Drive :

Liya_iCloudDrive.png

Liya’s iCloud folder now appears with other iCloud-compatible apps’ folders (like Pages and Keynote) inside the iCloud Drive folder, allowing you to easily share SQLite files with other apps, on both Mac OS X and iOS devices.

Posted at 10:25PM SGT | permalink

Read more ...


Mac@Work
Put your Mac to Work

Sivasothi.com? Now how would you do something like that?

Weblogs. Download and start a weblog of your own.

A Mac Business Toolbox
A survey of the possibilities

A Business Scenario
How we could use Macs in businesses

VPN Enabler for Mavericks

MailServe for Mavericks

DNS Enabler for Mavericks

DNS Agent for Mavericks

WebMon for Mavericks

Luca for Mavericks

Liya for Mountain Lion & Mavericks

Postfix Enabler for Tiger and Panther

Sendmail Enabler for Jaguar

Services running on this server, a Mac Mini running Mac OS X 10.11.6 El Capitan:

  • Apache 2 Web Server
  • Postfix Mail Server
  • Dovecot IMAP Server
  • Fetchmail
  • SpamBayes Spam Filter
  • Procmail
  • BIND DNS Server
  • DNS Agent
  • WebDAV Server
  • VPN Server
  • PHP-based weblog
  • MySQL database
  • PostgreSQL database

all set up using MailServe, WebMon, DNS Enabler, DNS Agent, VPN Enabler, Liya and our SQL installers.