GithubHelp home page GithubHelp logo

bitfoundation / bitplatform Goto Github PK

View Code? Open in Web Editor NEW
1.0K 1.0K 212.0 59.21 MB

Build all of your apps using what you already know and love ❤️

Home Page: https://bitplatform.dev

License: MIT License

TypeScript 1.60% C# 58.32% JavaScript 0.28% HTML 27.90% PowerShell 0.04% Batchfile 0.13% SCSS 10.92% CSS 0.37% Smalltalk 0.34% Shell 0.09%
aspnetcore bitplatform blazor csharp css efcore hacktoberfest html maui odata wasm webapi

bitplatform's Introduction

Header


License Code size CI Status NuGet version Nuget downloads


🧾 Introduction

At bitplatform, we've curated a comprehensive toolkit to empower you in crafting the finest projects using Blazor. Diverging from others merely offering UI Toolkits, bit BlazorUI components distinguishes itself with over 56 components, with a compact size of under 400 KB. These components boast both Dark and Light Themes, delivering unparalleled High Performance 🚀

Yet, bitplatform doesn't stop there. Our platform introduces exclusive tools that elevate your development experience:

Bswup: This unique tool harnesses the power of Progressive Web Apps (PWA) within the innovative new structure of dotnet 8. By amalgamating pre-rendering techniques reminiscent of renowned platforms like GitHub, Reddit, and Facebook, Bswup ensures an exceptional user experience 😍

Butil: Embracing Blazor because of your love for C#? Butil enables you to stay true to that sentiment by providing essential Browser APIs in C#, eliminating the need to revert to JavaScript for any functionality 👌

Besql: Dreaming of an offline web application capable of saving data and syncing later? Enter Besql, your solution to incorporating ef core & sqlite in your browser. It's a crucial aid for achieving this objective seamlessly 🕺

Bit Boilerplate Project Template: If the aforementioned features have piqued your interest, dive into the Bit Boilerplate project template. Experience everything mentioned above along with additional features such as ASP.NET Core Identity integration, multilingualism, and other cool features that empowers you to develop unified Web, Android, iOS, Windows, and macOS apps from a single codebase, while providing seamless integration with native platform features and third-party Java, Kotlin, Swift, Objective-C, and JavaScript libraries 💯

For more details, visit us at bitplatform.dev.


Note: This project is tested with BrowserStack.


🎁 OSS Showcases

The following apps are our open-source projects powered by the bit platform showcasing the different capabilities of our toolchain:

   Web       iOS    Android Windows macOS
bit BlazorUI Prerendered PWA iOS app Android app Windows app macOS app
Todo Prerendered PWA iOS app Android app Windows app macOS app
AdminPanel Prerendered PWA iOS app Android app Windows app macOS app
bitplatform SPA
  1. bitplatform.dev: Pre-rendered SPA with Blazor WebAssembly
  2. blazorui.bitplatform.dev: Pre-rendered PWA with Blazor Auto
  3. todo.bitplatform.dev: Pre-rendered PWA with Blazor WebAssembly
  4. static-todo.bitplatform.dev: PWA with Blazor WebAssembly Standalone (Hosted on Cloudflare Pages)
  5. adminpanel.bitplatform.dev: PWA with Blazor WebAssembly

Todo & Adminpanel web apps will launch their respective Android and iOS applications if you have already installed them, mirroring the behavior of apps like YouTube and Instagram.

Prerendering combined with PWA functionality delivers an experience akin to that of GitHub and Reddit. The bitplatform solution, seamlessly integrated with the innovative new .NET 8 project structure, stands as the exclusive remedy for such a scenario within the realm of Blazor.

How to contribute?

We welcome contributions! Many people all over the world have helped make this project better.


Contributions

Alt

bitplatform's People

Contributors

0xsamman avatar 1saeedsalehi avatar behzad888 avatar bitsali avatar cyrus-sushiant avatar darius-khll avatar farshaddavoudi avatar fatemehnoroozi avatar hamedhajiloo avatar hamedmoghadasi avatar khashayar-pakkhesal avatar lone-mirza avatar maryamhdr avatar md23mh avatar meysambahadori avatar mhrastegari avatar milad-karimifard avatar mirza-developer avatar mohabbati avatar msangtarash avatar msynk avatar rezakargar avatar rypedram avatar saeedhalab avatar sajadkardel avatar somayeebrahimi avatar taha-ghadirian avatar ysmoradi avatar zahra-yousefi avatar zoha-shobbar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitplatform's Issues

Ability to have multiple Foundation VSPackage extensions side by side

