Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

2009-10-10

Panoye framework

A few month ago I decided to go open source. Not all of the code from Panoye, only one part - the framework. So, if you want to take a look on this code, search for bugs, you can download it here: http://code.google.com/p/panoye-f/.

The framework consists of PHP scripts and classes which are not specific to Panoye and can be used for any PHP5 powered site.

The most important technical details od panoye-f framework are:
  • Small and lightweight,
  • It has its own ORM (Object Relation Mapping) classes,
  • Code creation (ORM and CRUD) from database tables,
  • Filesystem (gzipped) caching for pages,
  • Automatic class loading (no need to import, require or require_once),
  • Unit testing,
  • Lots of utility classes (Strings, RSSBuilder, SitemapBuilder, HtmlLexer, ...),
  • Sql, DbIterator and AppObject, Date and Timestamp classes fordatabase programming and ORM,
  • Automatic creation of search engine friendly links for objects in database.
  • Etc.

2008-01-05

TODO list

Here's my TO-DO list for the first month of 2008.
  • Comments on panoramas
  • RSS for comments ?
  • RSS for single user's new panoramas
  • Let user choose the navigation type
  • Google mapplets (version 0.01)
  • Featured panorama and/or photographer on homepage?
  • Display of full spherical panoramas with java applet
  • Link to blog posts from the home page
  • Change urls from http://www.panoye.com/?Panorama:Show:panorama_83 to http://www.panoye.com/panorama.show.panorama_83.html ?
  • Favicon!
Items in black are a must, grey ones are optional.

Let's go to work now ;)

2008-01-02

Panorama navigation II

There was a bug in my "draggable navigation type". Instead of navigating the panorama -- Internet Explorer sometimes tried to drag&drop the image. After half an hour of searching the internet and javascript programming I think now it should be OK.

Now the question is - What should be the default navigation type?

Mouseover navigation
Just move the mouse pointer over the panorama:



...or...

Draggable navigation
Click on the panorama and move the mouse:



PS. Tried it with Internet explorer 6, Firefox 2.0 and Opera 9.2. I hope it works in IE7 ;)

2007-12-25

Panorama download progress

One thing difficult to do with javascript panorama is the download progress counter. For example, when you try java panoramas - on the bottom of the panorama there is a progress bar saying that 1%, 2%, 3%, ... 10% ... 20% ... 50% ... 99% ... of the image is downloaded.

With javascript that's impossible to do. But, after thinking (hard) about it, i decided to replace the loading.gif image (loading.gif) with the "compressed" thumbnail of the panorama. Now you can see how big is the part already downloaded in your local browser's memory:
loading panorama loading panorama
But, there is one drawback; now the map will be displayed only after the panorama is downloaded and displayed.

I tried it with Firefox, Opera, and IE6. Try it here.

2007-12-21

Why I hate IE

I simply can't understand why is it that this don't work...
var Utils = new Object();
Utils.byId = function( id ) {
if( document.all ) {
return document.all[ id ];
}
return document.getElementById( id );
}
It is just a utility function which returns me an element by its id attribute. Nothing special. But then... There is a line saying:
panorama = Utils.byId( "panorama" );
It works. Well, it worked in Firefox and Opera. But in IE, there was an error saying something like: object doesn't have that property... I can't remember now (I'm on my Ubuntu linux PC now). It took me half an hour of experiments before I found the error. The error was the word var. The line:
var panorama = Utils.byId( "panorama" );
don't work without the "var".

When I was studying Javascript, in the manual it was said that if I use var for declaring variables -- they were local variables. Without var they are global variables. Since panorama in my javascript is a global variable, I decided to delete the "var". But IE didn't like it.

Why?