Gothic Alpha: Difference between revisions

From Adam Colton
Jump to navigation Jump to search
Created page with "Laying the ground work for Gothic. The goal here is to get something that works, but maybe not everything I want. == Objects == This is the core of the whole thing. I wa..."
 
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 2: Line 2:


The goal here is to get something that works, but maybe not everything I want.
The goal here is to get something that works, but maybe not everything I want.
https://github.com/boltdb/bolt via https://www.specto.io/replacing-redis-with-boltdb-a-pure-go-keyvalue-store/
https://github.com/mitchellh/mapstructure
I'll use [http://www.gorillatoolkit.org/ Gorilla] for most of the web stuff.
== Thought Experiment ==
From a dev-dashboard, a user should be able to define a simple schema. This will include fields, types and validation rules. This schema will then be implemented as an Entity. This will produce:
* Go Struct
* Lapiz Class
* REST CRUD API
* Views
** form partial
** edit wrapper
** create wrapper
** view many
** view one


== Objects ==
== Objects ==
Line 7: Line 26:


I think for this, I will start with [https://capnproto.org/index.html Capn Proto]. Pair that with and Entity system. The Entity interface just needs to return an ID.
I think for this, I will start with [https://capnproto.org/index.html Capn Proto]. Pair that with and Entity system. The Entity interface just needs to return an ID.
The other option would be protocol buffers. On the server, I can extend them by embedding.
=== Indexing ===
One of the big challenges is indexing. I think the right approach is not do it right away, but see what comes up.
=== Derive from Go ===
I could derive anything I need form the Go structs. Using reflect, I could get the fields and types. From there I could generate a schema. I'd need a way to modify it for the db and for JS. But for a basic object graph with simple validation, it could be very easy.


== JS ==
== JS ==
Line 14: Line 41:


I may also pull in GopherJS, but that needs a little further exploration.
I may also pull in GopherJS, but that needs a little further exploration.
[[Category:Code]]
[[Category:Project]]

Latest revision as of 19:36, 1 February 2016

Laying the ground work for Gothic.

The goal here is to get something that works, but maybe not everything I want.

https://github.com/boltdb/bolt via https://www.specto.io/replacing-redis-with-boltdb-a-pure-go-keyvalue-store/

https://github.com/mitchellh/mapstructure

I'll use Gorilla for most of the web stuff.

Thought Experiment

From a dev-dashboard, a user should be able to define a simple schema. This will include fields, types and validation rules. This schema will then be implemented as an Entity. This will produce:

  • Go Struct
  • Lapiz Class
  • REST CRUD API
  • Views
    • form partial
    • edit wrapper
    • create wrapper
    • view many
    • view one

Objects

This is the core of the whole thing. I want a simple way to have objects on the server be stored or sent to the client.

I think for this, I will start with Capn Proto. Pair that with and Entity system. The Entity interface just needs to return an ID.

The other option would be protocol buffers. On the server, I can extend them by embedding.

Indexing

One of the big challenges is indexing. I think the right approach is not do it right away, but see what comes up.

Derive from Go

I could derive anything I need form the Go structs. Using reflect, I could get the fields and types. From there I could generate a schema. I'd need a way to modify it for the db and for JS. But for a basic object graph with simple validation, it could be very easy.

JS

I need to support as much JS integration as possible. Objects should be automatically exported, so that the only JS work is adding front-end features.

I'll probably use some Lapiz here too - the event system work well with websockets.

I may also pull in GopherJS, but that needs a little further exploration.