Conversation
…uch projects should be configued in 2.4 and beyond.
…nterVersionCompatibility: 2.4.
…kage, indicating version for Starcounter 2.4.
The template contains boilerplate code for a new Starcounter app with the folder structure and basic handlers and viewmodels.
| { | ||
| partial class HelloStarcounterPage : Json | ||
| { | ||
| void Handle(Input.AddVisitorTrigger trigger) |
There was a problem hiding this comment.
rename trigger to action
| [Database] | ||
| public class GuestBook | ||
| { | ||
| public string FirstName { get; set; } |
There was a problem hiding this comment.
Change to just use name
| { | ||
| public string FirstName { get; set; } | ||
| public string LastName { get; set; } | ||
| public string Visited { get; set; } |
There was a problem hiding this comment.
Change to DateVisited
| new MainHandlers(), | ||
| new CommitHooks(), | ||
| new PartialHandlers(), | ||
| new OntologyHooks() |
There was a problem hiding this comment.
Ontology hooks should be removed
| }; | ||
| }); | ||
|
|
||
| this.Visitors = Db.SQL<GuestBook>("SELECT g FROM GuestBook g"); |
There was a problem hiding this comment.
This should not be updated manually. It should be changed to adding the new GuestBook with this.Visitors.Add
|
@threezool Thanks for contributing! Can you guys take a look at this too, from the app dev side? You would know better if this is something we are missing and/or if there are already plans for something similar. @Mackiovello is already busy reviewing the actual code, and I can take on me to review the technical aspects (i.e. the actual project settings, etc). |
| @@ -0,0 +1,7 @@ | |||
| namespace $safeprojectname$.Helpers | |||
| { | |||
| internal interface IHandler | |||
There was a problem hiding this comment.
I'm not sure about this interface, having an internal abstraction just for the sake of registering hooks and handlers. I'd prefer removing that and just statically list relevant classes in main, invoking Register on each.
| <template is="dom-bind"> | ||
| <div align="center"> | ||
| <h2>Hello Starcounter</h2> | ||
| <h2>Starcounter Gust Book</h2> |
| }); | ||
|
|
||
| this.Visitors = Db.SQL<GuestBook>("SELECT g FROM GuestBook g"); | ||
| this.Visitors.Add(new VisitorsElementJson |
There was a problem hiding this comment.
Doesn't need to be in the transaction
|
@threezool You request to merge this into The project template you provide is compatible with 2.3, but not 2.4. So either this merge should go into Details are here: https://github.com/Starcounter/Starcounter.VisualStudio/wiki/Version-compatibility#how-do-i-migrate-a-project-from-21-3--24-or-vice-versa |
| <VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project"> | ||
| <TemplateData> | ||
| <Name>Starcounter Boilerplate Application</Name> | ||
| <Description>A boilerplate project for creating a C# application that executes inside Starcounter</Description> |
There was a problem hiding this comment.
Can we do better here? Something that better distinguish this one from the "minimal" Starcounter Application.
There was a problem hiding this comment.
In VS most project templates use 'Blank' as a prefix for a bare minimum project. I'm thinking we could maybe use that on the already existing project to match the convention in VS.
Then we could maybe use the 'Standard' or 'Basic' prefix for this template and adapt the descriptions there after.
| </ProjectSubType> | ||
| <SortOrder>1000</SortOrder> | ||
| <CreateNewFolder>true</CreateNewFolder> | ||
| <DefaultName>Starcounter Boilerplate Application</DefaultName> |
| page.Visitors.Data = Db.SQL<GuestBook>("SELECT g FROM GuestBook g"); | ||
| var page = new HelloStarcounterPage | ||
| { | ||
| Visitors = {Data = Db.SQL<GuestBookEntry>("SELECT g FROM GuestBookEntry g")} |
There was a problem hiding this comment.
Not a very beautiful line of code. Consider breaking out the Visitors into a separate HTML view + view-model and use a blending point (starcounter-include + Self.GET) to demonstrate modularity within applications. Or write page.Visitors.Data for readability. Another possibility is to just set Data and then attach to visitors in OnData.
The let's invite @jwillmer and ask for his review if he can find the time. |
|
How can I test it? Do you have a vsix file for me or is it already integrated in a nightly starcounter build? |
|
|
Sounds really time consuming. Let me give you feedback as soon as you have worked out how to ship it to the end user. |
|
I made a .vsix file for the template and it should work, first time i had to make one. The template should now also be under the Starcounter node with this installer. |
|
Yah i just noticed that its limited to VS 2017 atm, looking in to making it compatible for VS 2015 also. |
|
Try to give the VSIX a good name already since it is used to auto update and don't forget to always increase the version number after changes so that all systems will recognize it as an update. |
|
There, figured out how to set the appropriate version for the vsix installer. |
…fe default app name
Second start of VisualStudio worked without this error. |
|
Comments:
If I browse to |
FWIW, this is changed in 2.4. There, we are switching to other private assemblies (i.e. |
|
Ping @threezool. This was a good initiative. Where are we on this? |
|
Have had some other things to do but it is not forgotten. Just need to find the time. |
|
Let's not have so much work laying on the floor. Maybe it is best to merge as it is and split @jwillmer's comments (most, if not all, of which are valid) into separate issues? |
|
Its ok with me, i can transfer over the points in to separate issues to be worked on. It would also be easier to find the time if they are split. |
|
This PR is was not updated in a while. Please consider speeding up the review, splitting the changes into smaller tasks or anything else that makes it easier to decide about merging before it starts to smell. |
|
Merging and will add the points from @jwillmer as issues instead. |



The template contains boilerplate code for a new Starcounter app with
the folder structure and basic handlers and viewmodels in place.