Tuesday, September 1, 2009

OCAL Browser Object Diagram: Comments please!!!

The diagram below is a rough sketch of the basic objects in the OCAL Browser. It's probably not correct, so feel free to tell me how to correct it.




http://ocal-browser.googlecode.com/files/ocal-browser.png


Everything is an interface because each type can either have multiple distinct implementations handling different data (SVG,PNG, etc) or contexts (file, screen, web server, directory),
but also to allow for multiple branches of any distinct implementation to plugged in at any time to facilitate testing. There should always be an "official" branch, but it should not stop others from expanding the applications of the browser.

If anyone has any comments or suggestions, please let me know! Or better yet start a discussion on the ocal-browser-discuss group.

Saturday, August 29, 2009

Plan for GUI

The direction that I see for the OCAL Browser is similar to that of Google's Picasa.



The folder bar on the left lends itself to categories/tags as well as directory structures.
The zoomable display pane, search bar, and quick actions are all perfect. Edit mode is also well organized as it allows for the application of defined filters as well as changing of the settings.

In fact, the implementation of these features should be very clean considering SVG's Javascript support and Gecko's ability to render SVG with HTML and XUL natively.

The extra niceties of Picasa can be implemented by users in the form of extensions, but the basic functionality woudl be great for our application.

Another idea I would like is for a lightweight viewer for SVG files on the file system or just opened from the browser that supports zooming, rendering to PNG, copy of code to the clipboard, and printing. Picasa has also implemented this for images, the Picasa Photo Viewer.



This would make quick operations such as those listed above much easier for uusers than firing up the full browser.
Kind of like QuickView, that text file viewer that Microsoft used to include with Windows.

Ambitious? Yes, but isn't this what Open Source and Public Domain Graphics and Art deserve?
Plus it'll be really cool to accomplish!

--Kevin James



Wednesday, January 14, 2009

Learning Python, Part II - Editors

As I continue my education in Python, I have had a little trouble deciding on an editor. I use both Linux (Ubuntu) and Windows (Vista) on regularly and wanted an editor that would work in both. early on, I used the editor included my Python distribution for Windows, which was also available in Linux, but I found it to be lacking features. What I really wanted was something closer to an IDE.

Being a C++/C#/Java programmer, I have been quite spoiled by Integrated Development Environments and find that as long as the IDE doesn't get in your way, you can learn a language rather quickly.I also wanted to code Python using software that I can use for other languages as well, in case I need to embed HTML or XML in my scripts. So I first turned to Komodo Edit, the free scripting language, HTML, and XML editor from ActiveState. After configuring the python interpreter options, I found that I could easily create a script and the completion wasn't bad. I did find that Komodo lacked support for directly executing script: I had to tell the editor to run my selected interpreter over the currently open file. Fortunately, I could save this to the toolbox (right-side of image) for later use.

After this, I remembered that Netbeans, the open source Java IDE sponsored by Sun Microsystems, supports Python in its latest version. While it takes a bit longer to load (I downloaded to heaviest version and then loaded it with plugins), I found it to be a better experience for me. Debugging support was much more complete in Netbeans, which helped me tremendously in troubleshooting.

One downside to both is that completion-based on the type of object left much to be desired. Visual Studio is much better in this regard. This may be due to the fact that variables are not typed explicitly in Python code, making such completion difficult at best.

Another candidate is Aptana Studio, an Eclipse-based web languages IDE, which recently added Python support via PyDev. Unfortunately, Aptana Studio's Python completion is not on par with it's Javascript and PHP completion. It was quite bad actually. It is possible that I misconfigured something, but that does not explain the fact that the exact same script that I ran in the other two editors fails to execute properly in this one.

I ran the script file the command line and it worked with no options specified at all:

If anyone knows what I did wrong, I welcome the help, but in the end I think I would still stick the "traditional" IDE and use Netbeans for my Python needs. That is until I tackle Google App Engine. For this, Aptana Studio could be quite useful. Maybe, the Aptana people will release a plugin for it and make it easier for me.

