getting_started

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OneMinuteQuickStart = Doc(
	Markdown(`
This article try to let you use the shortest time to get a taste of how powerful QOR5 is.

One of the QOR5 module called ~presets~ that can quickly create admin interface like [these](/samples/presets-detail-page-cards/customers):

Install the command line tool with:

~~~
$ go install github.com/qor5/docs/cmd/qor5@latest
~~~

And run:

~~~
$ qor5
~~~

It will promote you to input a Go package, and create the admin app in current directory.

Change to the created package directory, and use ~docker-compose up~ to start the database, and then
Use a new terminal to run ~source dev_env && go run main.go~ to start the admin app

`),
).Title("1 Minute Quick Start").
	Slug("getting-started/one-minute-quick-start")
View Source
var WhatIsQOR5 = Doc(
	Markdown(`
QOR5 is a Go library to build web applications.
different from other MVC frameworks. the concepts in QOR5 is **Page**, **Event**, **Component**.
and doesn't include Model.

A Page composite different kinds of Components, and Components trigger Events.
A Page contains many event handlers, and renders one view, and event handlers reload the whole page,
Or update certain part of the page, Or go to a different Page.

QOR5 is opinionated in several ways:

- It prefers writing HTML in static typing Go language, rather than a certain type of template language, Not even go template.
- It try to minify the needs to write any JavaScript/Typescript for building interactive web applications
- It maximize the reusability of Components. since it uses Go to write components, You can abstract component very easy, and use component from a third party Go package is also like using normal Go packages.
- It prefers chain methods to set optional parameters of Component
- It uses [Vue](https://vuejs.org/) js under the hood. and only Vue Component can be integrated

`),
	utils.Anchor(H2(""), "Hello World"),
	Markdown(`
Here is the most sample hello world, that show the header with Hello World.
`),
	ch.Code(generated.HelloWorldSample).Language("go"),
	Markdown(`
~H1("Hello World")~ is actually a simple component. it renders h1 html tag. and been set to page body.

The above is the code you mostly writing. the following is the boilerplate code that needs to write one time.
`),
	ch.Code(generated.HelloWorldMuxSample1).Language("go"),
	ch.Code(generated.HelloWorldMuxSample2).Language("go"),
	ch.Code(generated.HelloWorldMainSample).Language("go"),
	utils.Demo("Hello World", e00_basics.HelloWorldPath, "e00_basics/hello-world.go"),

	Markdown(`
If you wondering why ~H1("Hello World")~ and how this worked, Please go ahead and checkout next page
`),
).Title("What is QOR5?").
	Slug("getting-started/what-is-qor5")

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL