Archive | web 2.0 RSS feed for this section

ImageViewer3D final release

11 Mar

Today I’m going to release the code of ImageViewer3D like I promised before. It is not finished but I have to move on to other things. I few days ago I asked everyone to give input and because of the shortage of time I can’t put every suggestion in. Sorry for that but many thanks for the comments. On the bottom of this article you can find the download urls. To make this component I used Away3D as 3D engine and Tweener for the tweens.

Features

A few features of the ImageViewer

  • Slideshow
  • Flickr search
  • XML picture load
  • Multipage option

Example Application
Example with Flickr

Download example code so you can see how to use this component. I also used the as3 Flickr Library for this example.

Simple Application

Simple example

Download simple ImageViewer3D

Everyone can use the simple application. Just put the” imageviewer3d.swf” and the folder “assets” with the xml file on your server (you can’t run it local) . For the Simple ImageViewer3D you have to make sure that the photos.xml is located at the folder “/assets/xml/photos.xml”

Component

Download component

For example you can add xmlns:imageviewer3d="imageviewer3d.*" inside the application tag and add this between the application tags

Feel free to modify this component

If you find bugs our just errors please report it in the comments.

NOTE: This component isn’t working in IE6, Fireworks is expired so I will post a picture of the application later

ImageViewer3D

7 Mar

I recently discovered Away3D, the 3D engine for Flex and Flash. I’m now working for 3 weeks with this 3D engine and it is easy to consume. I started with some spheres and cubes to get use to the 3D concept. After I got bored I started a real project. For now I call that project “ImageViewer3D ” (because I couldn’t think of anything better).

My concept is inspired by the tiltViewer from www.airtightinteractive.com. He made it in Flash but it isn’t opensource so I couldn’t use his code.

Things I try to archive before I think I’m done:

  • Inserting your own Array of photos (XML or component)
  • Do something with the next- and previouspage button
  • Tweak or perhaps maybe change some effects
  • If the photos of a page are in the browser cache they all appear at the same time what causing the browser to run slow at that moment
  • If the height of a photo is larger than the width the border is thicker
  • etc… (more things that I forget)

ImageViewer3D v4

ImageViewer3D v1

I try to make a nice tool so every opinion is welcome. Positive or negative I don’t care. What effect is cool and what effect isn’t? What should be tweaked? Also feed me with new features.

UPDATE: Final release can be found here.

How to put Google Maps into Ruby on Rails

18 Jan

Introduction
Last week A month ago Gerard Lolkema had a lot of trouble getting Google Maps working in Ruby on rails so he asked me for help.

Gerard Lolkema already found a tutorial to do this. The tutorial: Rails, Geocoding, and Google Maps from Andre on Tech. This tutorial provides you of a lot of code that is direct usable but because we make a dutch website we need to display addresses from The Netherlands. This functionality is not in the code (and probably not in the plugin) of Andre on Tech. He is using a web service from an other website to get the longitude and latitude from an address, but the problem is that it is only possible to send US addresses. To find that problem took us half a day.

Finally we found an alternative to put Google Maps in our website. And this is how we did it.

Put Google Maps in your webpage
First you need a Google Maps API Key

(more…)

Search your favourite music and make your own playlist: SeeqPod

3 Jan

seeqpod logo

While I where surfing the Internet I found a nice website to search and discover music: SeeqPod. SeeqPod is made in Flex and it is really nice!

screen of seeqpod

How is it working?
It is just a powerful search, what Google is for webpages is SeeqPod doing for music. Give the search your favourite band or artist and he is searching the internet for music files that are matching your search.

When you have the music you like you can place it in a playlist what is on the right side of your screen. And while you are browsing for other artists you can play your playlist.

Discover option
Another option is the “discover” button to find bands that are related with your searched band or artist.

I’m wondering how they find the related artists because I noticed this:

discover youtube seeqpod

YouTube?

Is there room in the market for this service?
Of course, since Pandora.com is restricted for dutch music lovers maybe this is a new way to find new music next to last.fm

Why you never should use an ID in a connection table

18 Dec

Today we as project group had a problem that was difficult to solve. In the end Gerard Lolkema and Ruben Swieringa also tried to fix it and finally we solved it as a group.

Introduction:

I use an example to explain this problem. I start with 2 tables and 1 connection table to connect them.

tables_problem

Movie and user has a “has_and_belongs_to_many” relation with each other because a movie can be a favourite of multiple users and a user can have multiple favourite movies.

A movie page contains all the details of a movie and shows a list of users that have that movie as there favourite. To get that list of all the users you can just say:

movie.users

Of course you now only have the objects so you have to put it in a for loop to get any useful data like the username:

for user in movie.users
  user.username
end

(more…)

Tutorial Flex on Rails login system part 1: Introduction

13 Dec

weborb-rails-flex

These tutorials are a translation from this page that is the wiki of my school. I also mention this tutorial here

