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

Simplify Lombiq.TrainingDemo and make it available as a standalone solution too (OSOE-797) #131

Closed
7 tasks done
MikeAlhayek opened this issue Feb 5, 2024 · 15 comments · Fixed by #134
Closed
7 tasks done
Assignees

Comments

@MikeAlhayek
Copy link

MikeAlhayek commented Feb 5, 2024

To-dos

  • Add a solution with a barebones OC web app. So, one can open that solution and explore the Training Demo there, without anything else.
  • Configure Auto Setup with the Training Demo recipe. Make people aware in the docs how Auto Setup works and with which credentials they can log in.
  • Add its own build GHA workflow for this solution here.
  • Keep the module added to OSOCE as well, so we can manage it together with every other extension of ours, and thus be able to e.g. do OC upgrades better.
  • Change the guides so they don't refer to OSOCE (only as a link to further reading). Add a note about running the app via VS and via the .NET CLI.
  • Remove the NE dependency and the Node tutorial step.
  • Add tutorial step about the CI build.

Original content by Mike

I shared this project with my colleague to start learning OC. He was overwhelmed after a had of trying to build the training project. I tried to help him setting it up on his local machine, and gave up because I had no more time to waste. But things I noticed if that there are 90 projects in the solution. some project required .net6 and other .netstandard2.0.

Typically if you have been programing for a long time and your PC is old, netstandard2.0 may be already installed on your machine.

I think the training module is for educating users and get the up to speed as much as possible. So why getting this module up and running is a difficult task for new on comers? I found most programmers (including myself) are very lazy. In order to learn something new like OC, the simpler and quicker the get started process the better. And the higher the chance I would actually use OC.

I suggest that this project to be stripped down to very simple project where one can simply clone it and get it up and running. Then the user is able to visit the Map.cs file and start reading and learning. I also suggest using .NET 8 at the dependency for the project since that is the min framework required by OC. All the cool Lombiq toys could be part of another project but not the training module for simplicity.

I hope I don't make the most wanted list after this issue @Piedone 🤣. Just some constructive criticism to help more people adopt the amazing OC.

Jira issue

@github-actions github-actions bot changed the title Are all these extensions and libraries needed for the training module? Are all these extensions and libraries needed for the training module? (OSOE-797) Feb 5, 2024
@Piedone
Copy link
Member

Piedone commented Feb 5, 2024

Oh now you just made it to the top of the list! :D

Thanks for your feedback!

I believe what you're after is, does this project have to be part of OSOCE? It doesn't, but the price to pay is increasing our maintenance efforts, since it would be an additional OC solution to maintain. This is why we haven't done it like that, to begin with. It's not rocket science, but it's a nontrivial ongoing effort.

Also, to get rid of the necessity to set up Node, we'd need to get rid of the Node.js Extensions dependency, and thus the pickr library, as well as removing the frontend asset processing tutorial step. These are doable, and since NE has samples too, we don't need them here.

The Helpful Libraries dependency can remain, since it makes the GraphQL sample a lot simpler, and it can be just a NuGet dependency anyway.

Note that this project doesn't yet use OC 1.8 (see #124), it'll only target .NET 8 after that. Otherwise, we always target the latest LTS.

@Piedone Piedone changed the title Are all these extensions and libraries needed for the training module? (OSOE-797) Simplify Lombiq.TrainingDemo and make it available as a standalone solution too (OSOE-797) Feb 8, 2024
@Piedone
Copy link
Member

Piedone commented Feb 8, 2024

Let me summarize what I think can help here:

  • Add a solution with a barebones OC web app. So, one can open that solution and explore the Training Demo there, without anything else.
  • Add its own build GHA workflow for this solution here.
  • Keep the module added to OSOCE as well, so we can manage it together with every other extension of ours, and thus be able to e.g. do OC upgrades better.
  • Change the guides so they don't refer to OSOCE (only as a link to further reading).
  • Remove the NE dependency and the Node tutorial step.

What do you think, @MikeAlhayek?

@MikeAlhayek
Copy link
Author

@Piedone I agree with 1 and 2.
If by 3 you mean add the training module only, yes sure.

Not sure about be rest.

@Piedone
Copy link
Member

Piedone commented Feb 8, 2024

Thanks!

@MarGraz
Copy link
Contributor

MarGraz commented Feb 13, 2024

Oh now you just made it to the top of the list! :D

Thanks for your feedback!

