Dylan  Iqbal

Dylan Iqbal

1631777859

Using GoGJ to Build a Interactive Diagrams

In depth introduction to building diagrams with GoJS

GoJS is a JavaScript library for building interactive diagrams. This tutorial covers the essentails of using GoJS by building an org chart diagram from scratch.

Kinds of Diagrams

A diagram is any visual representation of a structure, or a process, or simply data with relationships. They are used to convey the meaning in an intuitive way. Diagrams and graphs are diverse: there are strongly-linked graphs like flowcharts, family trees, genograms, organizational charts, decision trees, and so on. Diagrams may also be visual representations of real-world objects such as shelves (planograms) or shop floors, or room layouts. They can also display kanbans and work-item graphs, graphs atop maps, or more abstract data representations such as plots for statistical visualizations.

Table of Contents

  • Kinds of Diagrams
  • Creating a Diagram
  • Diagrams and Models
  • Styling Nodes
  • Kinds of Models
  • Diagram Layouts: Who's the boss?
  • Link Templates

Diagrams are commonly graph-like in nature, containing Nodes and Links, organized manually or by Layouts and Groups (which may also act as sub-graphs). These concepts are all classes in GoJS, and come with a host of convenience methods for traversing and organizing your diagram structures, allowing users to manipulate those structures, and enforcing interactivity rules.

GoJS makes it easy to form representations from model data, and allows users to interact with them. GoJS adds keyboard, mouse, and touch support, the ability to create, link and edit data, move and rotate objects, copy and paste, save and load, undo and redo, and whatever else your users may need. GoJS allows you to create any kind of diagram, from flowcharts to floorplans.

Some diagrams built with GoJS, taken from the GoJS Samples

Creating a Diagram

You can download the latest version of GoJS here.

If you use Node.js you could download the latest GoJS with npm, npm install gojs, and reference GoJS in the package:

<script src="node_modules/gojs/release/go-debug.js"></script>

For getting-started convenience you could link straight to the GoJS provided by CDNJS, but this is likely to be out of date and I recommend always using the latest version of GoJS:

<script src="https://cdnjs.cloudflare.com/ajax/libs/gojs/1.6.7/go-debug.js"></script>

GoJS diagrams are contained in an HTML <div> element in your page that you give an explicit size:

<!-- The DIV for a Diagram needs an explicit size or else we will not see anything.
     In this case we also add a background color so we can see the area. -->
<div id="myDiagramDiv" style="width:400px; height:150px; background-color: #DAE4E4;"></div>

Pass the <div>'s id to GoJS to make a Diagram:

    var $ = go.GraphObject.make; // We use $ for conciseness, but you can use anything, $, GO, MAKE, etc
    var myDiagram = $(go.Diagram, "myDiagramDiv");

This produces an empty diagram, so not much to look at yet:

See the Pen pymgLO by Simon Sarris (@simonsarris) on CodePen.

This article shows by example how to use go.GraphObject.make to build GoJS objects. For more detail, see Building Objects in GoJS. Using $ as an abbreviation for go.GraphObject.make is handy and we will assume its use from now on. If you use $ for something else in your code, you can always pick a different short variable name, such as $$ or MAKE or GO.

GoJS uses go as the "namespace" in which all GoJS types reside. All code uses of GoJS classes such as Diagram or Node or Panel or Shape or TextBlock will be prefixed with go..

Diagrams and Models

Diagram parts such as Nodes and Links are visualizations of data that is managed by a Model. In GoJS, Models hold the data (arrays of JavaScript objects) that describe Parts, and Diagrams act as views to visualize this data using actual Node and Link objects. Models, not Diagrams, are what you save and load.

Here's an example of a Model and Diagram, followed by the diagram it creates:

var $ = go.GraphObject.make;
var myDiagram =
  $(go.Diagram, "myDiagramDiv",
    {
      initialContentAlignment: go.Spot.Center, // center Diagram contents
      "undoManager.isEnabled": true // enable Ctrl-Z to undo and Ctrl-Y to redo
    });

var myModel = $(go.Model);
// in model data, each node is represented by a JavaScript object:
myModel.nodeDataArray = [
  { key: "Alpha" },
  { key: "Beta" },
  { key: "Gamma" }
];
myDiagram.model = myModel;

See the Pen zqQvvd by Simon Sarris (@simonsarris) on CodePen.

The diagram displays the three nodes that are in the model. Since there was no location information given, GoJS automatically assigns them locations in a grid-like fashion using the default layout. Some interaction is already possible:

  • Click and drag the background to pan the view.
  • Click a node to select it. Click and drag a node to move it around.
  • Click and hold on the background, then start dragging, and a selection box will appear.
  • Use CTRL-C and CTRL-V, or control-drag-and-drop, to make a copy of the selection.
  • Press the Delete key to delete selected nodes.
  • Since the undo manager was enabled, CTRL-Z and CTRL-Y will undo and redo moves and copies and deletions.
  • Read about more Keyboard Commands.

Styling Nodes

Nodes are styled by creating templates consisting of GraphObjects. To create a Node, we have several building block classes at our disposal:

  • Shape, to display a geometry (pre-defined or custom) with colors
  • TextBlock, to display (potentially editable) text
  • Picture, to display images
  • Panel, containers to hold a collection of other objects that can be positioned and sized in different manners according to the type of the Panel (like tables, vertical stacks, and automatically stretching containers)

All of these building blocks are derived from the GraphObject class, so we casually refer to them as GraphObjects or objects or elements.

We want model data properties to affect our Nodes, and this is done by way of data bindings. Data bindings allow us to change the appearance and behavior of GraphObjects in Nodes by automatically setting properties on those GraphObjects to values that are taken from the model data.

The default Node template is simple: A Node which contains one TextBlock. There is a data binding between a TextBlock's text property and the model data's key. In code, the template looks like this:

myDiagram.nodeTemplate =
  $(go.Node,
    $(go.TextBlock,
      // TextBlock.text is bound to Node.data.key
      new go.Binding("text", "key"))
  );

The result is a node that will display the key in the model data object, as we saw with the diagram above.

Nesting can be arbitrarily deep, and every class has its own unique set of properties to explore. More generally, the skeleton of a Node template will look something like this:

