Last post Jul 17, 2020 03:31 PM by bruce (sqlwork.com)
Jul 17, 2020 08:41 AM|idchlife|LINK
I searched github, nuget, internet and I can't seem to find any working (not 7 years old) CRM like admin panel.
Several years ago I used to work with python and flask, with flask-admin, which had everything sorted for me: admin views (I created classes like "ContactAdmin" for every model I wanted and configured fields for list/view/edit, ability to delete, changed
layout file if I needed etc), filters, powerful search including with relationships, batch actions etc.
I can't believe that there is no such thing for AspNet, very mature framework and ecosystem.
Is there something like this automatic admin panel with ability to extend and change almost anything?
Or is it so - we need to write boilerplate admin code for filters, searchings etc by hand and scaffolding via interface/cli for every model?
Jul 17, 2020 01:55 PM|bruce (sqlwork.com)|LINK
Scaffolding tools are always more difficult to develop for strongly typed languages. Originally MVC was iron python based and envisioned having ROR like features, but could get no traction, so it became the c# version of spring.
there are only the simplest scaffolding features. This party because entity framework was recoded, in fact the whole framework has been recoded for .net core. Razor pages and blazor receive the most effort now.
with roslyns (new c# compiler) ast and code generation support, scaffolding tools become easier to write, but still take a highly level of expertise than writing in php, or ruby. But really c# is the wrong language,
and .net dropped all dynamic languages.
the best scaffolding tools will come with asp.net core. But Its still just entity, project template and simple crud.
Jul 17, 2020 02:04 PM|idchlife|LINK
I won't say that it's easy - to develop automatic admin panel for AspNet using C#.
But I will say that python flask-admin does not do more than C# is capable of.
Reflection - here. Inheritance - here. Composition - here. Conditions in template engine? They are also here.
Over the years of using flask-admin and Sonata User bundle I did not for once use monkey patching that languages like python/php are capable of. I used inheritance, replacing with my class implementing interfaces/abstract classes instead of shipped ones
That's the reason why I wonder why there is no such thing in AspNet. It's like everyone using something different, I think? Hopping to another languages or something
Jul 17, 2020 03:31 PM|bruce (sqlwork.com)|LINK
in Asp.Net all site pages/views are compiled and loaded into memory as a single application. This makes writing large CMS style systems in asp.net impractical. So most asp.net application are single process, like this forum. The app is just the forum, everything
else is a different site.
this is different than just adding modules to an existing site. In asp.net, modules must be libraries, or standalone sites. thus the scaffolding tools are focused on helping to build components, rather than features.
thus nuget libraries are more popular than scaffolding.
the extreme of this is user management in asp.net core. its a library of compiled razor pages. to change the look and feel, you need to create a whole new razor page that inherits from the library. but only the docs tells what needs to be in this new page.
this was considered an improvement over the old technique of scaffolding the source (because patches and updates are available).