./app - Main application directory
./views/layouts/application.html.erbHTML page wrapper
- Includes top navigation menu, etc. Other views are injected here.
Other important files for development
./config/routes.rb - Contains mappings between URL links and controller actions
get 'example' => "example#test_action"
This will route the url:
exampleto the method
test_actionin our controller named
ExampleControllerNote that we refer to the controller without the appended
./log/development.log - Development log
./Gemfile - File that contains gems to be included in the rails application
More information on directory structure.
One of the primary Rails mantras is Convention over Configuration.
As such, proper naming convention is extremely important. Rails uses a combination of CamelCase and snake_case. Filenames within the models and controllers directory must be a snake_cased version of the class (either the model or controller).
class DemoController < ApplicationController
must be in a file named
./app/controllers/demo_controller.rb(for consistency, we append all controllers with 'Controller')
Reference an SDK Class using
Java::HarbingerSdkData::RadExamFact, for example. To create a query, simply use the
createQuery method on an SDK Class.
When performing queries in an application, you should pass an entity manager to get the best performance possible.
See query examples for more information
Linux (bash) Commands
For executing files,
./ refers to the current location to specify a file. Typing the filename and then hitting enter will execute the given file. This is the equivalent of double-clicking an executable in Windows.
- Run server or console
- Copy files (specify 'from' and 'to')
cp /servers/dev/harbinger-sdk-1.7.0-standalone.jar ./sdk/
- Change directory