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

SPA template using Blazor #394

Open
hitaspdotnet opened this issue Jul 29, 2018 · 31 comments

Comments

@hitaspdotnet
Copy link
Contributor

@hitaspdotnet hitaspdotnet commented Jul 29, 2018

What Blazor is: An experimental .NET web framework using C#/Razor and HTML that runs in the browser via WebAssembly

Resources:

Blazor in action:

https://blazor-demo.github.io/

@hikalkan hikalkan added the feature label Jul 30, 2018
@hikalkan

This comment has been minimized.

Copy link
Contributor

@hikalkan hikalkan commented Jul 30, 2018

I like the idea behind Blazor. Will work on that template. Thank you for your suggestion.

@bbakermmc

This comment has been minimized.

Copy link
Contributor

@bbakermmc bbakermmc commented Jul 30, 2018

Everyone would love to not use JS :P I haven't been following it too closely other than its hit v .5 last week I think. But we know MS tends to issue breaking changes a lot so that's the only gotcha with the early life cycle stuff Just look at .net core.

@hitaspdotnet

This comment has been minimized.

Copy link
Contributor Author

@hitaspdotnet hitaspdotnet commented Jul 31, 2018

@bbakermmc Right. I tried Blazor using GraphQL as server-side query language that was amazing and is made building UX/UI for our modular app very very very simple.

@hikalkan Sir, are you haven't plan to start GraphQL integration? #86
I can help in building modules schema. I'm only waiting for integration.

@hikalkan

This comment has been minimized.

Copy link
Contributor

@hikalkan hikalkan commented Jul 31, 2018

We are not starting GraphQL is the next weeks. But we will work on soon (probably in ~2 months).

@bbakermmc

This comment has been minimized.

Copy link
Contributor

@bbakermmc bbakermmc commented Jul 31, 2018

Personally I dont see the huge reason for GraphQL, especially if you go with ServerSide Rending in Blazor. How do you throttle GraphQL, does it check permissions to see if the user has access to the table? Why does someone need to query the data? Sure maybe it makes front-end developers jobs slightly easier but they should learn how to do it properly, this is just another abstraction like EF which could generate horrid sql once you get into complex scenarios.

@hitaspdotnet

This comment has been minimized.

Copy link
Contributor Author

@hitaspdotnet hitaspdotnet commented Jul 31, 2018

@bbakermmc GraphQL is not any specific framework or database query language but rather a specification that describes the capabilities and requirements of data models in client‐server applications.
You can use Application/Domain services + Repositories as GraphQL objects for building schemas. Each module can have own schema at own endpoint.
For example, when you need a list of your store categories and their products and reviews and balabalabala with REST API you need to create the request for each data you needed, but this can be done easily with one request in single line code!! This not useful for multi clients applications?
You can see GraphQL in action on Facebook Mobile UserProfile page. All data of a user (pages, friends, videos, books, places, ....) comes with a single query and a single parameter UserID.

does it check permissions to see if the user has access to the table?

you can add this by design or using available libraries like this

@bbakermmc

This comment has been minimized.

Copy link
Contributor

@bbakermmc bbakermmc commented Jul 31, 2018

For example, when you need a list of your store categories and their products and reviews and balabalabala with REST API you need to create the request for each data you needed, but this can be done easily with one request in single line code!! This not useful for multi clients applications?

And this is what I would say is bad, the exact reason applies to EF also. It may not always generate the best/optimized query plan for the data. Sure it makes your life easy because you just deal with models, but it doesn't mean it generates proper response. And why not just make an endpoint that returns what you need. Why do I need to send back "everything". A product could have 1000000 reviews, hmm sending that back is bad. Also wouldnt this in return issue multiple SQL calls? 1x per object per repo? So in the end it didnt really save performance, not really, the db still has to issue 6 queries.

Not saying GraphQL isnt fine, but it has its place, and I dont see it taking over, its just another abstraction that I personally dont want to deal with :p Like I said its basically and ORM for the front end like EF. So now we need two ORMs lol? Its just a way for client side folks to get data w/out having to go to the DB people just like EF/ORMS are the same thing for the server side.

