goradd

command module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: MIT Imports: 2 Imported by: 0

README

GoRADD

A rapid Web application development framework for Go.

GoRADD is a monolithic web development framework for rapidly creating a web application from a concept in your mind and then allowing you to as easily as possible maintain that application through all the twists and turns of the change process. It is ideal for prototyping, intranet websites, websites that are very data intensive with many forms to gather information from users, websites that require the security and speed of a compiled language, websites with thousands of simultaneous users, and websites being maintained by one or a small group of developers. It is particularly good for developers new to GO and/or new to web development.

Installation

See the Quick Start guide to get started.

Requirements

  • A supported database up and running on your local development computer. Current supported databases are:
    • Mysql
For Developing GoRADD itself
  • Sass (to build the css files from the scss source)

Goals

  1. 80-20 rule, where out of the box GoRADD will do most of the hard work of building a website, and will quickly get you a working website, but not necessarily one that you will want to ship. GoRADD is architected to allow you to make changes and plug in other open-source software as you need.
  2. Incremental changes. Most development processes go through a lengthy requirement analysis process, followed by a design process, and a lengthy build process, only to find out that what you built wasn't really what was needed. Instead, GoRADD gets you a working website quickly, and then lets you build out your application incrementally. It tries to make it easy to restructure your website, even at the data structure level, and have your changes filter through your application quickly without requiring a complete rewrite.
  3. Layered development. GoRADD has its code, you have your code, and then there is an in-between interface that changes over time. GoRADD uses code generation to create this interface, and clearly delineates the code that you can change to modify the interface, vs. code that it will generate as you change your data model. The result is a product that is easy to change as your world and requirements change.
  4. Most development happens in GO. What the user does in the browser is mirrored on the server, which allows you to work in a way that feels like you are building a desktop application. This makes your developers more productive and it allows you to build your app using common GO tools like the built-in unit test environment and documentation server. You can still work in javascript if you want to or need to do custom UI work, but often you don't have to.
  5. Stability. We want to build applications that real people use, and that means reliance on tried and true technologies that work on a broad range of browsers and servers, rather than technologies that require lots of Polyfills for emerging standards. JQuery is currently required, and partly because we want to make it easy to create Bootstrap based applications. However, Bootstrap has announced that they are removing reliance on JQuery, and we will attempt to do so as well.
  6. Progressivive enhancement. If you use the provided widgets, you can create a website that works even if the client turns off Javascript. All major browsers are currently supported, but we hope to support Opera Mini as well.
  7. Rich libraries of widgets. GoRADD provides standard widgets corresponding to basic html controls, and also provides Bootstrap widgets. If you have a particular css or javascript widget library you want to support, building the GoRADD interface is fairly easy to do, and the Bootstrap library included gives you a model to follow.
Future Goals
  • Scalability. GoRADD is architected for scalability, but the specific features required for scalability have not been built and are not scheduled for version 1. Some of those things are
    1. GoRADD requires a MySQL database at this point. SQL is great for creating most common data structures, is great when you need to change your structure without destroying data, and is fast enough for most applications. GoRADD is architected so that you could switch to a NoSQL implementation as your product matures and you need scalability at speed, but the NoSQL drivers are not currently built. They would not be difficult to do, but they will need to rely on a separate data structure definition. The plan is that a SQL database would be able to generate a schema that would be used by the NoSQL drivers to make it possible to migrate the data from SQL to NoSQL.
    2. GoRADD maintains the state of each user of the website in internal memory we call the pagestate. Since its in memory, each user is currently bound to one server. Go is incredibly fast, so one server should be able to manage thousands of users with a reasonable amount of RAM. But to grow beyond this, some work would need to be done on serializing the pagestate into an off-site database. This effort is in process.
    3. Live-updates. Live updates in a multi-user environment can be particularly difficult at the data model level. However, browser technologies also make them difficult at the client too. The browser world is in rapid flux around this topic, with different browsers supporting a variety of technologies (WebSockets, Server-side events, and now fetch streaming), with Microsoft browsers generally lagging the pack. Hopefully things will settle down and we can implement this in a sane way.
  • WebComponents. WebComponent architecture fits particularly well with goradd's architecture. However, WebComponents are not fully supported by all major browsers. As WebComponents gain traction, we hope to use them for future browser widgets. In the mean-time, we support many JQuery based widgets.
  • Matching GraphQL or GraphQL like interface. The ORM architecture has many similarities to GraphQL, and could potentially auto-generate a GraphQL interface to make it easy to integrate a mobile app interface.