myDiagram.nodeTemplate =
  $(go.Node, "Vertical" // second argument of a Node/Panel can be a Panel type
    { /* set Node properties here */ },
    // example Node binding sets Node.location to the value of Node.data.loc
    new go.Binding("location", "loc"),

    // GraphObjects contained within the Node
    // this Shape will be vertically above the TextBlock
    $(go.Shape,
      "RoundedRectangle", // string argument can name a predefined figure
      { /* set Shape properties here */ },
      // example Shape binding sets Shape.figure to the value of Node.data.fig
      new go.Binding("figure", "fig")),

    $(go.TextBlock,
      "default text",  // string argument can be initial text string
      { /* set TextBlock properties here */ },
      // example TextBlock binding sets TextBlock.text to the value of Node.data.key
      new go.Binding("text", "key"))
  );

Now let's make a simple template commonly seen in organizational diagrams — an image next to a name. Consider the following Node template:

  • A Node of "Horizontal" Panel type, meaning that its elements will be laid out horizontally side-by-side. It has two elements:
    • A Picture for the portrait, with the image source data bound
    • A TextBlock for the name, with the text data bound
var $ = go.GraphObject.make;
var myDiagram =
  $(go.Diagram, "myDiagramDiv",
    {
      initialContentAlignment: go.Spot.Center, // center Diagram contents
      "undoManager.isEnabled": true // enable Ctrl-Z to undo and Ctrl-Y to redo
    });

// define a Node template
myDiagram.nodeTemplate =
  $(go.Node, "Horizontal",
    // the entire node will have an orange background
    { background: "#DD4814" },
    $(go.Picture,
      // Pictures are best off having an explicit width and height.
      // Adding a red background ensures something is visible when there is no source set
      { margin: 10, width: 50, height: 50, background: "red" },
      // Picture.source is data bound to the "source" attribute of the model data
      new go.Binding("source")),
    $(go.TextBlock,
      "Default Text",  // the initial value for TextBlock.text
      // some room around the text, a larger font, and a white stroke:
      { margin: 12, stroke: "white", font: "bold 16px sans-serif" },
      // TextBlock.text is data bound to the "name" attribute of the model data
      new go.Binding("text", "name"))
  );

var model = $(go.Model);
// each node data object holds whatever properties it needs,
// for this app we add the "name" and "source" properties
model.nodeDataArray =
[
  { name: "Don Meow", source: "cat1.png" },
  { name: "Toulouse", source: "cat2.png" },
  { name: "Roquefort",  source: "cat3.png" },
  { } // we left this last node data empty!
];
myDiagram.model = model;

This produces the diagram:

See the Pen jqobMq by Simon Sarris (@simonsarris) on CodePen.

A good Node template will help users visually parse data, even when some of that data is missing. We may want to show some "default" state when not all information is present, for instance when an image does not load or when a name is not known. The "empty" node data in this example is used to show that well-designed node templates can work perfectly well without any of the properties on the bound data.

Kinds of Models

Perhaps we want to show more than just nodes. By adding some Links to show the relationship between individual nodes and a Layout to automatically position the nodes, we can show that Don Meow is really the leader of a cat cartel.

In order to get links into our diagram, the basic Model is not going to cut it. We are going to have to pick one of the other two models in GoJS, both of which support Links. These are GraphLinksModel and TreeModel. (Read more about models here.)

In GraphLinksModel, we have model.linkDataArray in addition to the model.nodeDataArray. It holds an array of JavaScript objects, each describing a link by specifying the "to" and "from" node keys. Here's an example where node A links to node B and where node B links to node C:

var model = $(go.GraphLinksModel);
model.nodeDataArray =
[
  { key: "A" },
  { key: "B" },
  { key: "C" }
];
model.linkDataArray =
[
  { from: "A", to: "B" },
  { from: "B", to: "C" }
];
myDiagram.model = model;

A GraphLinksModel allows you to have any number of links between nodes, going in any direction. There could be ten links running from A to B, and three more running the opposite way, from B to A.

A TreeModel works a little differently. Instead of maintaining a separate array of link data, the links in a tree model are created by specifying a "parent" for a node data. Links are then created from this association. Here's the same example done as a TreeModel, with node A linking to node B and node B linking to node C:

var model = $(go.TreeModel);
model.nodeDataArray =
[
  { key: "A" },
  { key: "B", parent: "A" },
  { key: "C", parent: "B" }
];
myDiagram.model = model;

TreeModel is simpler than GraphLinksModel, but it cannot make arbitrary link relationships, such as multiple links between the same two nodes, or a node having multiple parents. Our organizational diagram is a simple hierarchical tree-like structure, so we can use the simpler TreeModel.

First, we will complete the data by adding a few more nodes, using a TreeModel, and specifying key and parent fields in the data.

var $ = go.GraphObject.make;
var myDiagram =
  $(go.Diagram, "myDiagramDiv",
    {
      initialContentAlignment: go.Spot.Center, // center Diagram contents
      "undoManager.isEnabled": true // enable Ctrl-Z to undo and Ctrl-Y to redo
    });

// the template we defined earlier
myDiagram.nodeTemplate =
  $(go.Node, "Horizontal",
    { background: "#DD4814" },
    $(go.Picture,
      { margin: 10, width: 50, height: 50, background: "red" },
      new go.Binding("source")),
    $(go.TextBlock, "Default Text",
      { margin: 12, stroke: "white", font: "bold 16px sans-serif" },
      new go.Binding("text", "name"))
  );

var model = $(go.TreeModel);
model.nodeDataArray =
[ // the "key" and "parent" property names are required,
  // but you can add whatever data properties you need for your app
  { key: "1",              name: "Don Meow",   source: "cat1.png" },
  { key: "2", parent: "1", name: "Roquefort",    source: "cat2.png" },
  { key: "3", parent: "1", name: "Toulouse",   source: "cat3.png" },
  { key: "4", parent: "3", name: "Peppo", source: "cat4.png" },
  { key: "5", parent: "3", name: "Alonzo",     source: "cat5.png" },
  { key: "6", parent: "2", name: "Berlioz", source: "cat6.png" }
];
myDiagram.model = model;

See the Pen JXqYRL by Simon Sarris (@simonsarris) on CodePen.

Diagram Layouts: Who's the boss?

As you can see the TreeModel automatically creates the necessary Links to associate the Nodes, but with the default layout, it's hard to tell whose tree parent is who.

Diagrams have a default layout which takes all nodes that do not have a location and gives them locations, arranging them in a grid. We could explicitly give each of our nodes a location to sort out this organizational mess, but in our case, the easier solution is to use a layout that gives us good locations automatically.

We want to show a hierarchy, and are already using a TreeModel, so the most natural layout choice is TreeLayout. TreeLayout defaults to flowing from left to right, so to get it to flow from top to bottom (as is common in organizational diagrams), we will set the angle property to 90.