@hikalkan

This comment has been minimized.

Copy link
Contributor

@hikalkan hikalkan commented Aug 1, 2018

I didn't work with GraphQL yet, but read a lot.

Also wouldnt this in return issue multiple SQL calls? 1x per object per repo? So in the end it didnt really save performance, not really, the db still has to issue 6 queries.

This is one point I hesitate about. It would not be good to open entire database (or a subset model) to clients if they query unnecessary data which may lead to non optimized queries in the server side.
But it's also valid for REST. Client may perform many unnecessary API calls.

Anyway, as I said, I didn't work in practical. From my current understanding, we will provide a GraphQL endpoint for each module with their own schema/model. We will also provide full REST-style API for each module.

@bbakermmc

This comment has been minimized.

Copy link
Contributor

@bbakermmc bbakermmc commented Aug 1, 2018

@hikalkan Right, from my understanding it seems it needs to be tied to an IQueryable since its going to be doing its own "magic". REST isn't "better" by any regards, but you cant expose an IQueryable :p, you at-least know what will be sent back and can make better predictions. So in the SPA template you making to versions now, one REST and one GraphQL :)?

@hikalkan

This comment has been minimized.

Copy link
Contributor

@hikalkan hikalkan commented Aug 1, 2018

So in the SPA template you making to versions now, one REST and one GraphQL :)?

It'e very early for me to decide/answer that. I even don't know how to create Blazor template for ABP yet.

@hitaspdotnet

This comment has been minimized.

Copy link
Contributor Author

@hitaspdotnet hitaspdotnet commented Aug 1, 2018

@bbakermmc

this is what I would say is bad, the exact reason applies to EF also.

When a new technology is introduced, it certainly has its own fans and critics. Given the idea behind the vNext framework, the VOLO has been able to meet the needs of the majority of users. Professional users like you and novice users like me. The GrapgQL for users, who want to run their software on the cloud, has an easy and practical solution. I'm using GraphQL in my ZERO app at Web.Host layer with own controllers for calling my application methods at "myDomain.domainType/graphql" endpoint. That was useful for building my mobile app and my public website in angular.

@bbakermmc

This comment has been minimized.

Copy link
Contributor

@bbakermmc bbakermmc commented Aug 1, 2018

@hitaspdotnet Right. It just comes down to implementation and maintenance. If you want to use GraphQL why would you implement all the AppServices and REST stuff :p. I'm looking at it from a maintainability/performance standpoint.

Once you offer multiple choices on things maintaing the code becomes a nightmare. I assume youre not running, React, Angualar, MVC, and Blazor right? But if the vNext supports them all you now have to make sure each one is implemented correctly and then if you now say we will support REST and GraphQL now you multiplied the number of updates :p

Then you have security, well if its included as a package in the project but not used, its still potentially a "security" risk, just look at the NPM package hacks and stuff.

Maybe @hikalkan comes up with some super amazing UI to generate permissions per object per field, makes dtos, linked, objects, endpoints, and GraphQL would work great with it, then sure by all means just use GraphQL for the templates.

We see it now with AspNetZero where there are patches after a major release to fix things not caught.

Everyone is excited for vNext and we want the fancy new features.

@hitaspdotnet

This comment has been minimized.

Copy link
Contributor Author

@hitaspdotnet hitaspdotnet commented Aug 2, 2018

@hikalkan
Bootstrap 4 Components for Blazor Framework: https://github.com/chanan/BlazorStrap
Maintainable CSS with Blazor Framework: https://github.com/chanan/Blazorous

@hikalkan

This comment has been minimized.

Copy link
Contributor

@hikalkan hikalkan commented Jun 2, 2019

Seems a good framework: https://github.com/oqtane/oqtane.framework
Adding link here for a reference.

Also, see these UI component libraries:

@bkv143

This comment has been minimized.

Copy link

@bkv143 bkv143 commented Sep 2, 2019

