我最近遇到了Web Intents,特别是Twitter.
我正在寻找(并且找不到)Facebook是否有这样的API,特别是发布到组(公共组)和发布到某些(公共)墙.
但它们都没有链接到Grails 2.0的书(所有1.2或更早版本)
我目前正在使用grails入门,第二版是infoQ,但是它引用了Grails 1.2而我使用的是2.0,并且似乎存在声音差异
你能推荐一本更新的书吗?
谢谢!
我一直在尝试选择哪种技术用于REST应用程序,并找到了4个候选者:
但是未能区分四者并选择其中一个,哪个最好?标准是:
a.稳定性\成熟度
b.安全
c.易于使用
d.支持
谢谢!
我是Grails noob所以请原谅我的noob问题.
我已经创建了一个域类User和Device.用户有许多设备:设备和设备属于用户:用户.
重要的是,只有一个设备永远不会属于两个用户,因此我的UserController代码如下所示:
class UserController {
static allowedMethods = [create: 'POST']
def index() { }
def create() {
def user = User.findByUsername(request.JSON?.username)
def device = Device.findById(request.JSON?.deviceId)
if (device) {
device.user.devices.remove(device)
}
// device can only be owned by 1 person
def new_device = new Device(id: request.JSON?.deviceId, type: request.JSON?.deviceType)
if ( !user ) {
user = new User(
username: request.JSON?.username
)
user.devices = new HashSet() // without this I get null on the add in next line
user.devices.add(new_device)
user.save()
if(user.hasErrors()){ …
Run Code Online (Sandbox Code Playgroud) grails grails-orm grails-controller grails-domain-class grails-2.0
似乎设备对象在Android上未定义.它在模拟器,iOS设备和iOS模拟器中定义
显然我正在检查window.device(并尝试了Window.device的所有变种,window.Device等),并且始终未定义 - 但仅限于真正的Android设备.它适用于所有其他方案.
请帮忙.