I believe what you're after is, does this project have to be part of OSOCE? It doesn't, but the price to pay is increasing our maintenance efforts, since it would be an additional OC solution to maintain. This is why we haven't done it like that, to begin with. It's not rocket science, but it's a nontrivial ongoing effort.

Also, to get rid of the necessity to set up Node, we'd need to get rid of the Node.js Extensions dependency, and thus the pickr library, as well as removing the frontend asset processing tutorial step. These are doable, and since NE has samples too, we don't need them here.

The Helpful Libraries dependency can remain, since it makes the GraphQL sample a lot simpler, and it can be just a NuGet dependency anyway.

Note that this project doesn't yet use OC 1.8 (see #124), it'll only target .NET 8 after that. Otherwise, we always target the latest LTS.

I'm coming here from discussion #132

Yes, the effort to maintain different branches must be considered. Can you create a dedicated branch that contains only the demo project? If yes, it could be done automatically from the release pipeline of OC. You can decide to release one (or more projects, depending on the dependencies) in a dedicated branch. In this way, when you release OC, the Demo project would be automatically updated. Of course, it is necessary that the Demo project is not dependent on Node.js.

Right now, I don't have full mastery of the solution, so it is probably something you have already thought about 😜

I'm also working on a quick start guide in MD format. I will share it with you when I have a beta version ready 😊

@Piedone
Copy link
Member

Piedone commented Feb 13, 2024

That challenge is not really in changing the NuGet references (though somebody needs to do that too) but adapting to all the API changes (especially breaking changes) in OC and changes in .NET/C#. These are all more efficient to do in bulk (like fixing a new analyzer violation coming with a new C# version for the whole solution, not in N solutions).

@Piedone
Copy link
Member

Piedone commented Feb 22, 2024

@MikeAlhayek @MarGraz Can you please check out the work in progress under #134? I removed the Node dependency and there's now a standalone solution that can be directly used, with Auto Setup. Addressed all the points above.

@MarGraz
Copy link
Contributor

MarGraz commented Feb 26, 2024

@MikeAlhayek @MarGraz Can you please check out the work in progress under #134? I removed the Node dependency and there's now a standalone solution that can be directly used, with Auto Setup. Addressed all the points above.

I tried it now, nice job @Piedone. A clean solution with only 3 projects and easy to start. Thank you so much 🥳

@Piedone
Copy link
Member

Piedone commented Feb 26, 2024

Great!

@MikeAlhayek
Copy link
Author

@Piedone so much cleaner and easier now. Great work.

Why do we need App_Data by default? I think the App_Data should not exists by default. It should be fairly simple process to setup a tenant. You could even use the Workthoughts module for the setup screen "if needed" :)

Also, why do we need .AddSetupFeatures("OrchardCore.AutoSetup") in the startup of the web project?

I think a new pair of eyes should visit all the docs/instructions in the training module to ensure that the workflow of the instruction is smooth for the reader.

@Piedone
Copy link
Member

Piedone commented Feb 26, 2024

I'm not sure I understand. The App_Data folder is created by OC to store tenant data like the SQLite DB. But it's not something you have to care about.

Auto Setup is used to run the Training Demo recipe on launch.

@MikeAlhayek
Copy link
Author

I'm not sure I understand. The App_Data folder is created by OC to store tenant data like the SQLite DB. But it's not something you have to care about.

Yes. But let the trainee create the default tenant instead of creating one for them. The App_Data folder is part of the checked in files.

@Piedone
Copy link
Member

Piedone commented Feb 26, 2024

Where do you see that? Because it isn't: https://github.com/Lombiq/Orchard-Training-Demo-Module/tree/dev/Lombiq.TrainingDemo.Web. The setup is run when you run the app locally.

@MikeAlhayek
Copy link
Author

Oh, I see. I cloned the project and run it. I guess because auto startup is there, it automatically created the default site.

Never mind. Although it may not be a bad idea to let the user create the tenant to avoid what appears to be magic.

Anyway, the training module is so much easier to work with now

@Piedone
Copy link
Member

Piedone commented Feb 26, 2024

Great then!

When starting to work with this module, one should already be familiar with the setup screen (see Prerequisites so I don't think there's much point in not using Auto Setup. That's also explained under https://github.com/Lombiq/Orchard-Training-Demo-Module?tab=readme-ov-file#how-to-start-learning-orchard-core-with-this-module too.

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