If you have a little experience with Flex or/and Actionscript 3.0 you wan’t more, like receiving data from different databases. That is what this tutorial explains to you.

The next subject are in this tutorial:

  • Databases
  • Ruby on Rails
  • WebORB
  • Flex 2
  • Actionscript 3

Eventually it is about making a entire application with these techniques.

We try to make this tutorial so easy as possible that both beginners and advanced programmers can use this techniques. Ofcourse we can’t explain everything from every technique but we try to make a begin.

If you control every technique you can start your own Flex Application.

Here you can find the different parts of the tutorial:
>>Tutorial Flex on Rails part 1: Introduction (where you are now)
Tutorial Flex on Rails part 2: Install Ruby on Rails
Tutorial Flex on Rails part 3: Install WebORB
Tutorial Flex on Rails part 4: Building a login system

Tutorial Flex on Rails login system part 2: Install Ruby on Rails

13 Dec

This tutorial is part 2 of a tutorial about Flex, Ruby on Rails and WebORB. This is the full List:

Tutorial Flex on Rails part 1: Introduction
Tutorial Flex on Rails part 2: Install Ruby on Rails
Tutorial Flex on Rails part 3: Install WebORB
Tutorial Flex on Rails part 4: Building a login system

The history of Ruby on Rails
Ruby on Rails is originally developed by the company 37Signals to use for there project management tool Basecamp. With the development from the framework the inventor David Heinemeier Hansson satisfied his own need for a tool that could provide him a way to develop lightweight, clean and fast web applications. In the object-orientated programming (OOP) language Ruby he found the ideal platform to write less code and the applying of DRY (Don’t Repeat Yourself) principe. Next to the OOP and the DRY principle Hansson also strictly used the MVC-patroon in the Ruby on Rails framework and Hansson is making use of the ActiveRecord ORM (Object Relational Mapping), what is making Ruby on Rails (also called RoR or Rails) a fest of abbreviations.

Although the framework is developed for own purpose, in July 2004 the code is released for the public use. After that Rails continued as a open source project, since Rails has an active development community that is still growing. Rails is at present, as well as Ruby, in a serious active development and version 2.0 is already released

(more…)

Tutorial Flex on Rails login system part 3: Install WebORB

13 Dec

This tutorial is part 3 of a tutorial about Flex, Ruby on Rails and WebORB. This is the full List:

Tutorial Flex on Rails part 1: Introduction
Tutorial Flex on Rails part 2: Install Ruby on Rails
Tutorial Flex on Rails part 3: Install WebORB
Tutorial Flex on Rails part 4: Building a login system

What is WebORB?

WebORB for Rails supplying a connection between Ruby on Rails and Flex (or Flash). WebORB for Rails creates services that can be called by Flex (or Flash). WebORB can be installed as a plugin in every Rails application. The services can be called trough using the Flex Data Services.

(more…)

Tutorial Flex on Rails login system part 4: Building a login system

13 Dec

This tutorial is part 4 of a tutorial about Flex, Ruby on Rails and WebORB. This is the full List:

Tutorial Flex on Rails part 1: Introduction
Tutorial Flex on Rails part 2: Install Ruby on Rails
Tutorial Flex on Rails part 3: Install WebORB
Tutorial Flex on Rails part 4: Building a login system

Before we start

*We guess that you already installed Ruby on Rails. If you didn’t, here more information about the installation Ruby on Rails ##fix url
*This tutorial is based on Windows XP. It is possible that other Operation systems look different than the examples
* Make sure your Computer is not connected to localhost trough the proxy

Begin with Rails

Now we can start with Rails. Start Instant Rails, if you didn’t do this: Right mouseclick on the I in the right bottom corner of your taskbar > Rails Applications > open Ruby Console window. If everything is going alright a console is open and you are in the folder “rails_apps”.

Now we create a new Rails project by typing the next line in the console window:

> rails loginexample

If you now push ENTER you see that a lot of files are created. Wait till the prompt is back. Now you created a folder in “rails_apps” that is called loginexample.

(more…)

Ruby on Rails database migration

28 Nov

 You can design your database diagram very well upfront but in the end there will alwaysUsers_table_before be some change in it, specially if you are going to use a technique as Ruby on Rails(RoR) for the first time. A basic example,  my “users” table looked like the image right.

After I read more and more about login and sessions I changed a lot in my database diagram. Now it is looking like this:

Users_table_after

If you work alone at a project there is no problem if you change, add or delete a field name. If you work in a group with 3 other members it starts to get annoying that they have to import a new database every time there is a change made, and they are losing there local test data that is already in the database. Well Ruby on Rails has a nice solution for this problem: Database migration. If you put every database change in a migration file and send it over to the other project members with SVN they can update there database easy and without losing there local test data.

I can go in detail of course however it is already very well described by other people. Here are some links that helped me:
garrettsnider.backpackit.com
www.emxsoftware.com/RubyOnRails/Ruby+on+Rails+Migrations+Explained
damonclinkscales.com (.pdf)

Page 2 of 3123