YouTip LogoYouTip

Appml Case Models

* * * This case study demonstrates how to build a complete web application with features for listing, editing, and searching information across several tables in a database. * * * ## Application Model In this chapter, we will build a complete application model for the Customers table in the database. * * * ## Filters To allow filtering of data, simply add a element to the model: ## Example: CustomerName City Country CustomerName City Country For a comprehensive understanding, please refer to the (#). * * * ## Update To allow updating data, simply add an element to the model: ## Example: LastName FirstName BirthDate Photo Notes And add a and element to the element: ## Example: Customers CustomerID For a comprehensive understanding, please refer to the (#). * * * ## Security You can easily add security to an model by adding a security attribute to the tag. ## Example: In the example above, only users logged in as members of the user group "admin" can access the model. To set security for the element, simply add a security attribute to the element: ## Example: LastName FirstName BirthDate Photo Notes * * * ## Complete Customers Model In this chapter, we will create an application model for each table in the database. Create a new folder named Models. In the Models folder, create a model for each application. ## Model: Customers.xml Demo Customers CustomerID SELECT * FROM Customers CustomerName,City,Country CustomerName City Country CustomerName City Country CustomerName ContactName Address PostalCode City Country * * * ## Model View Create a model view, save it as Demo_Model.html, and try it out: ## View: Demo_Model.htm

Customers

customers=new AppML("appml.htmlx","Models/Customers"); customers.run("List01"); [Try it Β»](#) * * * ## Now Put It All Together Then, with a small amount of JavaScript code, create a test page for all models: ## Demo_Model_Views.htm

Demo Applications



function myOpen(pname) { var app_obj app_obj=new AppML("appml.php","Models/" + pname); app_obj.run("Place01"); } [Show Result Β»](#)
← Appml Case TemplatesAppml Case Prototyping β†’