Tuesday, December 23, 2008

Learning Python, Part I

After some hours investigating python I must say that I am quite intrigued by this language.
When I first heard about Python, I was also hearing about Ruby and Groovy, and many other languages that seemed to be springing up everywhere. When I saw its syntax, I was a bit taken aback. The whole delimiting via indentation is counter-intuitive to my C/C++ roots.

I am putting effort into learning Python because it seems to be the language of choice for many projects that want to add extensibility by users, but it is also used by several Mozilla-based projects as the primary development language. It's been popping up all over the Linux world in the form of tools and graphical utilities.

It is with this in mind, that I have decided to use it for the ocal-browser (it also doesn't hurt that Python is used by GIMP and Inkscape). From what little I have learned, Python is quite powerful out of the box. The library is robust and the available bindings for other libraries are numerous. This should be fun.

Yep, picking this thing back up

Let's try this blogging thing again...
Maybe we can be a little more informative.

I dropped the prism for firefox thing as I got too bogged down and Firefox 3 was already going to make it soo much easier to pull it off than I could do. My last post shows the progress that the Mozilla regulars were able to do.

My current project is creating a clipart browser for the Open Clipart Project.
It will be done in Python and GTK probably using Cairo.
One of the more interesting results from this project will be code not used in the browser itself:
a Synchronization/Upload API for ccHost.

Open Clipart Project uses ccHost, a media-oriented cms created by Creative Commons, to host the thousands of SVG and PNG files hosted by the project. Unfortunately, there is not a defined method of accessing these using code. This project will contribute one.

If you have any suggestions or questions, please visit the project site and its discussion group.

Friday, April 4, 2008

Prism for Firefox 3

They've done it for Firefox 3 (see http://starkravingfinkle.org/blog/2008/03/prism-09-now-as-a-firefox-extension/). Now Firefox 3 users can have Prism integrated into their browser.
I am still working on a Firefox 2 version ( I have had to focus on work projects). I'll post some code soon.

Sunday, November 11, 2007

Goals and Ideas for Prism Extension

Yes, i know that some of this may be a bit outlandish for a mere extension, but this is my first one and I want it to be special!

    For Firefox 2

    Javascript is 1.7 compatible

    Preferences for custom execution

    Gecko Runtime

    • Selectable version
    • Selectable Path

    Prism

    • Version
    • Path

    For Firefox 3

    Takes advantage of Javascript 1.8 features

    Preferences

    Allows for internal gecko execution

    Allows for internal Prism

    Preferences

    Allowable protocol schemes (http:, ftp:, gopher:)

    Auto-Archiving of .webapp files (ala MR Tech Local Install)

    Any needed for features (update this as needed)

    Options Dialog

    Integrate into main Firefox options

    Download & install latest XUL Runner

    Download & install latest Prism

    Internal WebApp option dialog

    Support Sidebar

    Generate Javascript and append to webapp.js

    • Uses templating via E4X

    Support platform-dependent associations

    By File Extension

    • Windows
    • Mac OSX/Darwin
    • Linux
      • KDE
      • Gnome
      • Common (?)

    By Protocol (?)

    Internal creation of uncompressed webapp in profile

    Download "favicon" (?)

    Internal shortcut creation

    Context Menu option for webapp generation

    .webapp links

    Any hyperlinks

    Filter javascript links

    Bookmarks

    • Create bookmark for opening with prism://

    Current Page

    Internal creation of webapp bundle s (same types as above)

    Protocol handler (prism://)

    • Launches address in Prism
    • Does not create a webapp

    Bookmark folder

    • Makes folder entries into a sidebar
    • Empty webapp is generated
    • Should be able to use XSLT/XPATH & E4X

    Prism App launcher

    Separate xulrunner app

    Integrate major pieces into Prism