Do you have any date when Blazor UI template will be ready?

@hikalkan

This comment has been minimized.

Copy link
Contributor

@hikalkan hikalkan commented Sep 3, 2019

Do you have any date when Blazor UI template will be ready?

No date. This is an open source project :D

Our first goal to finalize the v1.0. Then we will prioritize other works.

@wocar

This comment has been minimized.

Copy link
Contributor

@wocar wocar commented Sep 9, 2019

Even without the template I’m sure we can make it work out of the box, at least on server side blazor

@hikalkan

This comment has been minimized.

Copy link
Contributor

@hikalkan hikalkan commented Sep 9, 2019

Sure, you can do it. It is appreciated if anyone creates an article / medium post about it :)

@vnetonline

This comment has been minimized.

Copy link
Contributor

@vnetonline vnetonline commented Sep 9, 2019

I am also very interested in creating a SPA using Blazor Server Side have been playing with Blazor in Preview 9 and it is really cool in a way it reminds me of the old ASP.NET 1.0 days.

I have made some progress just need to work out how to use OAuth and get a token from ABP I have tried using connect/token but it is not working for me

Any ideas which oAuth library I should use ?

@hikalkan

This comment has been minimized.

Copy link
Contributor

@hikalkan hikalkan commented Sep 10, 2019

@mehmet-erim which library you've used for the Angular UI?

@mehmet-erim

This comment has been minimized.

Copy link
Member

@mehmet-erim mehmet-erim commented Sep 18, 2019

We have used angular-oauth2-oidc

@bkv143

This comment has been minimized.

Copy link

@bkv143 bkv143 commented Sep 18, 2019

+1 for Blazor SPA template

@KevinFarrow

This comment has been minimized.

Copy link

@KevinFarrow KevinFarrow commented Sep 20, 2019

Some interesting sessions at the .Net Conf. next week (as well as the official release of Core 3.0)
https://www.dotnetconf.net/

Day 1: Building Full-stack C# Web Apps with Blazor in .NET Core 3.0 - 12:30 (PDT) | 19:30 (UTC)

Day 2: The Future of Blazor on the Client - 09:30 (PDT) \ 16:30 (UTC)
Day 2: Blazor and Azure Functions for Serverless Websites - 10:00 (PDT) \ 17:00 (UTC)
Day 2: An Introduction to GraphQL in .NET Core - 20:00 (PDT) | 03:00 (UTC)

Day 3: ASP.NET Razor: Into the Razor'verse - 09:30 (PDT) | 16:30 (UTC)

@cld0815

This comment has been minimized.

Copy link

@cld0815 cld0815 commented Sep 25, 2019

+1 for Blazor SPA template

@xandervdm

This comment has been minimized.

Copy link

@xandervdm xandervdm commented Sep 28, 2019

+1 for Blazor SPA template. Don't initially need any additional theming or 3rd party templates as the main 3rd party component vendors like SyncFusion, DevExpress, Telerik, etc are building great Blazor component libraries. The main thing to get is a sample Blazor app with integrated security into ABP to use as a starting point.

@halybang

This comment has been minimized.

Copy link

@halybang halybang commented Sep 30, 2019

+1 for Blazor SPA template

@hikalkan

This comment has been minimized.

Copy link
Contributor

@hikalkan hikalkan commented Oct 6, 2019

Thank you all. We see that there is a great demand for the Blazor startup template.
👍

@panzhu

This comment has been minimized.

Copy link

@panzhu panzhu commented Oct 16, 2019

+1 for Blazor SPA template

3 similar comments
@KidoPlay

This comment has been minimized.

Copy link
Contributor

@KidoPlay KidoPlay commented Oct 28, 2019

+1 for Blazor SPA template

@realZhangChi

This comment has been minimized.

Copy link

@realZhangChi realZhangChi commented Oct 30, 2019

+1 for Blazor SPA template

@qqzhw

This comment has been minimized.

Copy link

@qqzhw qqzhw commented Nov 5, 2019

+1 for Blazor SPA template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.