Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many developers really need code first implementation. #3457

Open
Constantine-Ketskalo opened this issue Aug 23, 2024 · 2 comments
Open

Many developers really need code first implementation. #3457

Constantine-Ketskalo opened this issue Aug 23, 2024 · 2 comments

Comments

@Constantine-Ketskalo
Copy link

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

  • 2sxc version(s): 14.7.3
  • Browser: Chrome Version 127.0.6533.120 (Official Build) (64-bit)
  • **DNN Platform 9.10.02
  • Hosting platform: IIS
  • Language: English | Ukrainian
@iJungleboy
Copy link
Contributor

I hear you.

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

@jeremy-farrance
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants