/ Development  

The secrets of successful crafting entities

Hi there AppWorks fans,

Welcome to a new installment of AppWorks tips.

In this post we’ll start modeling our first entities. We will learn how to do this, but also what not to do! Creating new entities is also called ‘data-driven’ modeling as we describe what kind of business data can be created in our system.
At the end you will have 2 basic entities to start with. These entities will be extended in another post with new entities when we talk about inheritance and subtypes.
It’s good to have a good fundamental model as everything is depending on it.


Let get right into it…

And as always spin up the AppWorks machine and go to our most beloved URL

http://192.168.56.107:8080/home/aw_tips/

Once logged in with the ‘awdev’ user and password ‘admin’ you should be able to open that red marked ‘Workspace Documents’ artifact.

entities_001

Now you maybe need to open the ‘AW_DEV_WS’ workspace or else it is opened already.

Now it’s time for our case description as all the good low-coding begins with thinking what we want to solve with our application. So, once upon a time there was….


…There was a ‘project’ and our project had a lot of to-do items in it. These items start in a ‘Draft’ state and progress through several state definitions till the to-do item is ‘Done’ and all members in our project are very happy as the project can be ‘Closed’ when all the to-do items are in ‘Done’ state.

There is nothing better to do some review work on all the to-do items so tasks will be sent to the correct members in our project to make all the hard work happen.


What we see in the above case description are already 2 nicely defined entity where we can save some business value to. That is our ‘Project’ and the ‘ToDo’ item.

Now let us open the ‘AppWorks Project’ from our already opened workspace and select the ‘entities’ folder

If the folder is not there you can right-click the project folder to create one, but that was already described in the previous post

For entity creation we also need to right-click the folder and select ‘New’ > ‘Other’ for the ‘New Document’ screen.

entities_002

Search for ‘ent’ and double-click the ‘Entity’ document item to get the next screen

entities_003

It’s an empty entity without any ‘building blocks’. These building blocks will be created in other posts as they all have their own functionality in them.

Save the entity and give it a name like this:

entities_004

And hit ‘OK’

Now go back to your workspace overview panel (you can do that in the bottom of the screen where you will see several op ‘tabs’ of what you were working on. This makes switching screens easy to do).

Right-click the ‘entities’ folder again and click ‘New’ > ‘Entity’. Did you notice that is already available as short cut in the list!?….How nice…Also save this entity with this information:

entities_005

And hit ‘OK’

Go back to the workspace and you should see something similar like this screen with the entities in place and the tabbed items at the bottom.

entities_006


And that, my fans, gives us a ‘DONE’ for this post and you can close all the panels for now as everything is saved.

Normally we would not be completely done as we would do some extra actions, but for only creating the 2 entities these extra actions are not needed for now. The regularly used actions we would do after we think we are done:

  1. Validating the project
  2. Publishing the project
  3. Testing the project
  4. Committing it to SVN

These actions will be covered in a separate post, so have a good one for now and I will see you in the next post on a new installment of AppWorks tips.

Oh yeah….Don’t forget to subscribe to get updates on the activities happening on this site.