Git Product home page Git Product logo

ykankaya / jjmasterdata Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jjconsulting/jjmasterdata

0.0 1.0 0.0 5.41 MB

JJMasterData is an open-source .NET library to help you create CRUDs at runtime quickly from data dictionaries (metadata).

Home Page: https://portal.jjconsulting.tech/jjdoc

License: GNU General Public License v3.0

JavaScript 3.43% Python 2.76% C# 68.98% TypeScript 3.11% CSS 4.51% HTML 11.21% SCSS 6.02%

jjmasterdata's Introduction



JJMasterData

.NET 6 TS TS TS NuGet Discord

JJMasterData is an open-source .NET library to help you create CRUDs quickly from data dictionaries (database metadata), along with other boilerplate-intensive things like exporting and importing data.

Features

  • Complete CRUD operations ✅
  • Pages generated at runtime ✅
  • Data export & import ✅
  • Hangfire support ✅
  • Database script generation ✅
  • IronPython support ✅
  • Bootstrap 3,4 & 5 support ✅
  • Log interface ✅
  • Test library ✅

Demo

Demo

Useful Links

Quick Start

This tutorial assumes you will use .NET 6+, for .NET Framework 4.8 support, check our documentation.

1. Install JJMasterData.Web from NuGet

JJMasterData Nuget

Installing JJMasterData.Web, will install all required dependencies.

2. Add a SQL Server ConnectionString to your configuration file

In your configuration file (normally appsettings.json), add a SQL Server connection string. Support for more DBMSs is planned.

3. Modify Program.cs

Add the following lines to your Program.cs

//This line will add JJMasterData required services.
builder.Services.AddJJMasterDataWeb();

//Add this line before specifing your default route. It will use the required services and add the RCL routes.
app.UseJJMasterDataWeb();

Add the following lines to your _Layout.cshtml

<partial name="_MasterDataStylesheets"/>
<partial name="_MasterDataScripts"/>
<partial name="_MasterDataTheme"/>

IMPORTANT: If you have Bootstrap and jQuery installed, remove it from your _Layout.cshtml both CSS and JS, JJMasterData already have Bootstrap and jQuery installed. You can choose Bootstrap 3, 4 and 5 using JJMasterDataSettings. If you really want to use your own Bootstrap or jQuery files or CDNs, check _MasterDataStylesheets and _MasterDataScripts source code and specify all dependencies except Bootstrap.

4. Create your first Data Dictionary

In your preferred database-tool like Azure Data Studio or SSMS, create the following example table:

-- Create a new table called '[Person]' in schema '[dbo]'
-- Drop the table if it already exists
IF OBJECT_ID('[dbo].[Person]', 'U') IS NOT NULL
DROP TABLE [dbo].[Person]
    GO
-- Create the table in the specified schema
CREATE TABLE [dbo].[Person]
(
    [Id] INT NOT NULL PRIMARY KEY IDENTITY,
    [FirstName] NVARCHAR(50) NOT NULL,
    [Age] INT NOT NULL
    -- Specify more columns here
    );
GO

Next, run your website and open in your browser the route /en-us/DataDictionary, you will be presented with the following screen:

DataDictionary Not Found

After clicking on "Next", click on "Add"

DataDictionaries Home

Enter the table name (Person), checking the option "Import Fields", after that, you will have a representation of your metadata.

Person Data Dictionary

Click on "Get Scripts" and then "Run Stored Procedures"

Person Scripts.png

After running the Stored Procedures Scripts, click on Preview, and you will have your CRUD with nearly zero code 🪄

Person CRUD

Ok, really cool! But how to use these CRUDs on my application?

JJFormView is the class responsible to render all JJMasterData CRUDs. It have many features out of the box like filters, data exportation and a huge customization potential using .NET code, you can even inject Python code in your application at runtime. You have 2 options to instantiate a JJFormView:

  1. Using the /DataDictionary/Render/{dictionaryName} route
  2. Creating a View or Page instantiating a JJFormView

For customization you have a lot of scenarios too:

  1. Using the DataDictionary Web interface, we have lots of options, we don't have everything documented yet, but you can help submitting a PR
  2. Using the IFormEvent interface (recommended), check the docs for more information
  3. Customizing your own JJFormView object at your pages (the old school way of the JJ Consulting team in the WebForms era, not recommended)

Who is using JJMasterData ?

JJMasterData is production-ready and is already being used by JJConsulting customers.

Special Thanks

Code contributors

Bugs and feature requests

Have a bug or a feature request? Please first search for existing and closed issues.
If your problem or idea is not addressed yet, please open a new issue.

jjmasterdata's People

Contributors

gumbarros avatar

Watchers

 avatar

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.