All Projects → NetCoreStack → Hisar

NetCoreStack / Hisar

Licence: MIT License
🏰 Hisar: Cross-Platform Modular Component Development Infrastructure

Programming Languages

C#
18002 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to Hisar

SimpleSocial
A simple social network web application using ASP.NET Core 3.1
Stars: ✭ 16 (-15.79%)
Mutual labels:  aspnetcore, dotnetcore
MiCake
🍰一款基于.Net Core平台的“超轻柔“领域驱动设计(DDD)组件
Stars: ✭ 112 (+489.47%)
Mutual labels:  aspnetcore, dotnetcore
Awesome-Nuget-Packages
📦 A collection of awesome and top .NET packages sorted by most popular needs.
Stars: ✭ 87 (+357.89%)
Mutual labels:  aspnetcore, dotnetcore
PugetSound
PugetSound allows you and your group to enjoy music together using Spotify.
Stars: ✭ 52 (+173.68%)
Mutual labels:  aspnetcore, dotnetcore
aspnet-core-3-role-based-authorization-api
ASP.NET Core 3.1 - Role Based Authorization API
Stars: ✭ 110 (+478.95%)
Mutual labels:  aspnetcore, dotnetcore
dotnetcore-image
Solution of .NET Core GDI+(Image) on Linux/Docker
Stars: ✭ 22 (+15.79%)
Mutual labels:  aspnetcore, dotnetcore
ZooKeeper-Admin
ZooKeeper 管理工具
Stars: ✭ 45 (+136.84%)
Mutual labels:  aspnetcore, dotnetcore
Identity.dapper
Identity package that uses Dapper instead EntityFramework for use with .NET Core
Stars: ✭ 234 (+1131.58%)
Mutual labels:  aspnetcore, dotnetcore
docker-workshop-with-react-aspnetcore-redis-rabbitmq-mssql
An Asp.Net Core Docker workshop project that includes react ui, redis, mssql, rabbitmq and azure pipelines
Stars: ✭ 53 (+178.95%)
Mutual labels:  aspnetcore, dotnetcore
aspnet-core-3-basic-authentication-api
ASP.NET Core 3.1 - Basic HTTP Authentication API
Stars: ✭ 70 (+268.42%)
Mutual labels:  aspnetcore, dotnetcore
MvcControlsToolkit.Core
Core Code for MvcControlsToolkit packages
Stars: ✭ 13 (-31.58%)
Mutual labels:  aspnetcore, dotnetcore
Home
Asp.net core Mvc Controls Toolkit
Stars: ✭ 33 (+73.68%)
Mutual labels:  aspnetcore, dotnetcore
DNZ.SEOChecker
SEO Checker and Recommander Plugin (like wordpress Yoast) for ASP.NET Core.
Stars: ✭ 18 (-5.26%)
Mutual labels:  aspnetcore, dotnetcore
ChatService
ChatService (SignalR).
Stars: ✭ 26 (+36.84%)
Mutual labels:  aspnetcore, dotnetcore
GatewayService
GatewayService (Ocelot).
Stars: ✭ 19 (+0%)
Mutual labels:  aspnetcore, dotnetcore
BlazorAuthenticationSample
A sample showing some of the ASP.NET Core Blazor authentication features (also some testing...) 🚀
Stars: ✭ 78 (+310.53%)
Mutual labels:  aspnetcore, dotnetcore
Architecture
.NET 6, ASP.NET Core 6, Entity Framework Core 6, C# 10, Angular 13, Clean Code, SOLID, DDD.
Stars: ✭ 2,285 (+11926.32%)
Mutual labels:  aspnetcore, dotnetcore
Aspnet Core 3 Registration Login Api
ASP.NET Core 3.1 API for User Management, Authentication and Registration
Stars: ✭ 173 (+810.53%)
Mutual labels:  aspnetcore, dotnetcore
Huxley2
A cross-platform JSON proxy for the GB railway Live Departure Boards SOAP API
Stars: ✭ 22 (+15.79%)
Mutual labels:  aspnetcore, dotnetcore
AspNetCoreAzureSearch
ASP.NET Core with Azure Cognitive Search
Stars: ✭ 12 (-36.84%)
Mutual labels:  aspnetcore, dotnetcore

Hisar

Cross-Platform Modular Component Development Infrastructure

NuGet NuGet

Latest release on Nuget

Why Hisar?

The purpose of this framework is that eliminate the monolithic application challenges and allow us to develop component (module) without main application dependency. Thus the component can be run and test as a standalone web application. When you complete development requirements and ready to deploy the component then just pack it or copy the output to the related directory of the main application.

MsBuild , NuGet or dotnet pack tools can be used for packaging. In this way, the component will be able to part of the main hosting application and available to upload NuGet or MyGet package repositories.

