Fresher
Fresh View for Mint has been enormously successful. In review after review of Mint, Fresh View is consistently mentioned, and I have been very pleased with its warm reception by Mints users.
Still, software will be software and there is always room for improvement. With most of the kinks worked out with SVG and various small bugs already fixed, I noticed that most support queries (via email and the Mint Forums) hinged on a single design choice that I made in writing Fresh View: the need for a writable directory. Granted, there is probably some PHP code that can automatically bestow the well known 775 or 777 permissions to said directory, but I did not wish to expend the effort figuring out how. I always felt that the need for this writable directory (to which the dynamically-created SVG are saved) was clumsy and inelegant and rightly so, as there is no real use for an in-between file-system based copy of the graph. So, I inserted an instruction into the Read Me stating to chmod the directory and the files contained therein.
With this move, I saw many users complain of various problems stemming from not having followed that particular line in the—albeit very simple—installation instructions. I softly urged them to chmod the directory and would rarely hear from them again. I even updated Fresh View to include functions to verify permissions. I went so far to cover it up by adding new routines that I nearly convinced myself that the design problem was OK.
Now, I am pretty busy with medical school, but my perfectionist nature does not like to let users hang out to dry, so I never ignored any support requests. But after answering so many confused users in the forums and by email, the fact of my poor decision made early in the design process became abundantly clear, and a solution was in order.
Clearly, if I could eliminate the need to manually chmod a directory and its contained files, I would stop the steady flux of calls for help. But why not kill two birds with one stone and fix the need to save files at all? This became my task, and Fresh View v1.10 achieves this vision. Using a clever, new combination of Pepper API and code to work around the need to call SVG (similar to placing an image in HTML) as if it were a file on the web server and connect the two (API and external file call) together, I succeeded in removing a burden from users’ proverbial backs (and mine).
There still remains some work to do, as my solution has a few limitations in that one of the following must be true of the user’s setup:
CURLlibrary installed
allow_url_fopenmust be set to true and PHP > 5.0.0From reading on the internet, CURL is more efficient to pass a call from my external SVG file reference (a PHP script) back to Mint to request generation and return of the SVG file, but some users do not have it compiled into their PHP setup. So, I devised a backup system that uses
file_get_contents()instead, which is the origin of requirement number two above. Given that I must pass headers that contain the user’s Mint cookie (which is required to access theonCustom()Mint Pepper routine), I have not figured out how to open a socket using other more common functions available in pre-5.0.0 PHP setups. If you can provide some advice, please post in the comments below.In addition to the reworked architectural changes, I added new error messages that are displayed as SVG, which look pretty slick. Hopefully, none of you will ever have to see them.
About this entry
You’re currently reading “Fresher,” an entry on sensory output
- Published:
- 2 years, 9 months ago
- Category:
- Software
Related entries
- No related posts

No comments
Jump to comment form | comments rss [?] | trackback uri [?]