Using layouts in GoJS is usually simple. Each kind of layout has a number of properties that affect the results. There are samples for each layout (like TreeLayout Demo) that showcase its properties.

// define a TreeLayout that flows from top to bottom
myDiagram.layout =
  $(go.TreeLayout,
    { angle: 90, layerSpacing: 35 });

GoJS has several other layouts, which you can read about here.

Adding the layout to the diagram and model so far, we can see our results:

var $ = go.GraphObject.make;
var myDiagram =
  $(go.Diagram, "myDiagramDiv",
    {
      initialContentAlignment: go.Spot.Center, // center Diagram contents
      "undoManager.isEnabled": true, // enable Ctrl-Z to undo and Ctrl-Y to redo
      layout: $(go.TreeLayout, // specify a Diagram.layout that arranges trees
                { angle: 90, layerSpacing: 35 })
    });

// the template we defined earlier
myDiagram.nodeTemplate =
  $(go.Node, "Horizontal",
    { background: "#DD4814" },
    $(go.Picture,
      { margin: 10, width: 50, height: 50, background: "red" },
      new go.Binding("source")),
    $(go.TextBlock, "Default Text",
      { margin: 12, stroke: "white", font: "bold 16px sans-serif" },
      new go.Binding("text", "name"))
  );

var model = $(go.TreeModel);
model.nodeDataArray =
[
  { key: "1",              name: "Don Meow",   source: "cat1.png" },
  { key: "2", parent: "1", name: "Roquefort",    source: "cat2.png" },
  { key: "3", parent: "1", name: "Toulouse",   source: "cat3.png" },
  { key: "4", parent: "3", name: "Peppo", source: "cat4.png" },
  { key: "5", parent: "3", name: "Alonzo",     source: "cat5.png" },
  { key: "6", parent: "2", name: "Berlioz", source: "cat6.png" }
];
myDiagram.model = model;

See the Pen GZapjL by Simon Sarris (@simonsarris) on CodePen.

Our diagram is starting to look like a proper organization, but we could do better with the links.

Link Templates

We can create new Link template that will better suit our wide, boxy nodes. A Link is a different kind of Part, and there are some special considerations. The main element of a Link is the Link's shape, and this Shape will have its geometry computed dynamically by GoJS. For the sake of simplicity, our link is going to consist of just this shape, with its stroke a little thicker than normal and its color set to dark gray instead of black. Unlike the default link template we will not have an arrowhead, because hte visual layout of the graph already implies a direction. And we will change the Link routing property from Normal to Orthogonal, and give it a corner value so that right-angle turns are rounded.

// define a Link template that routes orthogonally, with no arrowhead
myDiagram.linkTemplate =
  $(go.Link,
    // default routing is go.Link.Normal
    // default corner is 0
    { routing: go.Link.Orthogonal, corner: 5 },
    $(go.Shape, { strokeWidth: 3, stroke: "#555" }) // the link shape

    // if we wanted an arrowhead we would also add another Shape with toArrow defined:
    // $(go.Shape, { toArrow: "Standard", stroke: null }
    );

Combining our Link template with our Node template, TreeModel, and TreeLayout, we finally have a full organization diagram. The finished code and diagram are as follows:

var $ = go.GraphObject.make;

var myDiagram =
  $(go.Diagram, "myDiagramDiv",
    {
      initialContentAlignment: go.Spot.Center, // center Diagram contents
      "undoManager.isEnabled": true, // enable Ctrl-Z to undo and Ctrl-Y to redo
      layout: $(go.TreeLayout, // specify a Diagram.layout that arranges trees
                { angle: 90, layerSpacing: 35 })
    });

// the template we defined earlier
myDiagram.nodeTemplate =
  $(go.Node, "Horizontal",
    { background: "#DD4814" },
    $(go.Picture,
      { margin: 10, width: 50, height: 50, background: "red" },
      new go.Binding("source")),
    $(go.TextBlock, "Default Text",
      { margin: 12, stroke: "white", font: "bold 16px sans-serif" },
      new go.Binding("text", "name"))
  );

// define a Link template that routes orthogonally, with no arrowhead
myDiagram.linkTemplate =
  $(go.Link,
    { routing: go.Link.Orthogonal, corner: 5 },
    $(go.Shape, { strokeWidth: 3, stroke: "#555" })); // the link shape

var model = $(go.TreeModel);
model.nodeDataArray =
[
  { key: "1",              name: "Don Meow",   source: "cat1.png" },
  { key: "2", parent: "1", name: "Roquefort",    source: "cat2.png" },
  { key: "3", parent: "1", name: "Toulouse",   source: "cat3.png" },
  { key: "4", parent: "3", name: "Peppo", source: "cat4.png" },
  { key: "5", parent: "3", name: "Alonzo",     source: "cat5.png" },
  { key: "6", parent: "2", name: "Berlioz", source: "cat6.png" }
];
myDiagram.model = model;

See the Pen pymjNE by Simon Sarris (@simonsarris) on CodePen.

Now that you are familiar with some of the basics of GoJS, consider viewing the samples to see some of the diagrams possible with GoJS, or read the technical introduction to get an in-depth look at the components of GoJS.

Original article at https://scotch.io

#javascript #typescript #gojs #webdev #html

What is GEEK

Buddha Community

Using GoGJ to Build a Interactive Diagrams

Why Use WordPress? What Can You Do With WordPress?

Can you use WordPress for anything other than blogging? To your surprise, yes. WordPress is more than just a blogging tool, and it has helped thousands of websites and web applications to thrive. The use of WordPress powers around 40% of online projects, and today in our blog, we would visit some amazing uses of WordPress other than blogging.
What Is The Use Of WordPress?

WordPress is the most popular website platform in the world. It is the first choice of businesses that want to set a feature-rich and dynamic Content Management System. So, if you ask what WordPress is used for, the answer is – everything. It is a super-flexible, feature-rich and secure platform that offers everything to build unique websites and applications. Let’s start knowing them:

1. Multiple Websites Under A Single Installation
WordPress Multisite allows you to develop multiple sites from a single WordPress installation. You can download WordPress and start building websites you want to launch under a single server. Literally speaking, you can handle hundreds of sites from one single dashboard, which now needs applause.
It is a highly efficient platform that allows you to easily run several websites under the same login credentials. One of the best things about WordPress is the themes it has to offer. You can simply download them and plugin for various sites and save space on sites without losing their speed.