Despite the other framework you don't need to reference any component (module) to main application but if you want the component to act as part of the main application you can copy the output .dll to ExternalComponents folder of main application so the Hisar platform engine resolves all dependencies, controllers, views, contents and then registers the component with convention name.

Controllers

For example; you got a component which is name Hisar.Component.Carousel. For convention, Hisar engine resolves that namespace as a Carousel component when to act as a part of the main application. For this component, the component Controllers will work as an Area with http://<domainname>/carousel URL prefix in main application (Landing Hosting or Admin Hosting apps).

ViewComponents

View components are similar to partial views, but they are much more powerful. Hisar ViewComponents work as follows;

@section styles {
    <link rel="stylesheet" href="@Url.ComponentContent("~/css/carousel.css")" />
}

<h2>Carousel</h2>
@await Component.InvokeAsync(ViewContext.ResolveName("Carousel"))
ViewContext.ResolveName("Carousel")

extension method creates convention name for the executing view component according to running component state. In this way, the Component (module, which has CarouselViewComponent) works on its own and resolve the convenient name for any state. (Standalone app or part of the main application)

Component Contents

<img src="@Url.ComponentContent("~/img/banner1.svg")" alt="ASP.NET Core" class="img-responsive" />
Url.ComponentContent("~/img/banner1.svg")

this extension method makes the content accessible for the specified path for any state.

Startup.cs

Startup.cs is the bootstrap - starter class for the ASP.NET Core web application. We tried to preserve as much as possible in the same way this file except

public static void ConfigureRoutes(IRouteBuilder routes)

for the method mentioned above and

.UseStartup<DefaultHisarStartup<Startup>>()

our custom startup wrapper to handle component and application acts. For more details, you can check the test projects source code in this repository.

Component Development

To develop the component you can fallow these steps;

  • Download the .NET Core SDK 2.2.0 or newer. Once installed, run this command:

     dotnet tool install --global dotnet-hisar --version 2.2.0
    
  • Create a web application with Hisar.Component prefix. (Hisar.Component.YourComponentName)

  • Add NetCoreStack.Hisar package to the project.

     dotnet add package NetCoreStack.Hisar
    
  • Update the line UseStartup<Startup> to UseStartup<DefaultHisarStartup<Startup>> for WebHostBuilder.

  • Add PreBuild event to generate component helper classes with Hisar global tool.

    <Target Name="PreBuild" BeforeTargets="PreBuildEvent">
        <Exec Command="cd $(ProjectDir) &amp; dotnet hisar --build &quot;$(ProjectDir)&quot;" />
    </Target>
  • Add Hisar Web Cli Services (Tooling)

    public void ConfigureServices(IServiceCollection services)
    {
        #if !RELEASE
        /// <param name="webCliAddress">Default is localhost:1444 (WebCli Tools)</param> 
        /// <param name="enableLiveReload">To enable livereload proxy</param>
        services.AddWebCliSocket<Startup>();
        #endif
        
        // ...
    }
    
    public void Configure(IApplicationBuilder app, ...)
    {
        #if !RELEASE
        app.UseCliProxy();
        #endif
        
        // ...
    }
    
  • Add all the required contents as embedded resources.

    <ItemGroup>
        <EmbeddedResource Include="Views\**\*.cshtml" />
        <EmbeddedResource Include="wwwroot\**\*.*" />
        <None Update="wwwroot\**\*">
            <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
        </None>
    </ItemGroup>
  • If you have any templating directory for static serve files or hosting main web application, start the Web Cli tool on project root directory from command line. It will start the Web Cli application on http://localhost:1444 to manage all main application contents or provide _Layout.cshtml if no appdir option specified. (One working Web Cli tool is enough for same templating usage)

     dotnet hisar --appdir <the-path-of-your-hosting-app-relative-or-absolute> 
    

Database

MongoDb Database

docker volume create --name=mongodata

docker run -it -v mongodata:/data/db -p 27017:27017 -d mongo

Tools

Hisar Web Cli tool provides manage extensibility and templating of components. Dotnet global tools extensibility model has various tooling features. Hisar Web Cli is built on top of it.

Components.json (sample nuget package reference)

{
    "components": {
        "Hisar.Component.CoreManagement": {
            "targetFramework": "netcoreapp2.2",
            "version": "2.2.0"
        }
    }
}

TODO

  • Hisar Package Repository
  • Component Marketplace (Upload, search, download and enable)

Contributing to Repository

  • Fork and clone locally.
  • Build the solution with Visual Studio 2017.
  • Create a topic specific branch in git.
  • Send a Pull Request.

Prerequisites

ASP.NET Core

License

The MIT licence

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].