Database Access
This application shows examples of database access, using 3 approaches:
- Direct Query,
- ORM Model,
- API.

The application is deliberately simple, as a sample, and does not use authentication/verification.
Source Code
The source code is available in the Pascal Indonesia repository. git clone it from that repository.
Topics
From this example you can learn about:
-
Template Engine with multiple Themes and Tags
- Using
foreach
- Using
-
Database access using ORM (Object Relationship Mapping)
- Displaying data as a list
- Joining other tables
- Searching via API
-
Basic Javascript, using jQuery and jsGrid
-
Building an API
Screenshot
Direct
This is probably the approach most commonly used by developers: querying the database directly.

Model
This is an example of database access using ORM (Object Relation Mapping). The steps are simpler, because you only need to define which fields to display and the related tables. The result is the same as the direct access approach above, but the code is simpler to write.

API
This is an example of database access through API calls. The data is displayed with a bit of Javascript, using the jQuery library.

Some links are intentionally hidden for classroom exercises. You can change them directly in the source.