Installing a clean version of WordPress 2.2 also gave me a nice chance to update the theme. I've chosen to install the GlossyBlue theme created by N.Design Studio. He did an excellent job on creating this theme!
Continue reading...Installing a clean version of WordPress 2.2 also gave me a nice chance to update the theme. I've chosen to install the GlossyBlue theme created by N.Design Studio. He did an excellent job on creating this theme!
Continue reading...Nowadays XML is a powerful thing. People can catch up easily with articles posted on all kinds of weblogs using RSS feeds. I've been working on a new webapplication using Ruby on Rails and Flex. There are several ways to get both of them communicating with each other. You could use the HTTPService (making an HTTP GET or POST request to the specified URL, and an HTTP response is returned) in Flex or install WebOrb as a plugin into a Rails application to expose Ruby classes as remote services.
Because I'm not allowed to install any Rails plugins on my webhost, it's impossible to use WebOrb. Therefore I'm forced to use XML as a dataprovider to Flex. There are two methods that can be used with Ruby that will generate XML.
Example 1:
Create a controller, e.g. xml.rb, and add the following code:
def list
@articles = Article.find(:all)
render :xml => @articles.to_xml
end
When calling the xml controller and the action list, all information (every cell and row) from the table articles will be rendered into a XML file. Using this method is easy and fast. However, in my situation i needed more control over the XML file (accessing multiple tables). I need a more complex XML to be generated and have it imported into flex. Onto example 2!
Continue reading...Creating web-applications with Rails on your Mac requires a suitable environment to work with. First you need to install Locomotive. Using Locomotive keeps you (almost) safe from working in the terminal. Install Locomotive with a simple drag and drop to your applications folder. That's it!
Before starting Locomotive make sure (if you want to use any) you have access to a MySQL database. This can run either local or external.
Run Locomotive on your Mac and create a new application (command + n). Define your application name and location. When done take a look at the port it will listen to. Port 3000 is used by default. Now you are able to access your new application through any webbrowser using the following address (using the default port):
localhost:3000
Please read the Rails Framework Documentation and Ruby on Rails Wiki for more information about programming in Rails.