Basic Development

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Kahuna
Posts: 49
Joined: Fri Nov 10, 2006 6:14 pm

Basic Development

Post by Kahuna »

As I expressed in an earlier post - AwareIM is such a paradigm shift from my VB experience to be almost mind blowing! It’s really challenging.

I can create some of the tables / relationships from my recent developments and the queries etc to make them useful - but more basic development has me stumped (and I'll admit to not having waded through the User Guide tomb yet). Two things that have eluded me in studying the evaluation version:

1. Is it possible to use a current Db as the basis for a new AwareIM app (eg. a previously populated MySQL set of table?

2. How to develop a simple single form page looking at one table with 2 combos, one button and one text display.

The first question above seems self explanatory.

The second - I have the following:

Table 'Compatable' (which I guess is an object in IM) with 'TypeFrom', 'TypeTo', 'Compatibility', 'Comment'.

I need a form to display

Combo1 = TypeFrom
Combo2 = TypeTo
Button = Show in Text Display the 'Compatibility' + 'Comment'

This is a multiply redundant table (with lots of duplicate information) for the purposes of keeping this simple.

Any feedback on how this simple set-up would work might give me a leg-up on the system.

TIA - Cheers
Kahuna
---------
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Once you get used to Aware IM concepts we promise that you will not want to go back to the old way of thinking.

Answering your questions:
1) No, using existing database tables is currently not possible with Aware IM
2) With Aware IM you really need to focus on the business side of an application first, rather than on the nitty-gritty details of forms and buttons. You need to create a "model" of an application - identify business entities of your application and understand how these entities are related. For example, a library member (a business entity) may borrow several library items (another business entity) etc - this is from the sample application.

Going back to your question - you really need to tell us what this form is all about as far as business issues are concerned. What is it that the user is doing here and what all these drop downs etc mean. Once again you need to start thinking in terms of business concepts (business objects) and application use cases, rather than tables and forms.
Aware IM Support Team
Kahuna
Posts: 49
Joined: Fri Nov 10, 2006 6:14 pm

Post by Kahuna »

Once again – thanks for the feedback folks.

I can really only describe this little test in terms of the way I would develop it using my old procedural techniques.

The intent of the app is simply to compare the compatibility of two chemicals.

I currently use a single table as described earlier:

Table 'Compatible' (which I guess is an object in IM) with 'TypeFrom', 'TypeTo', 'Compatibility', 'Comment'.

This is a multiply redundant table (not normalised in any way) since it’s so short.

The Compatible table might look like this single row:

TypeFrom TypeTo Compatibility Comment
Alkyd Oil Epoxy No these products are not compatible

I need the form to use Combo1 to show a list of all items in the TypeFrom column – where the user selects one item (say, Alkyd Oil).

Combo2 will be populated with all of the entries in the TypeTo column where the column TypeFrom = Combo1.

The button would query the table to determine the row that has Combo1 selection in the TypeFrom column AND the Combo2 entry in TypeTo column – then display the text from the Compatibility and Comment columns – on the form.

The Result may be (in this case)

‘No, these products are not compatible.’

I’d appreciate it if you could help me understand how that might work in IM.

Am I right in thinking the analogy of the Table / Column is that of Object / Attribute?

Appreciate the help.
Kahuna
---------
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

I understand the logic is as follows (correct me if I am wrong):

1) Select chemical 1 from a dropdown box
2) Select chemical 2 from another dropdown box
3) Check compatibility and display the result on the form

Here is one way of implementing it in Aware IM.

1) Add object Chemical with attribute Type (text). This object will be used to hold all non-duplicated chemicals in the system.
2) Add object Compatible with attributes according to your description.
3) Add non-persistent object CompatibilityTest with the following attributes:
- Chemical1: no-multiples-allowed reference attribute of type Chemical with Combo Box presentation option.
- Chemical2: no-multiples-allowed reference attribute of type Chemical with Combo Box presentation option.
- Result: text attribute, read-only, with the length equal to the length of attribute Compatible.Comment.
4) Add the following 2 rules to object CompatibilityTest:

If CompatibilityTest.Chemical1 IS DEFINED AND CompatibilityTest.Chemical2 IS DEFINED Then
FIND Compatible WHERE (Compatible.TypeFrom = CompatibilityTest.Chemical1.Type AND Compatible.TypeTo = CompatibilityTest.Chemical2.Type)
CompatibilityTest.Result = Compatible.Comment

If CompatibilityTest.Chemical1 IS DEFINED AND CompatibilityTest.Chemical2 IS DEFINED AND NOT(EXISTS Compatible WHERE (Compatible.TypeFrom = CompatibilityTest.Chemical1.Type AND Compatible.TypeTo = CompatibilityTest.Chemical2.Type)) Then
REPORT ERROR 'Compatibility data not found for selected chemicals.'

6) Add process RunTest containing the following 2 rules:

ENTER NEW CompatibilityTest
VIEW CompatibilityTest


To run the test, start process RunTest in the operation mode (web browser). Select both chemicals from the dropdowns on the form and click Create. The Result box should show the compatibility comment, or an error message would be displayed.
Aware IM Support Team
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Support for existing database tables is now available in version 2.2
Aware IM Support Team
Post Reply