Comments (18)
- 字段默认是随机生成的,其实也可以自定义或者加别名,因为较复杂,所以会在开发者模式下提供,「开发者模式」未来会逐步开放出来
- 导入导出这个也在计划中了
- 表格刷新按钮(包括定时刷新)可以考虑,之后的版本会提供
from nocobase.
- 表单中某些字段的其他配置参数比如不可编辑仅显示等等是支持的,不过暂时没有开放出来
- 表格中操作按钮根据条件显示,在大部分场景下并不需要,所以暂时还没有考虑这部分的配置
需要权衡普通用户和开发群体的使用成本,有些配置参数并没有开放出来,目前的打算,类似的一些复杂的只有开发才会用到的,就统一放在开发者模式下,但是参数弄的太多也容易增大学习成本
可以肯定的是,会结合大家的体验和反馈不断改进和优化的~
from nocobase.
server端建议了解下https://github.com/cellbang/malagu
和低代码非常搭,低代码server比较重,单单基于koa还是有点不够用。
malagu 整体看下来,好像不是特别有感觉,思路也不一样。
NocoBase 的 server 比较纯粹,主要是集中提供 db 操作,这可能是你说的有点薄的原因之一。Server 是基于 koa 的,也可以看做是一个中间件,如果需要更强壮的 WEB 框架,这条线还有 eggjs 和 midwayjs 这些相似生态产物可以集成。
NocoBase 的 Server 不会提供 MVC 或 Router 之类的东西。这点需要理解 NocoBase 的 WEB API 设计:
基于资源(resource)和操作方法(action)设计,将 REST 和 RPC **融合起来。
以用户资源为例:
// 常用的 REST API
api.resource('demos').list();
api.resource('demos').create();
api.resource('demos').get();
api.resource('demos').update();
api.resource('demos').destroy();
// 扩展的非 REST 风格的 API
api.resource('users').login();
api.resource('users').register();
api.resource('users').logout();
api.resource('users').export();
和常规的 Router 区别在于
- 可以不用纠结怎么设计 route,是否要符合 rest,uri 和 request method 怎么对应等等
- 提供的是 action,而不是 controller
- 基于 resource 和 action 风格统一、易于扩展
- 可注册、替换的 Middlewares 和 Actions
- 提供灵活的多来源 Action Params 合并方案(这里的设计非常巧妙)
更多内容可以查看文档(文档还不完善,不过也能大致看看) https://docs.nocobase.com/cores/packages/resourcer
来段示例代码,如:
import { Application } from '@nocobase/server';
const api = new Application({
database: {},
resourcer: {},
});
// 配置数据表
api.database.table({
name: 'users',
fields: [
{ type: 'string', name: 'username' },
{ type: 'password', name: 'password' },
],
});
await api.database.sync();
app.listen(3000);
简单的几行代码就可以运行起来一个 WEB 服务器,对应的
HTTP API:
GET http://localhost:3000/api/users
POST http://localhost:3000/api/users
GET http://localhost:3000/api/users/1
PUT http://localhost:3000/api/users/1
DELETE http://localhost:3000/api/users/1
内置提供了基础的 REST API,除此之外可以自行扩展,如
api.resourcer.registerAction('users:login', async (ctx, next) => {
});
对应的 HTTP API:
POST http://localhost:3000/api/users:login
from nocobase.
另外表格中按钮的没有设置显示条件,如某一字段值为a时,显示操作按钮1,值为b时显示操作按钮2
表单中某些字段不可编辑仅显示,在视图添加字段时设置可以编辑与否等
from nocobase.
期待开发者模式的到来。比如楼主所说的可以自定义表明、列名。那就完美了!
就现在我体验下来来说,各种操作都很友好,方便。
特别是查询筛选功能,很完善!
from nocobase.
发现宝藏项目,非常看好,前端配合formily是亮点,但server端是否有点薄?插件开发是否继续抽象,简化业务无关代码编写。能否建立讨论群?
from nocobase.
resource('users'),这样的方式,是否会把路由绑死,如果开发cms插件,需要外部访问api怎么办?
from nocobase.
发现宝藏项目,非常看好,前端配合formily是亮点,但server端是否有点薄?插件开发是否继续抽象,简化业务无关代码编写。能否建立讨论群?
- 这几个月在重点支持前端的可视化配置,还在进行中(develop 分支),可视化完全基于 Formily 2.0 做的扩展,非常灵活
- server 还只弄了一半,插件这部分也还没完全好。弄好可视化配置之后,会重点来完善这部分内容
api 的问题,resource 是针对内部数据的,比如(伪代码):
import API from '@nocobase/sdk';
const api = new API({
baseUrl: 'http://localhost:3000/api'
});
await api.resource('demos').list();
await api.resource('demos').create();
await api.resource('demos').get();
await api.resource('demos').update();
await api.resource('demos').destroy();
至于外部的
api.request({
url: 'http://www.example.com',
method: 'post',
});
这部分会在后续弄 SDK 的时候一起完善,还有之前版本,数据对接比较死板,用的 api.resource 的形式,新版改进了,可以随意自定义了。
from nocobase.
现在关注的人不多,打算以后人更多之后再弄个讨论群,现在,大家可以 issue 或 email 给我们~
from nocobase.
server端建议了解下https://github.com/cellbang/malagu
和低代码非常搭,低代码server比较重,单单基于koa还是有点不够用。
from nocobase.
我思路被MVC模式限制住了,前后端一体化应该有新的**和方法,期待项目发展
from nocobase.
这个确实是目前看到的体验和逻辑最好的低代码平台之一
from nocobase.
3季度马上要结束了,beta版要发布吗? @chenos
from nocobase.
3季度马上要结束了,beta版要发布吗? @chenos
我们下一个版本已经基本准备完毕,但依然是预览版,beta 版本要等到明年。
即将发布的版本主要提供全新的可视化配置界面、大幅改进的内核构建、初步的开发文档、公开的路线图以及 SaaS 插件。
这个版本的预览 demo 将通过 SaaS 方式提供,考虑到国庆假期的在线响应问题,我们计划推迟到国庆假期后发布。
from nocobase.
3季度马上要结束了,beta版要发布吗? @chenos
我们下一个版本已经基本准备完毕,但依然是预览版,beta 版本要等到明年。
即将发布的版本主要提供全新的可视化配置界面、大幅改进的内核构建、初步的开发文档、公开的路线图以及 SaaS 插件。
这个版本的预览 demo 将通过 SaaS 方式提供,考虑到国庆假期的在线响应问题,我们计划推迟到国庆假期后发布。
墙裂支持,期待saas方式的demo!!!
from nocobase.
server端建议了解下https://github.com/cellbang/malagu
和低代码非常搭,低代码server比较重,单单基于koa还是有点不够用。malagu 整体看下来,好像不是特别有感觉,思路也不一样。
NocoBase 的 server 比较纯粹,主要是集中提供 db 操作,这可能是你说的有点薄的原因之一。Server 是基于 koa 的,也可以看做是一个中间件,如果需要更强壮的 WEB 框架,这条线还有 eggjs 和 midwayjs 这些相似生态产物可以集成。
NocoBase 的 Server 不会提供 MVC 或 Router 之类的东西。这点需要理解 NocoBase 的 WEB API 设计:
基于资源(resource)和操作方法(action)设计,将 REST 和 RPC **融合起来。
以用户资源为例:
// 常用的 REST API api.resource('demos').list(); api.resource('demos').create(); api.resource('demos').get(); api.resource('demos').update(); api.resource('demos').destroy(); // 扩展的非 REST 风格的 API api.resource('users').login(); api.resource('users').register(); api.resource('users').logout(); api.resource('users').export();和常规的 Router 区别在于
- 可以不用纠结怎么设计 route,是否要符合 rest,uri 和 request method 怎么对应等等
- 提供的是 action,而不是 controller
- 基于 resource 和 action 风格统一、易于扩展
- 可注册、替换的 Middlewares 和 Actions
- 提供灵活的多来源 Action Params 合并方案(这里的设计非常巧妙)
更多内容可以查看文档(文档还不完善,不过也能大致看看) https://docs.nocobase.com/cores/packages/resourcer
来段示例代码,如:
import { Application } from '@nocobase/server'; const api = new Application({ database: {}, resourcer: {}, }); // 配置数据表 api.database.table({ name: 'users', fields: [ { type: 'string', name: 'username' }, { type: 'password', name: 'password' }, ], }); await api.database.sync(); app.listen(3000);简单的几行代码就可以运行起来一个 WEB 服务器,对应的
HTTP API:
GET http://localhost:3000/api/users POST http://localhost:3000/api/users GET http://localhost:3000/api/users/1 PUT http://localhost:3000/api/users/1 DELETE http://localhost:3000/api/users/1内置提供了基础的 REST API,除此之外可以自行扩展,如
api.resourcer.registerAction('users:login', async (ctx, next) => { });对应的 HTTP API:
POST http://localhost:3000/api/users:login
那是否可以考虑一下java端的微服务来作为后端,毕竟在商业化领域,使用java的人太多了,使用java能增加概率被更多的大公司进行引用,也更容易推广开来。
from nocobase.
后端接口的话,建议做成API规范.
接口文档出来后,后端直接对应实现即可。
from nocobase.
建议表单字段增加联动功能,比如设定公式 总金额=单价字段*数量字段等。
表格查询筛选可以增加一个所有字段的模糊搜索功能。
from nocobase.
Related Issues (20)
- S3 Compatible like DigitalOcean spaces or Minio Configuration
- Form (add new) Associated get undefined error
- Cannot create new field in collection on v0.21.0-alpha.1 HOT 5
- Error href tags for apps custom name HOT 2
- After the Gantt chart is refreshed, the time display area is not refreshed and the previous time block is still retained HOT 1
- Duplicate record same when we set data scope on table HOT 3
- 0.21.a.6编译错误 HOT 3
- Series of bugs when using a tree table connected to an associated record of the main entity inside an edit drawer of the main entity HOT 1
- Render Failed when enabling the allow add new option to a column of type record picker inside a sub table bounded to a tree collection association HOT 1
- Validation error on upgrade HOT 1
- Phone numder field format verification
- App error - Collection model roles has no primary key attribute HOT 1
- Inherited Model Not Triggering Workflow Based on Base Model in v0.21.0-alpha.7 HOT 2
- Many to many Intermediate table not showing HOT 2
- 文件管理器支持OSS私有权限控制吗? HOT 1
- 会有规划实现OSS文件前端直传吗?
- Created by/Last updated by not set updating Datetime when save-mode is "Insert if not exists[, or update]" HOT 2
- Bug: Upload Service Error: when uploading attachment to S3 HOT 4
- 【BUG】应用在多副本部署时偶尔报错404 HOT 2
- 【BUG】导出表格内容不完整 HOT 1
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 nocobase.