Comments (4)
@crackcomm - I think some of these might already be in Ponzu, but undocumented.. others I'm not sure I fully understand and need some more information. Let me know what you think.
Slug fields (eq. artist + title)
I could be mistaken about what you refer to as a 'slug', but there is an interface in the system/item
package called Sluggable
which lets you override how the URL slug is set. It's better to implement the Stringer
interface on your content to do this though as it will lead to more reliable and consistent results. See https://godoc.org/github.com/ponzu-cms/ponzu/system/item#Sluggable
Super-types (eq. URL), definable in addons
Would this be used as a editor.Field
like the ones in http://github.com/bosssauce/reference?
Field validators (eq. email, URL), definable in addons
I agree that there should be a good validation package made for Ponzu that would allow you to do something like the following in your content type, which would implement an interface with a Validate
method so I could add the Validate()
call before all possible DB saves:
func (a *Applicant) Validate(res http.ResponseWriter, req *http.Request) error {
requires := map[string]string{
"username": "exists|unique",
"email": "exists|unique|email",
"password": "exists|minLength:8",
"age": "exists|int|gte:18",
"birth_month": "exists|int|in:0-11",
}
return validator.Check(req, requires)
}
Go to JS (in browser validation)
Using the interface-based approach above, I think this could be accomplished with another generator. Good idea. Would expand on my roadmap to write generators for API clients in JS, Obj-C/Swift, Java, PHP, etc..
Admin table fields (eq. --table-fields title,artist)
Sorry, I'm not sure what this one means
Admin search fields (eq. --search-fields title,artist)
Admin search is already present, but its limited to exact-matching text per content type. There is some discussion happening in #51, which would be great to get more ideas going.. maybe I don't fully understand what you mean though.
Admin hidden fields
I have an item.Omittable
interface in a local branch which I will push shortly. It works just like item.Pushable
which expects a []string containing the fields to push, except in this case it omits those fields from Content API responses.
Swappable database backend
This is also something folks have been discussing a bit in the Gopher's #ponzu slack channel.. I wouldn't be the right person to accomplish this, but I agree it could be a nice feature.
Model descriptors
Sorry, I'm not sure what this one means
GraphQL endpoint (dreams)
I have some thoughts on this, and why we don't need it with HTTP/2 and PUSH_PROMISE frames... I think GraphQL is awesome, but when HTTP calls are even cheaper and keep the same TCP connection open, I think the need for fetching data in the GraphQL way is going to be obsolete, unless you are forced to use a SQL database and can't leverage HTTP/2 as much.
Users management with ACL (eq. hydra, dex)
Totally unfamiliar with these, but would like to know how you want to use them.
from ponzu.
Hi @crackcomm - I have not had a lot of time to go through all of these with much thought yet, but fully intend to. Thanks for the ideas!
from ponzu.
I have some thoughts on this, and why we don't need it with HTTP/2 and PUSH_PROMISE frames... I think GraphQL is awesome, but when HTTP calls are even cheaper and keep the same TCP connection open, I think the need for fetching data in the GraphQL way is going to be obsolete, unless you are forced to use a SQL database and can't leverage HTTP/2 as much.
It is not just economy on http requests. This is the small part of what GraphQL about.
- This is also a scheme of a data and functions - think of it as grpc scheme.
- Plus it has declarative language to read data - think of it like SQL.
- It is agnostic to encoding - so you can switch from JSON to msgpack.
- There are tons of frontend libraries that support graphql and will help to build based on it, like relay, apollo etc.
There is also this DB https://docs.dgraph.io/query-language/ which support GraphQL-like syntax out of the box. And this example of what nice tools you get out of the box with GraphQL https://github.com/graphql/graphiql. And more to come https://dev-blog.apollodata.com/new-features-in-graphql-batch-defer-stream-live-and-subscribe-7585d0c28b07
from ponzu.
Closing this issue. No activity and old. Please reopen if need to.
from ponzu.
Related Issues (20)
- CLI is not working HOT 14
- Zap v11 was deleted HOT 14
- go module support HOT 9
- search sort HOT 2
- Custom databases HOT 3
- ponzu 0.11.0 fails to build HOT 2
- The "must" search operator in blevesearch can't be passed into ponzu HOT 1
- NOTICE: original author & maintainer is stepping away from the project HOT 7
- how to change to Summernote
- Redis Support for ponzu
- There is three CSRF vulnerability that can add the administrator account, delete administrator account, edit configuration.
- Only latest tag saving
- Error with "go get..." HOT 6
- Current state of Ponzu HOT 1
- Is this project still maintained? HOT 3
- Suggested install method no longer works HOT 2
- Is Ponzu dead? HOT 10
- Potential goroutine leak in achive.go
- How can you develop addons more efficiently?
- How to setup development env
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ponzu.