2. WordPress Social Network
WordPress can be used for high-end projects such as Social Media Network. If you don’t have the money and patience to hire a coder and invest months in building a feature-rich social media site, go for WordPress. It is one of the most amazing uses of WordPress. Its stunning CMS is unbeatable. And you can build sites as good as Facebook or Reddit etc. It can just make the process a lot easier.
To set up a social media network, you would have to download a WordPress Plugin called BuddyPress. It would allow you to connect a community page with ease and would provide all the necessary features of a community or social media. It has direct messaging, activity stream, user groups, extended profiles, and so much more. You just have to download and configure it.
If BuddyPress doesn’t meet all your needs, don’t give up on your dreams. You can try out WP Symposium or PeepSo. There are also several themes you can use to build a social network.

3. Create A Forum For Your Brand’s Community
Communities are very important for your business. They help you stay in constant connection with your users and consumers. And allow you to turn them into a loyal customer base. Meanwhile, there are many good technologies that can be used for building a community page – the good old WordPress is still the best.
It is the best community development technology. If you want to build your online community, you need to consider all the amazing features you get with WordPress. Plugins such as BB Press is an open-source, template-driven PHP/ MySQL forum software. It is very simple and doesn’t hamper the experience of the website.
Other tools such as wpFoRo and Asgaros Forum are equally good for creating a community blog. They are lightweight tools that are easy to manage and integrate with your WordPress site easily. However, there is only one tiny problem; you need to have some technical knowledge to build a WordPress Community blog page.

4. Shortcodes
Since we gave you a problem in the previous section, we would also give you a perfect solution for it. You might not know to code, but you have shortcodes. Shortcodes help you execute functions without having to code. It is an easy way to build an amazing website, add new features, customize plugins easily. They are short lines of code, and rather than memorizing multiple lines; you can have zero technical knowledge and start building a feature-rich website or application.
There are also plugins like Shortcoder, Shortcodes Ultimate, and the Basics available on WordPress that can be used, and you would not even have to remember the shortcodes.

5. Build Online Stores
If you still think about why to use WordPress, use it to build an online store. You can start selling your goods online and start selling. It is an affordable technology that helps you build a feature-rich eCommerce store with WordPress.
WooCommerce is an extension of WordPress and is one of the most used eCommerce solutions. WooCommerce holds a 28% share of the global market and is one of the best ways to set up an online store. It allows you to build user-friendly and professional online stores and has thousands of free and paid extensions. Moreover as an open-source platform, and you don’t have to pay for the license.
Apart from WooCommerce, there are Easy Digital Downloads, iThemes Exchange, Shopify eCommerce plugin, and so much more available.

6. Security Features
WordPress takes security very seriously. It offers tons of external solutions that help you in safeguarding your WordPress site. While there is no way to ensure 100% security, it provides regular updates with security patches and provides several plugins to help with backups, two-factor authorization, and more.
By choosing hosting providers like WP Engine, you can improve the security of the website. It helps in threat detection, manage patching and updates, and internal security audits for the customers, and so much more.

Read More

#use of wordpress #use wordpress for business website #use wordpress for website #what is use of wordpress #why use wordpress #why use wordpress to build a website

The Best Way to Build a Chatbot in 2021

A useful tool several businesses implement for answering questions that potential customers may have is a chatbot. Many programming languages give web designers several ways on how to make a chatbot for their websites. They are capable of answering basic questions for visitors and offer innovation for businesses.

With the help of programming languages, it is possible to create a chatbot from the ground up to satisfy someone’s needs.

Plan Out the Chatbot’s Purpose

Before building a chatbot, it is ideal for web designers to determine how it will function on a website. Several chatbot duties center around fulfilling customers’ needs and questions or compiling and optimizing data via transactions.

Some benefits of implementing chatbots include:

  • Generating leads for marketing products and services
  • Improve work capacity when employees cannot answer questions or during non-business hours
  • Reducing errors while providing accurate information to customers or visitors
  • Meeting customer demands through instant communication
  • Alerting customers about their online transactions

Some programmers may choose to design a chatbox to function through predefined answers based on the questions customers may input or function by adapting and learning via human input.

#chatbots #latest news #the best way to build a chatbot in 2021 #build #build a chatbot #best way to build a chatbot

What is BUILD Finance (BUILD) | What is BUILD Finance token | What is BUILD token

BUILD Finance DAO

The document is non-binding. Some information may be outdated as we keep evolving.

BUILD Philosophy

BUILD Finance is a decentralised autonomous venture builder, owned and controlled by the community. BUILD Finance produces, funds, and manages community-owned DeFi products.

There are five core activities in which the venture BUILDers engage:

  1. Identifying business ideas,
  2. Organising teams,
  3. Sourcing capital,
  4. Helping govern the product entities, and
  5. Providing shared services.

BUILD operates a shared capabilities model, where the DAO provides the backbone support and ensures inter-entity synergies so that the product companies can focus on their own outcomes.

BUILD takes care of all organisational, hiring, back/mid office functions, and the product companies focus on what they can do best, until such time where any individual product outgrows the DAO and becomes fully self-sustainable. At that point, the chick is strong enough to leave the nest and live its own life. The survival of the fittest. No product entity is held within DAO by force.

Along the way, BUILD utilises the investment banking model, which, in its essence, is a process of creating assets, gearing them up, and then flipping them into a fund or setting them as income-generating business systems, all this while taking fees along the way at each step. BUILD heavily focuses on integrating each asset/product with each other to boost productive yield and revenues. For example, BUILD’s OTC Market may be integrated with Metric Exchange to connect the liquidity pools with the trading traffic. The net result – pure synergy that benefits each party involved, acting in a self-reinforcing manner.

El Espíritu de la Colmena (The Spirit of the Beehive)

BUILD is a hive and is always alive. While some members may appear more active than others, there’s no central source of control or “core teams” as such. BUILD is work in progress where everyone is encouraged to contribute.

Following the natural free market forces, BUILD only works on those products that members are wanting to work on themselves and that they believe have economic value. Effectively, every builder is also a user of BUILD’s products. We are DeFi users that fill the gaps in the ecosystem. Any member can contribute from both purely altruistic or ultra-mercantile intentions – it’s up to the wider community to decide what is deemed valuable and what product to support. The BUILD community is a sovereign individual that votes with their money and feet.

BUILD members = BUILD users. It’s that simple.

$BUILD TOKEN

Tokenomics

$BUILD token is used as a governance token for the DAO. It also represents a pro-rata claim of ownership on all DAO’s assets and liabilities (e.g. BUILD Treasury and $bCRED debt token).

