In
part 1 (Appcelerator RIA + Spring Services) I gave an overview of the technologies that I used for my Appcelerator learning exercise, including Spring, Skyway Builder, and Appcelerator (of course). I should have probably described the application that I create too. I built an application that lets the end-user of the application get a five day weather forecast for a city that they select. For this application:
- the weather data comes from a NOAA web service that is accessible using SOAP
- the Spring Services are defined and generated from Skyway Builder
- the web application is implemented using Appcelerator
The Appcelerator website is the best resource for installing Appcelerator, so I won't repeat the steps here. Suffice it to say that Appcelerator is pretty simple to install, and the principle mechanism for interacting with the Appcelerator SDK is the command-line interface (CLI).
Appcelerator also offers some
Eclipse-based tooling, but I wasn't able to get it working. At first I thought it might be colliding with the Skyway Builder plugins, but Appcelerator plugins didn't work with a vanilla Eclipse 3.3 installation either. The Appcelerator plugins are no longer prominently highlighted on the Appcelerator website, so I'm thinking it may no longer be maintained. I asked on the Appcelerator forums whether Eclipse plugins were even supported any longer, but I never got a response. As a matter of fact, I didn't get any response to any of my forum questions. Bummer!
Undeterred....I proceeded on my own. I created a new Skyway project called NOAAWeather, which resulted in two Eclipse projects: a modeling project (NOAAWeather) and a standard Eclipse web project (NOAAWeather-Web). My goal was for Accelerator to generate the basic structure of a web application, and I would copy the structure into the web project.
Side note: This series of blog posts assumes that the reader has some basic familiarity with Skyway Builder and Spring. If you aren't familiar with Skyway Builder, there are a variety of resources available on the
Skyway Community website, including videos, tutorials, and sample applications.
Using the Appcelerator CLI, I specified the following:
C:\java\appceleratortest>app create:project . myapp java
Connecting to update server ...
Fetching release info from distribution server...
Using service java 1.0.19
Using websdk 2.2.2
Installing components ... (this may take a few seconds)
Appcelerator Java project created ... !
The SDK created a folder called myapp which had several sub-folders. Using the contents created by the SDK, here's what I did to appcelerate my web project (fyi...appcelerate is not an official appcelerator term...but maybe the should consider it...lol):
- copied myapp\templates\web.xml to WEB-INF\web.xml in Eclipse web project
- copied java libraries (myapp\lib\*.jar, myapp\lib\compiler\xerces-2.7.1.jar, myapp\lib\compiler\xml-apis-2.7.1.jar) to WEB-INF\lib in Eclipse web project.
- copied myapp\app\services\org folder to src folder of Eclipse web project
- copied myapp\public folder to the WebContent folder of the Eclipse web project
I deployed the web project (to Apache Tomcat) and made sure Service Tester worked. I was confident that the basic pieces were in place. The next step (
part 3) was to start using Skyway modeling to implement and generate the Spring services that would be used by my application.