Recent

Author Topic: Health Daily Monitor (updated links)  (Read 17352 times)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Health Daily Monitor (updated links)
« Reply #30 on: July 28, 2014, 11:17:41 am »
I see you've been fixing up things some more ;)

Meanwhile added support for old MS Access Jet driver (as present in MDAC components etc)... saves a download for older systems (XP, ...) that probably have it preinstalled.

Some remarks/discussion points if I may - as the general program structure and coding is fine, I'm looking for other things to moan^H^H^H discuss ;)
- The .lps file could be kept out of version control so that each developer can maintain his own editor environment, breakpoints, build mode etc.

- The inno setup files could use relative paths instead of absolute paths; makes it less system-dependent

- The function DeleteUser need not delete all records from the user if a foreign key reference with cascading delete was specified (at least possible in mysql, firebird, ms access, probably in sqlite, too but no exerience there)
Defining referential integrity will also avoid ever adding records for non-existing users, and enforces data integrity when other code/users access the database without using the application

- Export functionality (to Excel, Access, CSV,...) might be nice? There's ready made code to export a dataset in https://bitbucket.org/reiniero/db2securityscript/src, directory OutputParser (dataset2sql.pas, databaseexporter.pas, CreateAccessDb.pas) which I'm happy to additionally license as LGPL.

- Noticed two Firebird .fdb in pristinedbs. The _empty one is not referenced in the Inno setup script - perhaps that could go? Or is there some other reason to keep it there?

Edit: oh yes, of course, as long as we're allowed to discuss feature creep: what about nice charts and graphs? Everybody loves those ;)
(More or less kidding - I like the clean and concise minimalist approach in the current program)
« Last Edit: July 28, 2014, 11:19:52 am by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Health Daily Monitor (updated links)
« Reply #31 on: July 28, 2014, 12:01:51 pm »
I'll miniquote each point:

I see you've been fixing up things some more ;)

Meanwhile added support for old MS Access Jet driver (as present in MDAC components etc)... saves a download for older systems (XP, ...) that probably have it preinstalled.
Thanks - good idea.

Some remarks/discussion points if I may - as the general program structure and coding is fine, I'm looking for other things to moan^H^H^H discuss ;)
- The .lps file could be kept out of version control so that each developer can maintain his own editor environment, breakpoints, build mode etc.
OK I'll unversion the lps file

- The inno setup files could use relative paths instead of absolute paths; makes it less system-dependent
OK.   I moved the iss files into SVN for that reason and forgot to change the paths. Doh!

- The function DeleteUser need not delete all records from the user if a foreign key reference with cascading delete was specified (at least possible in mysql, firebird, ms access, probably in sqlite, too but no exerience there)
Defining referential integrity will also avoid ever adding records for non-existing users, and enforces data integrity when other code/users access the database without using the application
I did think about this originally, and put a 1-many relationship into the MSAccess DB.
..But then I thought - this is thinking like a DB admin rather than a coder :)  With such a simple structure; just 2 tables: a table of users and a table of records with a (userID), it seemed overkill.  It's hard to see how an orphaned record could be created (unless a user did it manually) so doing the deletes in 2 SQL statements seemed the most parsimonious method for all databases.   I rejected creating views for common SELECTs for the same reason.  I like simple :)

- Export functionality (to Excel, Access, CSV,...) might be nice? There's ready made code to export a dataset in https://bitbucket.org/reiniero/db2securityscript/src, directory OutputParser (dataset2sql.pas, databaseexporter.pas, CreateAccessDb.pas) which I'm happy to additionally license as LGPL.
Export to Excel would be nice.  I suppose import/export between the databases could be useful too, if a user starts using a file-based DB then decides to switch to a server-based DB.

- Noticed two Firebird .fdb in pristinedbs. The _empty one is not referenced in the Inno setup script - perhaps that could go? Or is there some other reason to keep it there?
One has just the tables, and the other (distributed one) has the default record in it.  I kept the empty one available for testing the DDL code (who knows, the table def could change)

Edit: oh yes, of course, as long as we're allowed to discuss feature creep: what about nice charts and graphs? Everybody loves those ;)
(More or less kidding - I like the clean and concise minimalist approach in the current program)
Oh yes.  That will be the whole point of the app.
My design decision was to make it a separate app rather than roll it into the current Health Monitor.  As you so kindly remarked, the current codebase is clean and simple.