The token was distributed via liquidity mining with no pre-sale and zero founder/private allocation. The farming event lasted for 7 days around mid-Sep 2020. At the time, BUILD didn’t have any products and held no value. Arguably, $BUILD has still zero value as it is not a legal instrument and does not guarantee or promise any returns to anyone. See the launch announcement here https://medium.com/@BUILD_Finance/announcing-build-finance-dc08df585e57​

Initial supply was 100,000 $BUILD with 100% distributed via fair launch. Subsequently, the DAO unanimously voted to approve minting of extra 30,000 $BUILD and allocate them as:

  • 15,000 $BUILD (11.5%) to the founding member of the DAO (@0xdev0) with 1-year gradual vesting, and
  • 15,000 $BUILD (11.5%) to the DAO treasury as development funds.

For the proposal of the above see: https://forum.letsbuild.finance/t/proposal-2-fund-the-development-of-defi-lending-platform/24​

The voting took place at a later retired web-page https://vote.letsbuild.finance. The governance has since moved to Snapshot (link below). The results of the old proposals are not visible there, however, on-chain voting contract can be see here: https://etherscan.io/address/0xa8621477645f76b06a41c9393ddaf79ddee63daf#readContract​

$Build Token Repartition

Vesting Schedule

Minting keys are not burnt = $BUILD supply is not fixed as token holders can vote on minting new tokens for specific reasons determined by the token holders. For example, the DAO may mint additional tokens to incentivise usage of its products, which would, in turn, increase the value flow or TVL. Dilution is not in the economic benefit of the token holders, hence any such events has to be considered carefully.

Access to minting function is available via on-chain governance. A safe buffer is established in a form of the contract-enforced 24 hour delay, which should provide a sufficient time for the community to flag. Meaning that before such a transaction could be executed, everyone would be able to act in advance by withdrawing their funds / exiting from BUILD. Any malicious minting would, theoretically, result in an immediate market sell-off of $BUILD, making it economically detrimental to do such an action. This makes it highly improbable that any malicious minting would be performed_._

GOVERNANCE

