Re: Use XML to create extensible data structures in text fields?
Re: Use XML to create extensible data structures in text fields?
- Subject: Re: Use XML to create extensible data structures in text fields?
- From: Jim Underwood <email@hidden>
- Date: Thu, 23 Nov 2017 21:49:28 +0000
- Thread-topic: Use XML to create extensible data structures in text fields?
Michael,
Without having more details, it is very difficult to offer you any sort of
credible and useful suggestions. Having said that, here are my thoughts off
the top of my head, which may, or may not, be useful or apply to your project.
IMO, you need to consider much more than just the data structures. Step back
and look at the big picture.
Scope
* First, carefully consider the scope of your project. And yes, it is a
project, with many parts and tasks.
* It sounds to me like you want to build your own data management app,
which is a very large, complex project.
* Data structures is just the start
* Forms to input and edit your data
* Methods to search, sort, analyze, summarize the data
* Reports to show results
* If you store your data as text in individual records (notes) of your
existing app, how are you going to operate on multiple records at once (like to
search, sort, summarize)?
* Reading the text of every note every time you want to do some analysis
will be very slow.
Development Tools
* Let me just suggest right here, AppleScript is a very poor tool to do all
of the above.
* While you can obviously write your own handlers, AppleScript does not
have any built in tools to do this.
* Native AppleScript has very, very poor data structures, but you can
use ASObjC to gain access to more complex and powerful structures like arrays
and dictionaries. BTW, it is very easy to read a XML and create an ASObjC
dictionary from it.
* In particular, it supports only very simple, basic forms (display
dialog, choose from list)
* There are a couple of script libraries by Shane
Stanley<https://www.macosxautomation.com/applescript/apps/Script_Libs.html>
that add a lot display options, but you are still designing the windows/forms
manually by coding -- no WYSIWUG form editor.
* IOW, it is still a lot of work to get even basic data input, editing,
and reporting displays.
* If you really want to build your own data mgt app, then IMO you need
tools like:
* Xcode
* Xojo: Cross-platform App Development Tool<https://xojo.com/>
* FileMaker Pro<http://www.filemaker.com/products/filemaker-pro/>
* and I'm sure there are a number of other app development tools
Solution Options
1. If I had this requirement, the first thing I'd do is to look for existing
apps that already do what I need.
* The ideal candidates would be ones that provide 80-90%+ of what you
need out-of-the-box, and then provide scripting support so you can further
customize the app.
2. Store all of your custom data in an external source/app
* Then put a link in the existing app's notes field to the data record
in your external source
* FileMaker Pro<http://www.filemaker.com/products/filemaker-pro/> could
be a good choice for this. It has excellent AppleScript support.
3. Build your own data management app as described above
4. Use AppleScript to cobble together some analysis tools (not recommended)
Again, all of this is without knowledge of your real requirements, and has not
had any review. It is just brain-storming! Treat it as such. 😉
Best Regards,
Jim Underwood
aka JMichaelTX
From: AppleScript-Users
<applescript-users-bounces+jmichael=email@hidden<mailto:applescript-users-bounces+jmichael=email@hidden>>
on behalf of Michael Grant <email@hidden<mailto:email@hidden>>
Date: Thursday, November 23, 2017 at 12:14 PM
To: "ASUL (AppleScript)"
<email@hidden<mailto:email@hidden>>
Subject: Use XML to create extensible data structures in text fields?
I often want to add my own structured custom data to various list-based
applications like task managers, address books, and whatnot. An example would
be adding budget or client data to projects and tasks in OmniFocus. Most of
these apps do offer some kind of "notes" field where I can enter arbitrary
text, but I'd like to have something more structured so I can do things like
compare, sort, or sum data from consistently defined "fields".
So, I've been toying with the idea of creating my own XML data structures,
maybe using something like plists as a model, to hold this kind of stuff and
storing them in these notes fields, with a collection of AppleScripts to parse
and manipulate the data. But I have no idea whether this is actually a
practical thing to do. Has anyone else out there tried anything like this?
Thanks,
Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden