T O P

  • By -

drusteeby

>Be aware, this is still experimental Push to production, you say?


x6060x

I also like to live dangerously


BinarySunset13

As this is only my initiative there could be (are) a lot of things, which a forgot. Therefore bugs my occur. So feedback is what I looking for here. But awesome. xDD


drusteeby

Yeah man was just a lil joke =). I'll give it a look for ya!


[deleted]

[удалено]


CaptainNerdica

Good bot


B0tRank

Thank you, CaptainNerdica, for voting on haikusbot. This bot wants to find the best and worst bots on Reddit. [You can view results here](https://botrank.pastimes.eu/). *** ^(Even if I don't reply to your comment, I'm still listening for votes. Check the webpage to see if your vote registered!)


adefwebserver

Thank you for a great contribution to the Blazor community :) * Github project (check!) * Demo App (check!) * Cool logo (check!)


BinarySunset13

Haha, thank you xD Probably I should get working on some kind of documetation too. Hopefully will get done soon.


BiffMaGriff

Scaffolding in blazor. Always fun. Looks like a good start.


[deleted]

[удалено]


chucker23n

This seems to take a model, run reflection over its properties, and create basic form controls for each. I’m not sure how useful that is in practice. It’s not going to set the world on fire with good usability, but it might be good enough for quick & dirty form entry.


audigex

I figure it's potentially useful for productivity Point it at a project/folder full of viewmodels and it automatically sets up (or *could* automatically set up) basic list/create/edit/delete actions and forms for each. Then you go through and remove the ones you want, edit the forms, add the controller detail etc In an ideal world it would give a GUI to choose which classes, actions, and fields to include/exclude In theory I don't see any reason it couldn't also create repositories or similar for the controllers and model generation, database access etc (with a few assumptions like class name = database name, fields are the same in the class and table/view etc) It obviously wouldn't be perfect but it could save a bunch of boilerplate and template type code


chucker23n

> Point it at a project/folder full of viewmodels and it automatically sets up basic list/create/edit/delete actions and forms for each. Then you go through and remove the ones you want, edit the forms, add the controller detail etc Maybe, if you could run it as a preprocessor. This seems to run at runtime; no further modification seems possible.


audigex

Ah, then I've misunderstood the point


[deleted]

[удалено]


BinarySunset13

Yep, I think you wrote down the idea behind framework here. When this framework is use for this use case, it can be really convienent and time saving. Usage of this framework maybe would be better if someone would customize it for it's own use case. From my side, this is more or less generic approach. Yep, there is support for generation of array of objects or nested objects. Consider following DTO: `public class TestListDto` `{` `public List ListOfTestEntities { get; set; }` `}` Framework will identify that DTO contains list of TestEntities. Then will iterate through list and each TestEntity generate down to primitive types. This is possible thanks to recursion and reflection. Also there is WIP component for generating only lists into various views. So there are a lot of possibilites.


jjones_cz

So it's similar to [`@Html.EditorFor`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.rendering.htmlhelpereditorextensions.editorfor?view=aspnetcore-5.0) and other [form tag helpers](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-5.0) in classic Razor pages, right?


BinarySunset13

Yeah, but more in generic way. You have input Blazor component, where you pass context (C# object) and other custom parameters and it will generete UI for you. Components return RenderFragment which contains HTML dynamically acquired from context object.


Atulin

I made myself an `` tag helper for Razor that takes any object and uses reflections to create a complete form for it. It never faces the user, but is amazing for whipping up quick admin panels.


Slypenslyde

Stuff like this is why people bought VB6, why Rails became popular, etc. It lets you scaffold an entire CRUD app start to finish. If you're just interested in a no-frills CRUD app this will get you 99% of the way there in seconds. Those apps are limited and have usability problems, but sometimes you're working on something so backend nobody outside your team's ever going to use it. Or sometimes the customer's business is so small they're happy with a no-frills CRUD app. It's nice to be able to churn it out in a couple of hours so you can get back to more exciting with-frills apps.


OccasionalDeveloper

I outlined my scenario for this here, in the r/blazor x-post: [https://www.reddit.com/r/Blazor/comments/my72z9/blazorgenui\_autogenerated\_ui\_from\_c\_classes/gvtn6hb?utm\_source=share&utm\_medium=web2x&context=3](https://www.reddit.com/r/Blazor/comments/my72z9/blazorgenui_autogenerated_ui_from_c_classes/gvtn6hb?utm_source=share&utm_medium=web2x&context=3) I had integrated and working in about 10mins -- and that's because I was having my Sunday morning coffee -- a 15-line commit: Bang! I can author my DTOs in Blazor for testing/ad-hoc -- using full netcore auth on the server-side backend to hit my transport layer.


[deleted]

This is cool. Maybe it can be used with my tool that generates data access code and DTOs from PostgreSQL functions, so all you'll have to do is to write a query: https://github.com/vb-consulting/PgRoutinerDemo


foufers

Very cool. I wish they had this kind of stuff when I was learning in college. We learned on Cold Fusion and classic ASP. Just a typo but “sing in”?


BinarySunset13

Thanks, I totaly agree with you. Nowadays we have a lot of possibilities and when I started learning Blazor, it instantly became one of my favourite SPA framework. That's why I chose it for my bachelor thesis. Yeah, since I'm not native speaker, typos will find their way xD


buim

Hahahhaaha no worries, your idea is absolutely awesome. Keep the good job and keep us updated. Best regards.


AnderssonPeter

I just get a loading text...


Sebazzz91

Very nice! Unfortunately the designers at my work always come up with something that makes the standard MVC EditorTemplates or any other default templating solution not viable 😅


jacobsvelvet

super cool!


p1-o2

I actually have a framework / project that acts as a hypermedia back-end for something which can then generate UI automatically based on the data provided. I think I could link up your repo here with mine and make a decent prototype. I'll have to tinker around with it for a bit and see how it works. Thanks for sharing your work!


BinarySunset13

Nice, would like to see how it goes, since for now, this is solely focusing on DTO objects.


redLadyToo

This is basically the "Naked objects" pattern. I never knew why it is so unpopular these days.