Anti-patterns
  1. GoRADD's html server is not microservice based. While you can create microservices that serve parts of your application, at its core goradd is a monolithic framework that includes an ORM, an MVC architecture, and a basic control and form management library. If you are trying to build an application for millions of users, goradd is not for you at this time. However, it is architected to eventually allow parts of it to be handled off-line by other servers, so it is (or will be soon) scalable.
  2. Object-oriented. Some of goradd uses a code pattern that mirrors traditional object-oriented inheritance and gets around some of GO's limitations in this area, including implementing virtual functions. If you hate inheritance, goradd is not for you. If you don't mind it, but you still like object composition too, this is your place.
  3. Code generation. GoRADD relies heavily on code generation, and in particular uses the related github.com/goradd/got template engine to generate code.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
codegen
connector
The connector package is a group of support types and functions that enable the connector dialog to edit the generated connector and see changes on the fly.
The connector package is a group of support types and functions that enable the connector dialog to edit the generated connector and see changes on the fly.
The ideas package contains code that is not being used, but that we might use some day and include, but right now we don't want to support it.
The ideas package contains code that is not being used, but that we might use some day and include, but right now we don't want to support it.
internal
install/goradd-project/web/app
The app package contains your local application object.
The app package contains your local application object.
install/goradd-project/web/form
The form package contains code-generated forms that give you default functionality for your website.
The form package contains code-generated forms that give you default functionality for your website.
install/goradd-tmp/template
The template package contains generated templates from the pre-generation process for codegen.
The template package contains generated templates from the pre-generation process for codegen.
pkg
auth
package auth provides a default authentication framework based on user name and password.
package auth provides a default authentication framework based on user name and password.
bootstrap
The bootstrap package is an example of an add-on module to goradd.
The bootstrap package is an example of an add-on module to goradd.
datetime
The datetime package contains utilities for time and date related functions.
The datetime package contains utilities for time and date related functions.
html
The HTML package includes general functions for manipulating html tags, comments and the like.
The HTML package includes general functions for manipulating html tags, comments and the like.
i18n
The i18n package provides support services for translation of goradd web pages and widgets.
The i18n package provides support services for translation of goradd web pages and widgets.
javascript
Package javascript converts go objects and types to javascript code, suitable for embedding in html or sending to the browser via a specialized ajax call.
Package javascript converts go objects and types to javascript code, suitable for embedding in html or sending to the browser via a specialized ajax call.
log
Package log provides logging support for the application and framework developers
Package log provides logging support for the application and framework developers
math
This math package contains number utlities that are not included in the Go math library, but that are still very useful.
This math package contains number utlities that are not included in the Go math library, but that are still very useful.
orm/db
The db package works with the rest of the orm to interface between a database and the ORM abstraction of reading and querying a database.
The db package works with the rest of the orm to interface between a database and the ORM abstraction of reading and querying a database.
orm/op
The op package contains operation and aggregation nodes that can be added to a QueryBuilder.
The op package contains operation and aggregation nodes that can be added to a QueryBuilder.
orm/query
The query package primarily contains code used internally by the framework to build queries.
The query package primarily contains code used internally by the framework to build queries.
page
Package page is the user-interface layer of goradd, and implements state management and rendering of an html page, as well as the framework for rendering controls.
Package page is the user-interface layer of goradd, and implements state management and rendering of an html page, as well as the framework for rendering controls.
page/action
Package action defines actions that you can trigger using events.
Package action defines actions that you can trigger using events.
page/control
Package control contains the implementations of the standard controls in goradd.
Package control contains the implementations of the standard controls in goradd.
page/widget
The widget package contains supported composite and special purpose controls that are not part of the html standard
The widget package contains supported composite and special purpose controls that are not part of the html standard
resource
package resource manages http resources that you serve based on a static path to the resource.
package resource manages http resources that you serve based on a static path to the resource.
session/location
The location package implements a location queue built on top of the session service.
The location package implements a location queue built on top of the session service.
sys
url
package url contains url utilities beyond what is available in the net/url package
package url contains url utilities beyond what is available in the net/url package
test
browsertest
Package test contains the test harness, which controls browser based tests.
Package test contains the test harness, which controls browser based tests.
web
app

Jump to

Keyboard shortcuts

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