Dynamic creation of tables and columns via application

Hi,

I have tried the "Dynamic Forms" component and its a very nice app but its problem is that it creates new fields as entities in a table (rows) rather than attributes of a table (columns). This will run into performance problems and hard to maintain.

What I'm trying to build is a UI in which you can create new tables and columns in the database.

If this is possible I will enrich the functionality, so that you can define field visibility dependencies, role based field permissions, etc.

Should I create Server Actions with custom SQL like "Create [tablename]..." and  "Alter [tablename] add [column] [datatype]....?

Hi Cristoph,

The OutSystems Platform has meta data about all of its Entities ("tables") and Attributes ("columns"). You can't just create new tables or add columns, and assume that you can work with those on the Platform. I would seriously suggest you abandon that idea, or use a different tool altogether.

Hi Kilian,

I understand what you mean. If not created via IDE, Outsystems don't know about the data model. I wonder how development works with external databases.

Anyway I could create table and field in IDE and field configuration in UI. 

Next problem will probably be to create dynamic forms based on current existing columns in table. I don't think that is possible either :(

So in the end you have to create columns via IDE and update the screen form manually.

Hi Christoph,

I recently built an application where there was requirement to have dynamic properties to each product i.e. the flexibility to add columns dynamically. This is how I stored the dynamic columns and used the reference of Dynamic columns in the product entity. Hope this helps. Let me know, if you need more detail around this design.

@Cristoph: External databases are exposed via Integration Studio, but also have a fixed number of columns. In my experience, any requirement to be "flexible" and provide "dynamic" columns stems from a) the business not knowing what they want and/or b) the business expecting a very long time between requirement and delivery*. Both can be mitigated by a short sprint cycle and an agile approach to design and delivery.

*Take for example SAP, which is really flexible, but can take more time to configure than it would take to build from scratch software with similar functionality.

@Swatantra: That's, I think, exactly what the Dynamic Forms component mentioned by Cristoph does.

@Swatantra, thank you for your feedback. I think you solved it in a similar way than the mentioned component, qhich is nice for non-enterprise apps.

@Kilian, I understand your point. But scenario is that we roll-out globally and each affiliate has slightly different processes and big differences in fields and field configuration (permission/status/process/dependency based visibility, mandatory/optional, etc. We cannot just define 4-5 personas and have fixed screens. Each roll-out adds more requirements. This said I'm looking for an architecture which comes with a core + affiliate specific implementations on DB, Logical and UI level. In the end I want flexibility to develop/deploy per affiliate on top of a default (best practice) layer. 

The way outsystems works with CSS Themes is a good example. There is a core theme and you can change on top. 

I will review more on architecture frameworks.

Thanks for you both inputs!