AvaloniaCommunity/Avalonia.FuncUI.ProjectTemplates

Alternate templates and samples

AngelMunoz opened this issue · 4 comments

I've been thinking about what kind of templates would be good for starters
I guess not a large amount but perhaps a few common cases and also what kind of examples we can add to showcase some features.

Common template I've seen somewhere else
Navigation

  • Tabs
  • Master Detail
  • Menu
  • *Hamburger Menu

of those above I think Tabs is the easiest one since tabstripPlacement basically covers Top/bottom navigation as well as Master/Detail
Menu navigation is an easy one too but requires manual control of the page stack if desired
*Hamburger Menu I think this is half covered by the Tabs Right/Left Tabstrip but may be good to do it as a separate control if there's interest for it.
A quick google threw this repository so perhaps we can use/base on that.

For Samples I'm thinking on basic scenarios like

  • Network State Detection
  • Multiple Windows / Window Events
  • Transitions/Animations
  • Dialog -> File/Folder Picker
  • Parent/Child Control communication
  • Embedded Database usage
  • Network Requests

I don't know if these samples should go on a different new repository or the main repository (I know it has some)
and the last three might be a stretch to do because that's not like avalonia/funcui specific

For the multiple windows and dialogs we might depend on fsprojects/Avalonia.FuncUI#68
if we don't want to store window references in the sate

I agree that more advanced templates would help new users to easier grasp the principles of an MVU application. On the other hand shipping complex templates is also something I'd like to avoid.
Finding a good example app that's also small enough to work as a quick start template would be ideal IMHO.

(ideas ?)

Currently there are 3 Example apps in the FuncUI repository, all fairly simple. Having one bigger Example (that ideally would be an shipping application) would be good. Not only for users, but also to cover more scenarios and see where new features might make sense.

The more complicated "Example" app utilise most or even all of the features you listed above. This then could be a good project to use in the documentation.

maybe:

  • small music player app. example (but with less features)

  • basic unsplash client (API)

  • hacker news client (hn)

what do you think ?

Finding a good example app that's also small enough to work as a quick start template would be ideal IMHO.
(ideas ?)

I don't know if you've ever seen the Windows Template Studio
but I like the approach it takes to give you a

well-formed, readable code that incorporates great development features while implementing proven patterns and best practices.

In our case I think choosing 3-4 pages taking an approach similar to the ControlCatalog
with dummy data that you can easily delete/adapt and if you don't need certain tab, you could delete it quite easy also.

WinTS

I our case I think

  • Blank
  • TreeView
  • Content Grid
  • Image Gallery
    are the best matches for the "complex" template Image Gallery and Content Grid might be able to be blended in one page as well
    (that could showcase data templates as well)
    and inside a core library a couple of modules that provide some modules that feed data into the sample pages.
    Also perhaps creating gists of sample pages that people can just go and copy paste into their projects could be useful

The more complicated "Example" app utilise most or even all of the features you listed above. This then could be a good project to use in the documentation.
maybe:

  • small music player app. example (but with less features)
  • basic unsplash client (API)
  • hacker news client (hn)

what do you think ?

the small music player app could be something it has some of those stateful things we're discusing on the other repo,
If I continue to work on the one I'm doing we could also reference that as a "How someone used Avalonia.FuncUI" but I'd prefer one of the last two options.

I had never seen unsplash, it's quite awesome and I like it perhaps I'd take a jab on that one
HN clone I've never done one so it might be a good one to do.

For the template I'd like to know how that sounds for you and for the example app I'll try to see if I can get something meaningful done by the end of the week

WinTS

  • Blank
  • TreeView
  • Content Grid
  • Image Gallery

Sounds good. What would you use as content ?

For the template I'd like to know how that sounds for you and for the example app I'll try to see if I can get something meaningful done by the end of the week

If you build something I'd happily link to it from FuncUI or include it in the examples folder if that would be ok for you.

  • Blank
    I think it'd be nice to put some generic text and some useful links pointing to Avalonia and FuncUI resources
  • Treeview
    I think having the same sample as the All Controls Sample would be enough
  • Content Grid
    I used that one for the AvaFunc App, so perhaps something similar, there's the json placeholder api which can be used for that I think tough I'd like to use harcoded items for this as well as the TreeView to not rely on internet access
  • Image Gallery
    This could be were we can put an HTTP service and fallback to a placeholder image if we don't have anything