Extending Proof
30/11/09 01:35 PM
I just wanted to let people know where Proof stands as a platform.
This does get a bit technical, but I’ll keep
it as simple as possible.
The Proof architecture revolves around a central controller that manages different preview subcontrollers. Each subcontroller has its own code and views to handle specific types of files. If necessary, Proof could easily be expanded to support chaining, so a single subcontroller would have its own set of subcontrollers.
The benefit of this is that I can easily implement advanced preview features. One example is LaTeX. While Proof supports viewing the source, it doesn’t view a finished product (unless you export to a PDF first). But if I wanted to add live LaTeX previews, all I’d have to do is add a subcontroller to the text viewer module that would take control of .tex files. When asked if it could handle the file, it would check if TeX was installed. If not, it would simply ignore the file and it would be handled by the normal previewer, with full backward compatibility.
So that’s the next plan. LaTeX live preview support is coming, thanks to an anonymous contributor showing me the right commands to execute to generate the preview. Now I just have to figure out how to work them in (and learn the ins and outs of NSTask in the process). So while it may take a little while, expect this neat feature sometime in the future!
The really cool part about the Proof platform is that it can be easily opened up to third-party viewers. I don’t have much experience with actual plugins and security issues surrounding them (if anybody knows how to easily allow plugins to be loaded without any major trouble, let me know!) but a relatively easy way for me to do it would for developers to send me their viewer modules for me to integrate into the original application. I’m also considering making Proof open-source, although I’ve never handled that kind of thing before and I have no idea what’s really involved, so it’d be more of a trial thing, but I’d really like to keep it open. I’m considering using GitHub but if anybody knows which one works best or how best to manage something like this send me an email.
The Proof architecture revolves around a central controller that manages different preview subcontrollers. Each subcontroller has its own code and views to handle specific types of files. If necessary, Proof could easily be expanded to support chaining, so a single subcontroller would have its own set of subcontrollers.
The benefit of this is that I can easily implement advanced preview features. One example is LaTeX. While Proof supports viewing the source, it doesn’t view a finished product (unless you export to a PDF first). But if I wanted to add live LaTeX previews, all I’d have to do is add a subcontroller to the text viewer module that would take control of .tex files. When asked if it could handle the file, it would check if TeX was installed. If not, it would simply ignore the file and it would be handled by the normal previewer, with full backward compatibility.
So that’s the next plan. LaTeX live preview support is coming, thanks to an anonymous contributor showing me the right commands to execute to generate the preview. Now I just have to figure out how to work them in (and learn the ins and outs of NSTask in the process). So while it may take a little while, expect this neat feature sometime in the future!
The really cool part about the Proof platform is that it can be easily opened up to third-party viewers. I don’t have much experience with actual plugins and security issues surrounding them (if anybody knows how to easily allow plugins to be loaded without any major trouble, let me know!) but a relatively easy way for me to do it would for developers to send me their viewer modules for me to integrate into the original application. I’m also considering making Proof open-source, although I’ve never handled that kind of thing before and I have no idea what’s really involved, so it’d be more of a trial thing, but I’d really like to keep it open. I’m considering using GitHub but if anybody knows which one works best or how best to manage something like this send me an email.