A year ago, when I first started working on V in WebObjects, the WebObjects framework had just gone open source. There was a bunch of results from some talks at a WWDC, and an initial community had been founded. Now, I am finding that this community is starting to flourish, and now it provides some great resources.
One product of this community is a WebObjects plugin for the awesome Eclipse platform. Back then, it was early and buggy and just not right. Now, from what I had been reading, it actually works. A lot of WO things with XCode just never worked right. I thought it was me, and my setup, or the fact that I am using the free stuff. Apparently everyone has had to deal with the bugs of XCode. After this last issue with getting my old code running, I've had it! I'm making the switch!
The plugin is called WOLips and the site and community wiki can be found here:
http://wiki.objectstyle.org/confluence/display/WOL/Home
I installed the latest version of Eclipse w/ J2EE (3.3.0 Released under the name Europa). The WOLips installation tutorial says to first update to 3.3.1, then link to the latest (pre-release) builds. So I did that.
Next step was to make sure that I could do the single-directory deployment into Tomcat. Once again, community to the rescue. I used this tutorial to get the servlet up and running:
http://wiki.objectstyle.org/confluence/display/WONDER/Creating+a+wonder+app+to+deploy+as+a+servlet.
I tried it without the Wonder stuff (another OSS WO framework, to be implemented later) and it worked!
Tuesday, October 30, 2007
Wednesday, October 24, 2007
More Installs
I think it can be said that behind every good website is a good database. This probably includes both the DBMS and the organization. So my next step was to install a DB, and get it up and running.
Since V will be deployed on the standard cheap-o hosting site, I want to use the most common DBMS out there. This is MySQL. Which is good because it's free. I really like MySQL. I think it has just the right number of features and is very easy to install and maintain. It also has some of the best documentation and I've been using their SQL docs for a long time.
Complete instructions and links to download and install MySQL on Mac OS X can be found here:
http://dev.mysql.com/doc/refman/5.1/en/mac-os-x-installation.html
While the command-line stuff is always a blast, I'm a visual person and I need a visual way to manage my data. Another staple of the cheap-o hosting site is phpMyAdmin, a php tool that provides a great browser-based interface to an ODBC database. But before I can use phpMyAdmin, I need to get PHP. There are two options:
While the second option gets me an older version, it is a lot easier. All I want to do is run phpMyAdmin, and the version pre-installed is supported, so I took that route.
The instructions to enable the pre-installed PHP are here:
http://the.taoofmac.com/space/HOWTO/Enable%20PHP%20on%20Mac%20OS%20X
UPDATE: To enable PHP on 10.5 Leopard use this link:
http://clickontyler.com/blog/2007/10/how-to-enable-php5-in-mac-os-x-leopard/
Next step is to get phpMyAdmin. The download link for phpMyAdmin is here:
http://www.phpmyadmin.net/home_page/downloads.php
But of course, that's not all! phpMyAdmin must also be configured! Included with phpMyAdmin is a neat wizard script that sets up the configuration file for you. The first time I tried to run it, it wouldn't work at all, and I had to do some fiddling. I put in the sample config file, and added some random string to the blowfish thing, and that got it going. There was a bit more fiddling with the setup util before it finally worked. Eventually, I realized that the less stuff I entered, the better. So all I did was give it a super user's name and password, pointed it to the database, and it worked!
With all of the support systems in place (Tomcat, db server, db management), it was time to try and get my old V project running. I still had the xcode project, and all of the files, but I was now on a different machine, and xcode is very particular about keeping everything in place. Needless to say, things did not go very well.
I had over six hours of flying time to get my old project up and running. Just about when the stewardess was saying "turn off all electronics in preparation for landing", I finally got the old Main component to show up in the browser. Gosh XCode sucks.
Hmm.... Maybe I'll use some thing else. (hint, hint)
Since V will be deployed on the standard cheap-o hosting site, I want to use the most common DBMS out there. This is MySQL. Which is good because it's free. I really like MySQL. I think it has just the right number of features and is very easy to install and maintain. It also has some of the best documentation and I've been using their SQL docs for a long time.
Complete instructions and links to download and install MySQL on Mac OS X can be found here:
http://dev.mysql.com/doc/refman/5.1/en/mac-os-x-installation.html
While the command-line stuff is always a blast, I'm a visual person and I need a visual way to manage my data. Another staple of the cheap-o hosting site is phpMyAdmin, a php tool that provides a great browser-based interface to an ODBC database. But before I can use phpMyAdmin, I need to get PHP. There are two options:
- Download the latest tar of PHP, make and install it (or get some binary package
- Enable the PHP that is installed in Apache in Mac OS X.
While the second option gets me an older version, it is a lot easier. All I want to do is run phpMyAdmin, and the version pre-installed is supported, so I took that route.
The instructions to enable the pre-installed PHP are here:
http://the.taoofmac.com/space/HOWTO/Enable%20PHP%20on%20Mac%20OS%20X
UPDATE: To enable PHP on 10.5 Leopard use this link:
http://clickontyler.com/blog/2007/10/how-to-enable-php5-in-mac-os-x-leopard/
Next step is to get phpMyAdmin. The download link for phpMyAdmin is here:
http://www.phpmyadmin.net/home_page/downloads.php
But of course, that's not all! phpMyAdmin must also be configured! Included with phpMyAdmin is a neat wizard script that sets up the configuration file for you. The first time I tried to run it, it wouldn't work at all, and I had to do some fiddling. I put in the sample config file, and added some random string to the blowfish thing, and that got it going. There was a bit more fiddling with the setup util before it finally worked. Eventually, I realized that the less stuff I entered, the better. So all I did was give it a super user's name and password, pointed it to the database, and it worked!
With all of the support systems in place (Tomcat, db server, db management), it was time to try and get my old V project running. I still had the xcode project, and all of the files, but I was now on a different machine, and xcode is very particular about keeping everything in place. Needless to say, things did not go very well.
I had over six hours of flying time to get my old project up and running. Just about when the stewardess was saying "turn off all electronics in preparation for landing", I finally got the old Main component to show up in the browser. Gosh XCode sucks.
Hmm.... Maybe I'll use some thing else. (hint, hint)
Thursday, October 18, 2007
Tomcat
Since I am starting over again with my application, the first thing I need to do is install software. My goal is to deploy my WebObjects application on a non-WebObjects server. This means that the program will be compiled and built into Java servlets. To test these servlets, I need Apache Tomcat.
When I first started working with WebObjects a year ago (see last post -Ed.) it seemed like there were very few resources for installing Tomcat on OS X. Most of the instructions I found were for out-of-date versions of Tomcat. Finally, I mashed together the directions from a couple of websites and somehow got the thing installed.
This time, things were different. I started with the usual Google search of "Tomcat OS X." The first results were the same, out-of-date versions or horrible directions. I almost gave up, but then I found the diamond in the rough on the second page. This thing is up to date (almost), clear, fast, and easy. Thank God for this German guy.
The best instructions for installing Tomcat on OS X:
http://wolfpaulus.com/journal/mac-tips/tc6013.html
So now I have Tomcat, up next is MySQL and the connection to WebObjects.
When I first started working with WebObjects a year ago (see last post -Ed.) it seemed like there were very few resources for installing Tomcat on OS X. Most of the instructions I found were for out-of-date versions of Tomcat. Finally, I mashed together the directions from a couple of websites and somehow got the thing installed.
This time, things were different. I started with the usual Google search of "Tomcat OS X." The first results were the same, out-of-date versions or horrible directions. I almost gave up, but then I found the diamond in the rough on the second page. This thing is up to date (almost), clear, fast, and easy. Thank God for this German guy.
The best instructions for installing Tomcat on OS X:
http://wolfpaulus.com/journal/mac-tips/tc6013.html
So now I have Tomcat, up next is MySQL and the connection to WebObjects.
Chapter 1: I am born
This is the second time I have started development of the World of V. Actually, it's more like the fifth. While this blog will chronicle my efforts setting up and programming V, I thought I should start by tracing the history of this project.
I first started to work on a text-based online RPG around 2004. I had played a few online RPGs (Vampires! was my first, and of course inspired the V interface) and thought about making my own. In the summer of 2004 (I think) I took a course in Software Engineering. The term project was an online student grading system and my team and I built it with PHP and an Oracle database. This gave me some experience with PHP, and I realized that was how many of these games were programmed. I started playing with PHP and started making my own game to hone my skillz. I think I got as far as user registration, login, and moving around on the map. For some reason I always get stuck right around the map.
The following semester I took a course in relational databases (working for a company that makes post-relational dbs gives you a greater appreciation for the difference). I learned how I should have been setting up my project all along, and did a little normalization work. But still, nothing more than running around.
And then V was shrouded in darkness....
Spring of 2006. Graduate school. The course is Concurrent Programming. I am introduced to the coolness that is Java servlets. V is reborn. and reborn. and reborn.
V w/ servlets started as a normal servlet app. I think I combo'd JSP and the standard doGetroutines methods. I think I only did user registration on that version. Then, the following conversation took place with a friend:
friend: "If you are using servlets, why don't you use AJAX?"
me: "AJAX? What the hell is AJAX?"
friend: "You've never heard of AJAX? Oh, it's awesome. It lets you update pages without reloading a page. Google uses it in gmail. Look it up."
a little later
me: "Wow, this is awesome. You can make some really cool stuff with this. "
friend: "Yeah, not many people know about it. You would think more sites would use it."
me: "Yeah, I'm surprised it isn't more popular"
And so V was reborn... again. I read all of the crap that's out there, wrote my own damn XML interpreter, and re-wrote V as an AJAX app. I did a lot of work on it. I made user registration and login. And you could walk around on the map. And then the XML started to crap out on me and I read an article on AJAX with JSON.
And so V was reborn.... again. This time I was passing back JSON stuff, so there wasn't much that had to change, just strip out the XML and throw in the Javascript crap. And then, stuff happened (long story, don't want to talk about it), and I found myself bored and with a lot of time on my hands (not that I had nothing to do, I had plenty to do, but I just wasn't going to do it). So I decided to learn WebObjects. I had always heard about it. I had certainly seen it on Apple's developer website, and it seemed like to good of a deal to pass up ($50,000 off, this week only!)
And so V was reborn... again. I worked on it a lot. I moved to New England. I got user registration to work, and you could sign in and walk around on the map. You could even battle monsters and enter buildings. And then I got a job and moved and had no time.
Less than a year later, I'm moved in and am bored at work. And so V is reborn again. But this time I'm documenting things. I know V will be a landmark game, one that historians will pin as the game that changed the world, and so as a gift, I am documenting all development in this blog. Plus, my old computer drown so I have to re-install everything again, and I really wish I had written down all of the steps I took while installing things.
So here goes nothing!
I first started to work on a text-based online RPG around 2004. I had played a few online RPGs (Vampires! was my first, and of course inspired the V interface) and thought about making my own. In the summer of 2004 (I think) I took a course in Software Engineering. The term project was an online student grading system and my team and I built it with PHP and an Oracle database. This gave me some experience with PHP, and I realized that was how many of these games were programmed. I started playing with PHP and started making my own game to hone my skillz. I think I got as far as user registration, login, and moving around on the map. For some reason I always get stuck right around the map.
The following semester I took a course in relational databases (working for a company that makes post-relational dbs gives you a greater appreciation for the difference). I learned how I should have been setting up my project all along, and did a little normalization work. But still, nothing more than running around.
And then V was shrouded in darkness....
Spring of 2006. Graduate school. The course is Concurrent Programming. I am introduced to the coolness that is Java servlets. V is reborn. and reborn. and reborn.
V w/ servlets started as a normal servlet app. I think I combo'd JSP and the standard doGet
friend: "If you are using servlets, why don't you use AJAX?"
me: "AJAX? What the hell is AJAX?"
friend: "You've never heard of AJAX? Oh, it's awesome. It lets you update pages without reloading a page. Google uses it in gmail. Look it up."
a little later
me: "Wow, this is awesome. You can make some really cool stuff with this. "
friend: "Yeah, not many people know about it. You would think more sites would use it."
me: "Yeah, I'm surprised it isn't more popular"
And so V was reborn... again. I read all of the crap that's out there, wrote my own damn XML interpreter, and re-wrote V as an AJAX app. I did a lot of work on it. I made user registration and login. And you could walk around on the map. And then the XML started to crap out on me and I read an article on AJAX with JSON.
And so V was reborn.... again. This time I was passing back JSON stuff, so there wasn't much that had to change, just strip out the XML and throw in the Javascript crap. And then, stuff happened (long story, don't want to talk about it), and I found myself bored and with a lot of time on my hands (not that I had nothing to do, I had plenty to do, but I just wasn't going to do it). So I decided to learn WebObjects. I had always heard about it. I had certainly seen it on Apple's developer website, and it seemed like to good of a deal to pass up ($50,000 off, this week only!)
And so V was reborn... again. I worked on it a lot. I moved to New England. I got user registration to work, and you could sign in and walk around on the map. You could even battle monsters and enter buildings. And then I got a job and moved and had no time.
Less than a year later, I'm moved in and am bored at work. And so V is reborn again. But this time I'm documenting things. I know V will be a landmark game, one that historians will pin as the game that changed the world, and so as a gift, I am documenting all development in this blog. Plus, my old computer drown so I have to re-install everything again, and I really wish I had written down all of the steps I took while installing things.
So here goes nothing!
Subscribe to:
Posts (Atom)