2sic / 2sxc

DNN + 2sxc = #DNNCMS - This tool helps web designers and developers prepare great looking content in DNN (DotNetNuke). It's like mixing DNN with Umbraco and Drupal :)
http://2sxc.org
MIT License
145 stars 39 forks source link

Many developers really need code first implementation. #3457

Open Constantine-Ketskalo opened 3 weeks ago

Constantine-Ketskalo commented 3 weeks ago

I'm submitting a

[x] feature request

...about

[x] Content Types or data management [x] other / unknown

Current Behavior / Expected Behavior

If there are multiple developers for a website and multiple environments, it means that every time we change something in entities structures, views, settings, resources, anything that is saved in the database, it's done only on a PC of a developer that does some task. All the other developers and every environment (PROD, TEST, etc.) need the same changes to be done manually, which is time consuming and makes customer very unhappy regarding time spent by developers.

You could implement code-first approach, similar to Entity Framework. This would allow multiple developers and environments to work independantly and have different actual data on different PCs but keep structure (properties of entities, formulas, and so on) in git.

As other developers mentioned as well at stackoverflow, code-first is a common need for many projects to automate things. Export-import functionality sometimes helps, but it still requires manual work, which might cause someone to forget things or misclick. But if some entity already exists and the need is just to rename/add/delete a property, then export/import won't help.

Some more details and comments from other developers are here: https://stackoverflow.com/q/78702110/7402089

If possible it would be also very useful to implement storage of formulas code somewhere in a file system or at least synchronize those files and database so that formulas keep being tracked by git. Otherwise it's very inconvinient to edit them in browser in a small window or copy-paste it between IDE and browser text input.

Quick first-time solution might involve usage of your library that could be called with correct parameters and then update database. Ideally it would be direct sql scripts, which should work the fastest way.

Also it would be very helpful if you would call this database update implementation on a website start/restart. Optional turning on/off of this automatic DB update, as well as possibility to update database to a certain step in a chain and rolling back changes to certain step back again are also very usefull and helpful things which might be a stopper for many developers in their decision to use or not use 2sxc module at all.

Instructions to Reproduce the Problem

  1. Gather 10 developers and deploy the same site with DNN + 2sxc on each developer's computer.
  2. Let 1 of them to add new property to 1 entity, delete another property, rename third property, add custom settings, resources, demo item and view. Maybe even adding module instance with that new view to certain place on a certain page might be required.
  3. All the 9 of the rest of developers have to repeat that manually on their PCs or copy your database and lose their local data in order to apply those changes. Copying your database might be still an option for a developer in your team but it's definitely not an option for deployment to PROD and not the best option for TEST environment either.

Your environment

iJungleboy commented 2 weeks ago

I hear you.

Looks like a lot of work, so I can't say that we can prioritize this without external funding...

jeremy-farrance commented 1 week ago

I might be extrapolating incorrectly, but this also seems to tie back to being able to upgrade 2sxc Apps also. Which to me is still the single most import ability we need somewhere down the road(map) for 2sxc. :)

Old discussion (RFC: App Upgrading) is here: #2071