When you program a database application, you must be bored with all those initialisation, connection, attaching, opening, closing, detaching and disconnection. With BEE, none of these are required. You simply access the database with a one liner like: database query="select * from Product where Size='M'"; All the "dirty works" of handling the DSN and access verification etc are done automatically behind the scene on the BEE platform.
Without explicit specification of the database resources, the website code cannot access anything "out-of-bound". This design on one hand provides simplicity and code-reusability to the programmers, and on another hand, provides security to the provider running multiple websites on the same server.
Handling long record display is a standard huzzle for web programmers. BEE provides display paging seamlessly. All you need to do is to specify the seek argument in a select query, and the page navigation bar is produced automatically.
For example: <beedatabase query="select * from UnderTheSun" seek="21,10,5"> will give you a page bar variable to display so that the user can navigate the list with 5 pages on the shifting page bar, 10 records per page, and record 21 (on page 3) currently showing.
If the list is presented as a form, the user can update multiple records in one go. The code for such spreadsheet-like update is simple: dbo%group "sys%form"; dbo%update; (where dbo is the Database object).
Database operations (in fact, any operations) can be driven by settings (the scheme% class). For example: scheme%dbo& might look like:
table=Product keyfield=ID match:Name=substr match:PriceFrom=min:Price match:PriceTo=max:Price
and the code can be as simple as: var scheme%dbo&; dbo% = new dbobj; to load these settings. In fact, many BEE applications are written generically with the logic coded as scheme% data. This makes BEE applications highly reusable.
|