To support this we've to rename FoundationVSPackageConfiguratio.json to something like FoundationVSPackageConfigurationV1,json. In this naming convention V1 can be V2 etc to show major version of FoundationVSPackage VSIX. Each major Version should have its own git repository branch, Its unique name in visual studio marketplace (For example FoundationVSPacakgeV1.vsix), so It would be possible to have major versions side by side on both github and visual studio marketplace. Developers are allowed to install multiple versions at the same time, and when developers open their visual studio solutions, each installed version of vsix can make a decision about it self. For example FoundationVSPackageV2.vsix will continue to work if FoundationVSPackageConfigurationV2.json is presented near .sln file of solution. It is possible to have multiple .json files for one solution, each of them for some projects of that solution.

Sync Service - Sync History integration

Consider following Dto:

ProductDto { Id , LocationId , Name }

And following Query:

productsRepository.GetAll().Where(p => p.LocationId == currentUserLocationId)

So, sync will get all products located in user's location.
Then we update product's location, and because the query will not return that product to client for that user, sync service won't get its data again. Because sync service at client side gets no change, it will show that product under its old location.

It would be a good idea to have a change history table with sync service integration, so sync service can understand these types of changes.

Non key property ("Id") in Dto problem

I've got a Dto that has a property named "Id" but it's not a Key and I'm gonna update it's value later using jaydata, but unfortunately it's way seems make some un handled problems

negative value problem in decimal object

Into IndexedDb when we save minus value like "-1000"; saved value is "0000000000000000000000000-1000". So, the problem is here when decimal use regex /^0+(?=\d)/ to clear extra zeros; result is some thing like this : "0-1000"
Try /^0+(?!\.)/ instead of /^0+(?=\d)/.

Make DtoSetController's default get IQueryable<TDto> method async

Its base implementation is not Async, but this allows to provide Async implementation, by inheriting DtoSetController and overriding Get method in derived classes.
When repository provides Task<IQueryable> GetAll() method, DtoSetController's Get will call the Async version.

ComplexType is Identified as Entity in $metadata

I have an action in my DtoController that returns a DTO (SalesBNDetailsDto).

 public virtual SalesBnDetailsDto GetSalesBnDetailsByFullBno(ODataActionParameters parameters)
 {
            string fullBno = (string)parameters["fullBno"];
            int bimegozarId = (int)parameters["bimegozarId"];
            SalesBnDetailsDto salesBnDetails = _salesBnDetailsProvider.GetInfo(fullBno, bimegozarId);

            return salesBnDetails;
 } 

This Dto contains a property named KhodroDto which is a complex type.
When I see $metadata I can observe that KhodroDto is identified as an entity not as a complex type which in turn causes the action to return nothing for KhodroDto, but other properties of SalesBNDetailsDto are filled appropriately.
When I add edmModelBuilder.ComplexType(); in my customized EITEdmModelProvider.BuildEdmModel the problem is gone and every thing works as expected.

 public override void BuildEdmModel(ODataModelBuilder edmModelBuilder)
 {
            edmModelBuilder.ComplexType<KhodroDto>();
            _autoEdmBuilder.AutoBuildEdmFromAssembly(typeof(CarEdmModelProvider).Assembly, edmModelBuilder);
            base.BuildEdmModel(edmModelBuilder);
 }

class diagram of car-spa tools

a best way to reuse sync code in async method

in bit-framework we've something like this following code
public interface ISomeContract { Task<int> SomeMethodAsync(CancellationToken cancellationToken); int SomeMethod(); }
and suppose this implementation of it's contract
public class SomeImplementation : ISomeContract { public int SomeMethod() { // lots of codes ... return 10; } public async Task<int> SomeMethodAsync(CancellationToken cancellationToken) { return SomeMethod(); // another example: I can remove async modifier from SomeMethodAsync method and this following //try //{ // return Task.FromResult<int>(SomeMethod()); //} //catch (Exception ex) //{ // return Task.FromException<int>(ex); //} } }
we have some options to reuse sync method in async implementation
1)
public Task<int> SomeMethodAsync(CancellationToken cancellationToken) { return Task.Run(() => SomeMethod(), cancellationToken); }
2)
public async Task<int> SomeMethodAsync(CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); return SomeMethod(); }
3)
public Task<int> SomeMethodAsync(CancellationToken cancellationToken) { if (cancellationToken.IsCancellationRequested) { return Task.FromCanceled<int>(cancellationToken); } try { return Task.FromResult(SomeMethod()); } catch (OperationCanceledException oce) { var canceledTaskBuilder = new TaskCompletionSource<int>(); canceledTaskBuilder.SetCanceled(); return canceledTaskBuilder.Task; } catch (Exception e) { return Task.FromException<int>(e); } }
more detail in this following:
how to reuse sync code