The plan is to make a new class/GUI to display stats as prettily as possible, and distribute it separately.  TAChart looks the business.

There's still a roadmap for the input module.  Lixux support for example, and updating via the web etc.

Thanks to all folks here for your time and contributions to my 'little hobby app' - especially BigChimp.  It's nice to have some expert support  ;D

I use it every day BTW - my BMI is a fraction below overweight, so my diet is ongoing...
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Health Daily Monitor (updated links)
« Reply #32 on: July 28, 2014, 12:32:17 pm »
I did think about this originally, and put a 1-many relationship into the MSAccess DB.
..But then I thought - this is thinking like a DB admin rather than a coder :)  With such a simple structure; just 2 tables: a table of users and a table of records with a (userID), it seemed overkill.  It's hard to see how an orphaned record could be created (unless a user did it manually) so doing the deletes in 2 SQL statements seemed the most parsimonious method for all databases.   I rejected creating views for common SELECTs for the same reason.  I like simple :)
I like simple but prefer letting the lowest possible system do the work - i.e. the database :)
Still, I take your point.

Export to Excel would be nice.  I suppose import/export between the databases could be useful too, if a user starts using a file-based DB then decides to switch to a server-based DB.
Well, you never know - Access is a nice format for data interchange on Windows; DBF is fairly usable too; as is CSV (in its various forms). I hadn't really thought about moving between different versions of health monitor but rather being able to take the data and do whatever you want with it.


One has just the tables, and the other (distributed one) has the default record in it.  I kept the empty one available for testing the DDL code (who knows, the table def could change)
Ok.

Oh yes.  That will be the whole point of the app.
Nice. GUI and graphics stuff definitely is something I'm bad at so looking forward to some nice results ;)

TAChart looks the business.
Yep, and it's got a capable maintainer - hi wp ;)

Thanks to all folks here for your time and contributions to my 'little hobby app' - especially BigChimp.  It's nice to have some expert support  ;D
Please don't mention it.

I use it every day BTW - my BMI is a fraction below overweight, so my diet is ongoing...
Good luck!
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Health Daily Monitor (updated links)
« Reply #33 on: July 28, 2014, 12:54:31 pm »
Inno Setup
I wanted the .iss and installer files in a subfolder of trunk (/innosetup)
Unfortunately in the [Files] section, you can't specify a source directory as starting with ../

You can make a constant using an ini file {ini:filename,section,key,default} That way I could have had one ini file for all the setups, but... the [Files] source section won't accept the constant.

In the end I had to make a #define in the pre-processor section for a developer to edit.
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Health Daily Monitor (updated links)
« Reply #34 on: July 28, 2014, 03:23:56 pm »
Just tested some on Linux.
Firebird did not work - client/server seems to be having problems both on Windows and Linux.Edit: latest update fixes this. Was a stupid mistake with host:port instead of host/port

Sqlite3 seems to work more or less ok.
Edit: well, no: the calendar is not shown on both versions on Linux.
« Last Edit: July 29, 2014, 01:42:21 pm by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Health Daily Monitor (updated links)
« Reply #35 on: July 28, 2014, 03:48:35 pm »
I've added a 'updatefromsourceforge' unit (using synapse httpsend) with the code from the Wiki.

@BigChimp (or anyone) - any idea how to get it to download from the Health Monitor project files?

Ideally, I'd like to have a function in the interface looking like:

function GetDownload (szSourceforgeProject, szSourceforgeFilename, szLocalFilepath:String):Boolean;

With that, I could download a small version.xml file from SF, compare versions, and optionally download a new execteable or other update;

I'm sure such a general function/unit would be very useful for other sourceforge developers too.  It looks 90% there....


== UPDATE  It works!  Brilliant ==
== Looking at downloading/updating via threads ==
http://freepascalanswers.wordpress.com/2012/06/15/synapas-http-thread/

== UPDATE #2 Yes, checking for updates in a thread works :)  It can be done 'in the background' ==
Some work to do re: error checking etc..  I'm keeping it all in a class, so it will be of general use
« Last Edit: July 28, 2014, 07:47:31 pm by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Health Daily Monitor (updated links)
« Reply #36 on: July 29, 2014, 01:11:44 pm »
Updated Firebird version; client/server now works.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018