This example it show the evolution of the application of variables.
Lets look at a paginator.
Often we only declare one variable : "string paginator_result". and applay the math directly on it. So it may end width something like : paginator regult = (100 / 10 = 10).
But some parts repeat throw all programing languages. Expecialy the variables involved in Math in this case: total rows will devide by rows per page to achieve the amount of pages to be filled or be display in the interface.
So we have 100 rows per 10 items we goat 10 pages and this need to go in to the interface. By this example you can understand that our prototypes start to assemble. As we dismount more and more parts of the planning in to the structure that's why i call it structural programming we start to assemble a structure throw prototypes.
lets see the new look, but if we separte in to parts the paginator :
- paginator_total = 100
- paginator_rows_page = 5
- paginator_current_page = 1
- paginator_generated_pages = 20
- paginator_name
- paginator_id
- paginator_total = 100
- paginator_rows_page = 5
- paginator_current_page = 1
- paginator_generated_pages = 20
- paginator_db_extension = mysql
- paginator_type = dtr
- Code will be just a raw paginator
- DB a dinamic throw the db
- Test a DTR dinamic file access
No comments:
Post a Comment