All components of the BUILD DAO and the control over its have been decentralised:

  • All contracts (incl. the Treasury and Basis Gold) can be operated by $BUILD holders with on-chain proposals (see https://docs.build.finance/build-knowledge-base/on-chain-voting);
  • All social accounts (Discord, Telegram, and Twitter) are managed by multiple moderators;
  • All frontends (Metric Exchange, Basis Gold, and the BUILD homepage) are auto-deployed and managed by multiple devs.

TREASURY & DEVELOPMENT

BUILD DAO Treasury

The BUILD treasury has over $400k that can be managed by on-chain proposals and used in whichever way the community desires. For example, to hire developers. Having a functioning product, enough funds in the treasury and a fully decentralised governance has been a long-term goal since the inception in September 2020, and now it’s finally here.

Current holdings are (might be outdated):

  • Capital budget (dev / incentives fund) - 11,025 $BUILD (~$94k);
  • Operational budget (product development) - 204,300 $aDAI;
  • Ownership stake - 200,000 $METRIC (~$84k);
  • Ownership stake - 199,900 $UPDOWN(~$62k);
  • Ownership stake - 5,400 $HYPE (~$1.3k);
  • Ownership stake - 2% of $BSGS supply.
  • TOTAL: ~$445k

Funding of the Development

In an early stage, the development will be funded by an allocation of bCRED debt tokens for development expenses. After the first product was built (i.e. Metric Exchange), the DAO sold 5,000 $BUILD for 203,849 $DAI which will now be used for funding of other products or a combination of revenue + a smaller token allocation. This is up to the community to decide.

Smart Contract Audit

Contracts are not audited. It’s up to the BUILD community governance to decide how to spend our funds. If the community wants to spend any amount for auditing, a voting proposal can be initiated. As with any decisions and proposals, the cost-benefit analysis must be employed in regards to the economical sense of spending any funds on audit vs developing more products and expanding our revenue streams.

DAO Liabilities and $bCRED

$bCRED is a token that allowed the DAO to reward members for work before the DAO source sufficient funds. Effectively, $bCRED is a promissory note or an IOU to give back $DAI at 1:1 ratio, when the DAO starts generating revenues. Read more about $bCRED here: https://medium.com/@BUILD_Finance/what-is-bcred-b97e4cc75f8c.

“BUILDER” User Role in Discord

Since Discord is our primary coordination mechanism, we need to make effort to keep it focused on producing value. During the launch of METRIC, we’ve doubled our total number of users! This made it very difficult for existing users to explain what BUILD is about to new users and created a lot of confusion.

To help improve the quality of conversations, we’ve introduced a new user role called BUILDer. BUILDers will have write-access to product development channels while everyone else will only be able to read them. This should keep those product changes focused on actual productive conversations and make them more informative.

“GUARDIAN” Role in Discord

To increase our collective output as a community, a governance vote introduced an incentivisation mechanism for community contribution, tipping, and other small projects using our unique bCRED token (but may change in the future as required). These tokens are stewarded by active community members — “guardians’’ — who are free to allocate these funds to tip people for proactive work. Current guardians are @Son of Ishtar and @0xdev0, although anyone can propose the tip for anyone else. For more details see Proposal #15.

Hence, Guardians are defined as members of the DAO who are entrusted with a community budget for tipping other members for performing various small tasks.

PRODUCT SUITE & ROADMAP

  • Metric Exchange - is a DEX aggregator that allows for limit orders trading for any ERC-20 token via 0x relayer. Development continues with the product owner SHA_2048 and inputs from vfat. Live at metric.exchange.
  • Basis Gold - a synthetic, algorythmically-adjusted token pegged to the price of gold (sXAU) with elastic supply. Live at https://basis.gold/.
  • Updown Finance - binary options for volatility trading instrument (alpha is live at updown.finance).
  • Vortex - a lending & borrowing platform, which will target the long tail of assets that are currently not served by the existing DeFi money markets. Aiming to launch by March’2021.

The other immediate focus right now will be to make good use of our newly available funding and hire several product managers for other projects.

Please note that nothing is here set in stone. Just like any other start-up, we’ll keep experimenting, learning, and evolving. What’s listed here is just our current trajectory but it might change at any point.

SOCIAL MEDIA

Would you like to earn BUILD right now! ☞ CLICK HERE

Top exchanges for token-coin trading. Follow instructions and make unlimited money

BinanceBittrexPoloniexBitfinexHuobi

Thank you for reading!

#blockchain #cryptocurrency #build finance #build

Dylan  Iqbal

Dylan Iqbal

1631777859

Using GoGJ to Build a Interactive Diagrams

In depth introduction to building diagrams with GoJS

GoJS is a JavaScript library for building interactive diagrams. This tutorial covers the essentails of using GoJS by building an org chart diagram from scratch.

Kinds of Diagrams

A diagram is any visual representation of a structure, or a process, or simply data with relationships. They are used to convey the meaning in an intuitive way. Diagrams and graphs are diverse: there are strongly-linked graphs like flowcharts, family trees, genograms, organizational charts, decision trees, and so on. Diagrams may also be visual representations of real-world objects such as shelves (planograms) or shop floors, or room layouts. They can also display kanbans and work-item graphs, graphs atop maps, or more abstract data representations such as plots for statistical visualizations.

Table of Contents

  • Kinds of Diagrams
  • Creating a Diagram
  • Diagrams and Models
  • Styling Nodes
  • Kinds of Models
  • Diagram Layouts: Who's the boss?
  • Link Templates

Diagrams are commonly graph-like in nature, containing Nodes and Links, organized manually or by Layouts and Groups (which may also act as sub-graphs). These concepts are all classes in GoJS, and come with a host of convenience methods for traversing and organizing your diagram structures, allowing users to manipulate those structures, and enforcing interactivity rules.

GoJS makes it easy to form representations from model data, and allows users to interact with them. GoJS adds keyboard, mouse, and touch support, the ability to create, link and edit data, move and rotate objects, copy and paste, save and load, undo and redo, and whatever else your users may need. GoJS allows you to create any kind of diagram, from flowcharts to floorplans.

Some diagrams built with GoJS, taken from the GoJS Samples

Creating a Diagram

You can download the latest version of GoJS here.

If you use Node.js you could download the latest GoJS with npm, npm install gojs, and reference GoJS in the package:

<script src="node_modules/gojs/release/go-debug.js"></script>

For getting-started convenience you could link straight to the GoJS provided by CDNJS, but this is likely to be out of date and I recommend always using the latest version of GoJS:

<script src="https://cdnjs.cloudflare.com/ajax/libs/gojs/1.6.7/go-debug.js"></script>

GoJS diagrams are contained in an HTML <div> element in your page that you give an explicit size:

<!-- The DIV for a Diagram needs an explicit size or else we will not see anything.
     In this case we also add a background color so we can see the area. -->
<div id="myDiagramDiv" style="width:400px; height:150px; background-color: #DAE4E4;"></div>

Pass the <div>'s id to GoJS to make a Diagram:

    var $ = go.GraphObject.make; // We use $ for conciseness, but you can use anything, $, GO, MAKE, etc
    var myDiagram = $(go.Diagram, "myDiagramDiv");

This produces an empty diagram, so not much to look at yet:

See the Pen pymgLO by Simon Sarris (@simonsarris) on CodePen.

This article shows by example how to use go.GraphObject.make to build GoJS objects. For more detail, see Building Objects in GoJS. Using $ as an abbreviation for go.GraphObject.make is handy and we will assume its use from now on. If you use $ for something else in your code, you can always pick a different short variable name, such as $$ or MAKE or GO.

GoJS uses go as the "namespace" in which all GoJS types reside. All code uses of GoJS classes such as Diagram or Node or Panel or Shape or TextBlock will be prefixed with go..

Diagrams and Models

Diagram parts such as Nodes and Links are visualizations of data that is managed by a Model. In GoJS, Models hold the data (arrays of JavaScript objects) that describe Parts, and Diagrams act as views to visualize this data using actual Node and Link objects. Models, not Diagrams, are what you save and load.

Here's an example of a Model and Diagram, followed by the diagram it creates:

var $ = go.GraphObject.make;
var myDiagram =
  $(go.Diagram, "myDiagramDiv",
    {
      initialContentAlignment: go.Spot.Center, // center Diagram contents
      "undoManager.isEnabled": true // enable Ctrl-Z to undo and Ctrl-Y to redo
    });

var myModel = $(go.Model);
// in model data, each node is represented by a JavaScript object:
myModel.nodeDataArray = [
  { key: "Alpha" },
  { key: "Beta" },
  { key: "Gamma" }
];
myDiagram.model = myModel;

See the Pen zqQvvd by Simon Sarris (@simonsarris) on CodePen.

The diagram displays the three nodes that are in the model. Since there was no location information given, GoJS automatically assigns them locations in a grid-like fashion using the default layout. Some interaction is already possible:

  • Click and drag the background to pan the view.
  • Click a node to select it. Click and drag a node to move it around.
  • Click and hold on the background, then start dragging, and a selection box will appear.
  • Use CTRL-C and CTRL-V, or control-drag-and-drop, to make a copy of the selection.
  • Press the Delete key to delete selected nodes.
  • Since the undo manager was enabled, CTRL-Z and CTRL-Y will undo and redo moves and copies and deletions.
  • Read about more Keyboard Commands.

Styling Nodes

Nodes are styled by creating templates consisting of GraphObjects. To create a Node, we have several building block classes at our disposal:

  • Shape, to display a geometry (pre-defined or custom) with colors
  • TextBlock, to display (potentially editable) text
  • Picture, to display images
  • Panel, containers to hold a collection of other objects that can be positioned and sized in different manners according to the type of the Panel (like tables, vertical stacks, and automatically stretching containers)

All of these building blocks are derived from the GraphObject class, so we casually refer to them as GraphObjects or objects or elements.

We want model data properties to affect our Nodes, and this is done by way of data bindings. Data bindings allow us to change the appearance and behavior of GraphObjects in Nodes by automatically setting properties on those GraphObjects to values that are taken from the model data.

The default Node template is simple: A Node which contains one TextBlock. There is a data binding between a TextBlock's text property and the model data's key. In code, the template looks like this:

myDiagram.nodeTemplate =
  $(go.Node,
    $(go.TextBlock,
      // TextBlock.text is bound to Node.data.key
      new go.Binding("text", "key"))
  );

The result is a node that will display the key in the model data object, as we saw with the diagram above.

Nesting can be arbitrarily deep, and every class has its own unique set of properties to explore. More generally, the skeleton of a Node template will look something like this:

myDiagram.nodeTemplate =
  $(go.Node, "Vertical" // second argument of a Node/Panel can be a Panel type
    { /* set Node properties here */ },
    // example Node binding sets Node.location to the value of Node.data.loc
    new go.Binding("location", "loc"),

    // GraphObjects contained within the Node
    // this Shape will be vertically above the TextBlock
    $(go.Shape,
      "RoundedRectangle", // string argument can name a predefined figure
      { /* set Shape properties here */ },
      // example Shape binding sets Shape.figure to the value of Node.data.fig
      new go.Binding("figure", "fig")),

    $(go.TextBlock,
      "default text",  // string argument can be initial text string
      { /* set TextBlock properties here */ },
      // example TextBlock binding sets TextBlock.text to the value of Node.data.key
      new go.Binding("text", "key"))
  );

Now let's make a simple template commonly seen in organizational diagrams — an image next to a name. Consider the following Node template:

  • A Node of "Horizontal" Panel type, meaning that its elements will be laid out horizontally side-by-side. It has two elements:
    • A Picture for the portrait, with the image source data bound
    • A TextBlock for the name, with the text data bound
var $ = go.GraphObject.make;
var myDiagram =
  $(go.Diagram, "myDiagramDiv",
    {
      initialContentAlignment: go.Spot.Center, // center Diagram contents
      "undoManager.isEnabled": true // enable Ctrl-Z to undo and Ctrl-Y to redo
    });

// define a Node template
myDiagram.nodeTemplate =
  $(go.Node, "Horizontal",
    // the entire node will have an orange background
    { background: "#DD4814" },
    $(go.Picture,
      // Pictures are best off having an explicit width and height.
      // Adding a red background ensures something is visible when there is no source set
      { margin: 10, width: 50, height: 50, background: "red" },
      // Picture.source is data bound to the "source" attribute of the model data
      new go.Binding("source")),
    $(go.TextBlock,
      "Default Text",  // the initial value for TextBlock.text
      // some room around the text, a larger font, and a white stroke:
      { margin: 12, stroke: "white", font: "bold 16px sans-serif" },
      // TextBlock.text is data bound to the "name" attribute of the model data
      new go.Binding("text", "name"))
  );

var model = $(go.Model);
// each node data object holds whatever properties it needs,
// for this app we add the "name" and "source" properties
model.nodeDataArray =
[
  { name: "Don Meow", source: "cat1.png" },
  { name: "Toulouse", source: "cat2.png" },
  { name: "Roquefort",  source: "cat3.png" },
  { } // we left this last node data empty!
];
myDiagram.model = model;

This produces the diagram:

See the Pen jqobMq by Simon Sarris (@simonsarris) on CodePen.

A good Node template will help users visually parse data, even when some of that data is missing. We may want to show some "default" state when not all information is present, for instance when an image does not load or when a name is not known. The "empty" node data in this example is used to show that well-designed node templates can work perfectly well without any of the properties on the bound data.

Kinds of Models

Perhaps we want to show more than just nodes. By adding some Links to show the relationship between individual nodes and a Layout to automatically position the nodes, we can show that Don Meow is really the leader of a cat cartel.

In order to get links into our diagram, the basic Model is not going to cut it. We are going to have to pick one of the other two models in GoJS, both of which support Links. These are GraphLinksModel and TreeModel. (Read more about models here.)

In GraphLinksModel, we have model.linkDataArray in addition to the model.nodeDataArray. It holds an array of JavaScript objects, each describing a link by specifying the "to" and "from" node keys. Here's an example where node A links to node B and where node B links to node C:

var model = $(go.GraphLinksModel);
model.nodeDataArray =
[
  { key: "A" },
  { key: "B" },
  { key: "C" }
];
model.linkDataArray =
[
  { from: "A", to: "B" },
  { from: "B", to: "C" }
];
myDiagram.model = model;

A GraphLinksModel allows you to have any number of links between nodes, going in any direction. There could be ten links running from A to B, and three more running the opposite way, from B to A.

A TreeModel works a little differently. Instead of maintaining a separate array of link data, the links in a tree model are created by specifying a "parent" for a node data. Links are then created from this association. Here's the same example done as a TreeModel, with node A linking to node B and node B linking to node C:

var model = $(go.TreeModel);
model.nodeDataArray =
[
  { key: "A" },
  { key: "B", parent: "A" },
  { key: "C", parent: "B" }
];
myDiagram.model = model;

TreeModel is simpler than GraphLinksModel, but it cannot make arbitrary link relationships, such as multiple links between the same two nodes, or a node having multiple parents. Our organizational diagram is a simple hierarchical tree-like structure, so we can use the simpler TreeModel.

First, we will complete the data by adding a few more nodes, using a TreeModel, and specifying key and parent fields in the data.

var $ = go.GraphObject.make;
var myDiagram =
  $(go.Diagram, "myDiagramDiv",
    {
      initialContentAlignment: go.Spot.Center, // center Diagram contents
      "undoManager.isEnabled": true // enable Ctrl-Z to undo and Ctrl-Y to redo
    });

// the template we defined earlier
myDiagram.nodeTemplate =
  $(go.Node, "Horizontal",
    { background: "#DD4814" },
    $(go.Picture,
      { margin: 10, width: 50, height: 50, background: "red" },
      new go.Binding("source")),
    $(go.TextBlock, "Default Text",
      { margin: 12, stroke: "white", font: "bold 16px sans-serif" },
      new go.Binding("text", "name"))
  );

var model = $(go.TreeModel);
model.nodeDataArray =
[ // the "key" and "parent" property names are required,
  // but you can add whatever data properties you need for your app
  { key: "1",              name: "Don Meow",   source: "cat1.png" },
  { key: "2", parent: "1", name: "Roquefort",    source: "cat2.png" },
  { key: "3", parent: "1", name: "Toulouse",   source: "cat3.png" },
  { key: "4", parent: "3", name: "Peppo", source: "cat4.png" },
  { key: "5", parent: "3", name: "Alonzo",     source: "cat5.png" },
  { key: "6", parent: "2", name: "Berlioz", source: "cat6.png" }
];
myDiagram.model = model;

See the Pen JXqYRL by Simon Sarris (@simonsarris) on CodePen.

Diagram Layouts: Who's the boss?

As you can see the TreeModel automatically creates the necessary Links to associate the Nodes, but with the default layout, it's hard to tell whose tree parent is who.

Diagrams have a default layout which takes all nodes that do not have a location and gives them locations, arranging them in a grid. We could explicitly give each of our nodes a location to sort out this organizational mess, but in our case, the easier solution is to use a layout that gives us good locations automatically.

We want to show a hierarchy, and are already using a TreeModel, so the most natural layout choice is TreeLayout. TreeLayout defaults to flowing from left to right, so to get it to flow from top to bottom (as is common in organizational diagrams), we will set the angle property to 90.

Using layouts in GoJS is usually simple. Each kind of layout has a number of properties that affect the results. There are samples for each layout (like TreeLayout Demo) that showcase its properties.

// define a TreeLayout that flows from top to bottom
myDiagram.layout =
  $(go.TreeLayout,
    { angle: 90, layerSpacing: 35 });

GoJS has several other layouts, which you can read about here.

Adding the layout to the diagram and model so far, we can see our results:

var $ = go.GraphObject.make;
var myDiagram =
  $(go.Diagram, "myDiagramDiv",
    {
      initialContentAlignment: go.Spot.Center, // center Diagram contents
      "undoManager.isEnabled": true, // enable Ctrl-Z to undo and Ctrl-Y to redo
      layout: $(go.TreeLayout, // specify a Diagram.layout that arranges trees
                { angle: 90, layerSpacing: 35 })
    });

// the template we defined earlier
myDiagram.nodeTemplate =
  $(go.Node, "Horizontal",
    { background: "#DD4814" },
    $(go.Picture,
      { margin: 10, width: 50, height: 50, background: "red" },
      new go.Binding("source")),
    $(go.TextBlock, "Default Text",
      { margin: 12, stroke: "white", font: "bold 16px sans-serif" },
      new go.Binding("text", "name"))
  );

var model = $(go.TreeModel);
model.nodeDataArray =
[
  { key: "1",              name: "Don Meow",   source: "cat1.png" },
  { key: "2", parent: "1", name: "Roquefort",    source: "cat2.png" },
  { key: "3", parent: "1", name: "Toulouse",   source: "cat3.png" },
  { key: "4", parent: "3", name: "Peppo", source: "cat4.png" },
  { key: "5", parent: "3", name: "Alonzo",     source: "cat5.png" },
  { key: "6", parent: "2", name: "Berlioz", source: "cat6.png" }
];
myDiagram.model = model;

See the Pen GZapjL by Simon Sarris (@simonsarris) on CodePen.

Our diagram is starting to look like a proper organization, but we could do better with the links.

Link Templates

We can create new Link template that will better suit our wide, boxy nodes. A Link is a different kind of Part, and there are some special considerations. The main element of a Link is the Link's shape, and this Shape will have its geometry computed dynamically by GoJS. For the sake of simplicity, our link is going to consist of just this shape, with its stroke a little thicker than normal and its color set to dark gray instead of black. Unlike the default link template we will not have an arrowhead, because hte visual layout of the graph already implies a direction. And we will change the Link routing property from Normal to Orthogonal, and give it a corner value so that right-angle turns are rounded.

// define a Link template that routes orthogonally, with no arrowhead
myDiagram.linkTemplate =
  $(go.Link,
    // default routing is go.Link.Normal
    // default corner is 0
    { routing: go.Link.Orthogonal, corner: 5 },
    $(go.Shape, { strokeWidth: 3, stroke: "#555" }) // the link shape

    // if we wanted an arrowhead we would also add another Shape with toArrow defined:
    // $(go.Shape, { toArrow: "Standard", stroke: null }
    );

Combining our Link template with our Node template, TreeModel, and TreeLayout, we finally have a full organization diagram. The finished code and diagram are as follows:

var $ = go.GraphObject.make;

var myDiagram =
  $(go.Diagram, "myDiagramDiv",
    {
      initialContentAlignment: go.Spot.Center, // center Diagram contents
      "undoManager.isEnabled": true, // enable Ctrl-Z to undo and Ctrl-Y to redo
      layout: $(go.TreeLayout, // specify a Diagram.layout that arranges trees
                { angle: 90, layerSpacing: 35 })
    });

// the template we defined earlier
myDiagram.nodeTemplate =
  $(go.Node, "Horizontal",
    { background: "#DD4814" },
    $(go.Picture,
      { margin: 10, width: 50, height: 50, background: "red" },
      new go.Binding("source")),
    $(go.TextBlock, "Default Text",
      { margin: 12, stroke: "white", font: "bold 16px sans-serif" },
      new go.Binding("text", "name"))
  );

// define a Link template that routes orthogonally, with no arrowhead
myDiagram.linkTemplate =
  $(go.Link,
    { routing: go.Link.Orthogonal, corner: 5 },
    $(go.Shape, { strokeWidth: 3, stroke: "#555" })); // the link shape

var model = $(go.TreeModel);
model.nodeDataArray =
[
  { key: "1",              name: "Don Meow",   source: "cat1.png" },
  { key: "2", parent: "1", name: "Roquefort",    source: "cat2.png" },
  { key: "3", parent: "1", name: "Toulouse",   source: "cat3.png" },
  { key: "4", parent: "3", name: "Peppo", source: "cat4.png" },
  { key: "5", parent: "3", name: "Alonzo",     source: "cat5.png" },
  { key: "6", parent: "2", name: "Berlioz", source: "cat6.png" }
];
myDiagram.model = model;

See the Pen pymjNE by Simon Sarris (@simonsarris) on CodePen.

Now that you are familiar with some of the basics of GoJS, consider viewing the samples to see some of the diagrams possible with GoJS, or read the technical introduction to get an in-depth look at the components of GoJS.

Original article at https://scotch.io

#javascript #typescript #gojs #webdev #html

I am Developer

1611112146

Codeigniter 4 Autocomplete Textbox From Database using Typeahead JS - Tuts Make

Autocomplete textbox search from database in codeigniter 4 using jQuery Typeahead js. In this tutorial, you will learn how to implement an autocomplete search or textbox search with database using jquery typehead js example.

This tutorial will show you step by step how to implement autocomplete search from database in codeigniter 4 app using typeahead js.

Autocomplete Textbox Search using jQuery typeahead Js From Database in Codeigniter

  • Download Codeigniter Latest
  • Basic Configurations
  • Create Table in Database
  • Setup Database Credentials
  • Create Controller
  • Create View
  • Create Route
  • Start Development Server

https://www.tutsmake.com/codeigniter-4-autocomplete-textbox-from-database-using-typeahead-js/

#codeigniter 4 ajax autocomplete search #codeigniter 4 ajax autocomplete search from database #autocomplete textbox in jquery example using database in codeigniter #search data from database in codeigniter 4 using ajax #how to search and display data from database in codeigniter 4 using ajax #autocomplete in codeigniter 4 using typeahead js