September 24th, 2008  | Categories: Linux, Server, Servers  | Tags:

http://arope99.blogspot.com/2008/05/getting-started-with-amazon-elastic.html

This is a great tutorial on getting setup with the Elasticfox Firefox plugin in order to start working with the Amazon Web Service (EC2).  I highly recommend the read if you want to make your life easier with utilizing the services.


September 22nd, 2008  | Categories: ActionScript, Flex  | Tags:

There are lots of examples of how to parse date strings and then convert them into Date objects.  The function that was created was as follows:

NOTE: Made some changes to the code so I wanted to pass along an update to everyone.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.wezbiz.sample.util
{
	import flexlib.scheduling.util.DateUtil;
 
	import mx.utils.StringUtil;	
 
	public class DateUtils extends DateUtil
	{
		/**
		 * Converts a string value into a Date object
		 * 
		 * @description
		 * Takes a date formated string and converts it into a Date object
		 * 
		 * @param	str String "YYYY-MM-DD 00:00:00.0"
		 * 
		 * @return	Date
		 */
		public static function incodeDateStringToDateObject(str:String):Date
		{
			var retval:Date;
 
			// convert string into date and time.
			if(str != ""){
				var a:Array = StringUtil.trim(str).split(" ");
				var dateArr:Array = a[0].toString().split("-");
				var timeArr:Array = a[1].toString().split(":");
 
				retval = new Date(
					dateArr[0],
					(dateArr[1]) - 1,
					dateArr[2],
					timeArr[0],
					timeArr[1],
					timeArr[2]
				);
			}
			return retval;			
		}
 
		public function DateUtils()
		{
			super();
		}
	}
}
September 5th, 2008  | Categories: Flex, PHP, Ruby On Rails, RubyStack  | Tags: , , ,

I have been asked a few times here lately on how I setup my Flex development environment.  The following is just my preferred method of setting up as I develop my Flex applications that are hosted with Ruby on Rails applications.

Here is a list of software and links that I use for my setup:

  1. Flex Developer IDE - http://www.adobe.com/products/flex/
  2. Bitnami’s RubyStack - http://bitnami.org/stack/rubystack

 

Setup of RubyStack

This is pretty straight forward as the setup comes with an installer.  Just follow the directions as the installer and you should have no troubles.  Since I use a Windows XP distrobution I prefer to setup the RubyStack server on the root of a drive (ex: c:\RubyStack).

Once the install is complete it will launch the Apache server and provide a link to the demo Rails application that was created during the installation process.  Just ensure that you are able to view the Rails application and that everything is working correctly.  If you run into any problems, I recommend posting on the support forums on the Bitnami site.

NOTE:  If you are planning to use RubyStack for Ruby on Rails development I recommend that you download E-TextEditor and CYGWIN (E-TextEditor sets CYGWIN up for you on first launch).  Once you have these installed you will want to setup your PATH configuration using the Windows Environment Variables screen.  I personally setup all the direct paths to all the bin directories and path to E-TextEditor in order to not have to type paths in when I am calling an executable.  For instance:

PATH = C:\RubyStack\ruby\bin;C:\cygwin\bin

There are lots of resources available on the web on what the benefits are for doing this and other methods of setting this up. The screen can be obtained from right-clicking on My Computer and going to Properties.  With the new window that opens go to Advance Tab and click the Environment Variables button.  The window should look like as follows:

Windows XP Environment Variables Screen

Windows XP Environment Variables Screen

Setup of Eclipse Developer

Again this is also pretty straight forward with the installation.  If you download the installer just follow the directions provided during the installation.  When you visit the Adobe site to download the Flex Developer IDE there is an option to download the Eclipse plugin.  I have run into a few issues with the Eclipse plugin so I would just recommend installing a stand alone version of the IDE.  The following are examples of my default directories of where I install the IDE and setup the workspace for development:

Installation: C:\flex_developer
Workspace: C:\projects\flex_workspace

The projects folder allows me to have a location where I can develop standard Ruby on Rails applications as well as have my workspace for Eclipse with Aptana set to.

Project Creation and Setup

Flex & Ruby on Rails

Okay now we are getting to the purpose of this post.  When I create a new project I first create a Flex project and use the defaults for the creation.  Once the project is created you will want to change where the project gets compiled too.  You do this by creating a Rails application (instructions on how to create a new Rails application can be obtained from RubyOnRails.org) and then changing the Output Folder to the location of the public folder in the Rails application structure.  Your assets directory should be located within the source directory of the Flex application.  I have run into problems with deployment of the assets if it sits outside the source directory.

Flex & Apache HTTP server

So say you don’t want to use a Rails application to host your Flex project and you would like to just host is on the Apache HTTP server.  Just set the output folder to the location of with in your htdocs section of the Apache setup or create an Alias in the httpd.conf file.  The httpd.conf is outside the scope of these instructions so I will not be explaining this process.

Once you have decided which way your want to host the Flex application you will want to also change the Output folder’s URL field to the local address to the application.  Here are a couple of examples:

Rails App: http://localhost:3000/
HTTP App: http://localhost/folder/to/app/

Flex Build Path Screen

Flex Build Path Screen

The reason I like doing my development through an HTTP request for debugging is because eventually the app will be hosted this way.  So instead of launching from the desktop I prefer to launch it from a hosted environment to ensure that there is nothing missed when it comes to deployment.

August 22nd, 2008  | Categories: Database, Ruby On Rails  | Tags:

Say you have an old web site that you want to re-interface with Ruby on Rails but you’re happy with the database that supports it. Since the database was not written Rails friendly here is a good link to review for tying in your old database to a new fresh Ruby on Rails app.

HowToUseLegacySchemas in Ruby on Rails

Here is another good overview:

Rails and Legacy Databases

August 22nd, 2008  | Categories: General  | Tags:

Well I have to apologize for the down time of my blog. I had to rebuild the server it’s hosted on in order to move to a Ubunto Server 8.04 LTS Debian build and incorporate the ISPConfig administrator for all my hosted websites. The new server will host Flex interfaced Ruby on Rails applications utilizing Ruby Enterprise Edition for solid production deployments. I will be posting over the weekend the challenges I faced with the server configuration and deployment.

*EDIT*
Seems there are post missing as well so I will see what I can do about getting them back up on the site over the weekend.  JLW

Page 1 of 3123»
TOP