Enhanced OData Queryable attribute

1- Kendo Data Source using JayData OData Provider won't ask $count when there is no page size is specified and at client side, $count will be equal to length of returned data from server.

2- Even asking $count will not execute any kind of query to calculate count, if there is no page size is specified by either $top or DefaultPageSize and $count will be the .Length of returned results of original query. (Query will be executed once).

3- By setting DefaultPageSize to null, requests with no $top specified will retrieve all data. (Query will be executed once)

4- Default ASP.NET Web API OData implementation has a key difference, it has a default page size as a required property, and will apply that in all cases. We're going to remove usages of that implementation from our project.

Can't return Task<List<Guid>> in controller

consider the following code

        [Function]
        [Parameter("categoryId", typeof(Guid))]
        public virtual async Task<Guid[]> GetlocationIdsByCategoryId([FromODataUri]Guid categoryId, CancellationToken cancellationToken)
        {
            return await _categoryInLocationsRepository.GetAll().Where(c => c.ProductCategoryId == categoryId).Select(c => c.LocationId).ToArrayAsync(cancellationToken);
        }

above code makes these error
Build:Type 'string' does not satisfy the constraint 'Entity'.

Database schema change between app versions management

We need a mechanism to provide old database instance and new database instance to developer, so developer can migrate its data from old db to new db.

Important notes:

1- Database migration approaches like what Entity Framework Migration provides is not come in handy, because of limitations in SQL lite such as lack of "rename column" etc. This approach is not available in indexedDb too.

2- Developer needs to migrate tables/collections with two way sync. Only those records with ISV = false

add best practice for select Primary key by developers

hi

please limit selection primary key types by developers in bit-framework. for example add IEntityWithDefaultIntKey like IEntityWithDefaultGuidKey and remove IEntityWithDefaultKey generic interface. the best practice for primary key types are Int or Guid. other types should not be selected by developers.

best regards.

Problem with $batch returns null

When a server returns null for one of child request of client (No content), we get an unexpected error at client side.
This happens on $batch requests only.

The Diffrence Between jaysvcUtil and Bit Html Client Proxy Generator

  1. Bit Code Generator does not generate some properties which are Required.

  2. No support for concurrency mode in Bit
    JaySvcUtilSample:
    Version: {
    "concurrencyMode": $data.ConcurrencyMode.Fixed
    }

  3. Enum properties have two types of fields: Index & Value (JaySvcUtil)
    Bit Sample:
    { name : 'Man' , value : "Foundation.Test.Model.Dto.TestGender'Man'" },
    JaySvcUtil Sample:
    { "name": "Man", "index": 0, "value": 3 },

  4. Bit Code Generator does not generate "Reflect define Metadata"
    JaySvcUtil Sample:
    Reflect.defineMetadata("O1", ["Version"], types["Entity"].prototype)

  5. Bit Code Generator, Generate Action & Function In Camel Case Format

complex without dto issue

I have a method that returns a complex type which has never used in any dtos.
we have to consider to these type of complex types in foundation vs package.

file not found

In the foundation project there are some reference like

/// <reference path="../../foundation.core.htmlclient/foundation.core.d.ts" />
/// <reference path="../../foundation.core.htmlclient/foundation.core.d.ts" />
/// <reference path="../../foundation.viewModel.htmlclient/foundation.model.context.d.ts" />

to some files, but those file does not exist.

and also the foundation.core project does not exist too.

/// <reference path="../foundation.core/typings.d.ts" />

Console.set_Title error on running sample on IIS

I was trying to run the bitChangeSetManager on IIS (Windows 10.14393) and I got this error:

IOException: The handle is invalid.
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +1093
   System.Console.set_Title(String value) +112  ....  AppStartup.cs:34

There was no problem on iis express.

OData operation configuration's optional parameter is not working properly

       [Function]
       [Parameter("firstNumber", typeof(int))]
       [Parameter("secondNumber", typeof(int), isOptional: true)]
       public virtual async Task<int> Sum(CancellationToken cancellationToken, [FromODataUri]int firstNumber, [FromODataUri]int secondNumber = 10)
       {
           return firstNumber + secondNumber;
       }

As I tested, generated JavaScript & TypeScript codes of html client are ok, but when I take a look at generated $metadata of DefaultAutoEdmBuilder, I see no IsOptional on that and I see bad request exception when I pass firstNumber, but I get the result when I pass both parameters

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.