Skip to main content

 

I would like to develop something similar (with the SF) as the Thinkwise Platform badges so we can award badges to our colleagues.

Everyone wants to badges

 

:one: - What would be the best datamodel design for this? 

 

  • New badges (icon) must be able to be created at all times;
  • An employee can earn zero or more badges;
  • A badge can be assigned to zero or more colleagues;

  

:two: ​​​​​​- Is there already a way to realize a second layer over the employee image with a general badge based on the condition an employee have one or more badges? 

 

:three:  - What is technically and performance-wise the best way of presenting the badges (all images stored in the database) in the context of an employee. 
 

 

Hi Dennis,

First of all, that's a fun idea to implement!

To answer your questions, you can go multiple routes but my answers are from my persepective:

What would be the best datamodel design for this? 

The picture shows a good start, you indeed need employees and badges, and a table in between to connect them together. What you'll also need are the requirements for obtaining badges. This probably should be another table with reference to the Badges table. I suggest taking the System flow route to periodically check if employees meet the requirements of any badges. I don't think you want to do this in triggers or use manual tasks to check this.

The requirements could be as simple as "Create x-records in y-table.” or "100 invoices sent”. You can go the route of writing the requirements in SQL code in your end application and that your System flow uses these to see if requirements were met, but I think it's better to have table-valued functions that return a list of all employees that meet the requirements for one specific badges. That will mean you'll need one function for every badge. Alternatively you can make it an procedure instead and do all requirement checking for all badges in there.

I do think you can utilize Domains and Elements for recording your Badges. Since here you can put in the domain Badge and input an Element per Badge, and give it an Icon. These you can use as input for your SQL-typed Control procedure to create a template per Element, only thing left is that you add the code :smile: You can use the same Domain and Elements to create a Manual control procedure to sync the Badge table in your end product with the Badges named in the Software Factory.

Is there already a way to realize a second layer over the employee image with a general badge based on the condition an employee have one or more badges? 

Maybe a quick search might end up to a website that has an API you can use to input two pictures and putting them together. We do not have a standard solution for this.

What is technically and performance-wise the best way of presenting the badges (all images stored in the database) in the context of an employee. 

Storing the images in the database is the best way forward. I'm not sure presenting it in a formlist will perform well but you can take a look. Otherwise a simple Gid/List will suffice.

Hope this helps!


Hi Dennis, did my reply help you out? I'm curious about the result too! :smile:


Hi Mark, 


To be honest I started this as a "nice to have" for our application. Based on your reaction:

"Maybe a quick search might end up to a website that has an API you can use to input two pictures and putting them together. We do not have a standard solution for this.”

this ticket hasn't been followed up. At the moment the focus is on points with a higher priority, perhaps this will be followed up in the future.


Reply