Project structure & entry point
Implementation in foxpro
- A VFP project (.PJX) is a compiled desktop app; you set a Main Program (PRG) and build an EXE.
- Startup often includes:
SET PATH, SET PROCEDURE TO, SET CLASSLIB, SET DATABASE TO, opening tables, setting ON ERROR, then DO FORM.
- UI is frequently the “shell” (a main form) that owns navigation and lifetime.
- “Project Manager” is the canonical view of code, forms, classlibs, reports, etc.
* main.prg
SET EXCLUSIVE OFF
SET SAFETY OFF
SET PATH TO "prg;forms;libs" ADDITIVE
SET PROCEDURE TO prg\\apputils ADDITIVE
ON ERROR DO errhandler WITH ERROR(), MESSAGE(), LINENO()
DO FORM forms\\mainform.scx
READ EVENTS
Closest Implementation in Ruby On Rails 8
- A Rails app folder is the “project”; the entry point is the Rails server + router, not a single PRG.
- App starts at
config.ru / bin/rails server, then flows through routes → controller action → view/response.
- “Shell form” becomes layout + navigation partials, while app lifetime is per request (plus background workers).
- Conventions matter: Rails finds things by naming/location vs VFP’s project manager membership.
# create + run
rails new myapp
cd myapp
bin/rails server
# config/routes.rb
Rails.application.routes.draw do
root "dashboard#show"
end
- Gotchas / Mindset shift: No single “main.prg”; think request lifecycle + routes as the entry.
Environment/configuration
Implementation in foxpro
- Environment is often configured via
SET commands, config PRGs, INI files, registry, or environment variables read at runtime.