EExcel 丞燕快速查詢2

EExcel 丞燕快速查詢2
EExcel 丞燕快速查詢2 https://sandk.ffbizs.com/
顯示具有 StrongLoop 標籤的文章。 顯示所有文章
顯示具有 StrongLoop 標籤的文章。 顯示所有文章

用框架時,要注意

StrongLoop 和 Dreamfactory


1、比較複雜的SQL能不能自定議?  
基本上兩者目前都還在開發中,StrongLoop是beta吧


2、能不能在資料CRUD時,Model自訂檢查?
 這樣後端檢查完就送回前端,雖然最好是前端就要檢查,但實際上,前端檢查完畢後,後端還是要再檢查一次,不然駭客之類可以模擬crul方式送資料,繞過前端檢查,所以最後後端還要檢查,那到不如直接在後端檢查完畢後,送回訊息。

當然如果真的要即時性非常重的話,那還是要先在前端檢查了~~~

3、登入、帳號管理、token?
Dreamfactory一直來都非常的清楚,而StrongLoop現在也清楚多了

4、效能、API、Restful使用?
這只能租主機,然後掛上去,試試看,才能知道,到底效能如何

strongloop now is more better for document

底下是strongloop相關操作

Managing users 管理使用者
https://docs.strongloop.com/display/public/LB/Managing+users



Getting started with LoopBack 怎麼使用loopback
https://docs.strongloop.com/display/public/LB/Getting+started+with+LoopBack



Getting started part II  怎麼使用loopback II
https://docs.strongloop.com/display/public/LB/Getting+started+part+II



Validating model data  資料進資料庫前的驗証
https://docs.strongloop.com/display/public/LB/Validating+model+data


Executing native SQL  自訂義SQL,但還在測試中,不能保障正常運行
--This feature has not been fully tested and is not officially supported: the API may change in future releases.

https://docs.strongloop.com/display/public/LB/Executing+native+SQL

StrongLoop begin

1. http://docs.strongloop.com/display/LB/LoopBack+2.0+release+notes

2. http://docs.strongloop.com/display/LB/Project+layout+reference

3. http://docs.strongloop.com/pages/viewpage.action?pageId=3836281

4. https://github.com/strongloop/loopback-example-app  this is new loopback example,  need to look at this example, can understand how to work loopback.

if see "slc lb", the mean is old loopback 1.0, so don't need to see.

5. https://github.com/strongloop/loopback-example-passport
 http://passportjs.org/guide/oauth/

I try many, so now I think loopback 2.0....is too new,   many docs is not correct. Maybe furture is good or ok, but now for develpoer is no good....

StrongLoop Access Control

http://docs.strongloop.com/display/LB/Controlling+data+access
x  can't use old...https://github.com/strongloop/loopback-example-access-contro

.................l

Ok  http://docs.strongloop.com/display/LB/Creating+and+authenticating+users

1. http://xxx-xxx.rhcloud.com/explorer/#!/Users

2. New User
2.1. Click   POST /Users
2.2. Click to set as parameter value
2.3. Change value:  username 'tt', email 'tt@tt.com' .   Add new "password": "xxx",
2.4. Try it out!      if Response Code = 200 then success.

3. Login User
3.1. before login, try to Click Get /Users/{id} ,  put id = 1, Try it out! get error msg: 401 Authorization Required..... now can sure, not login.
3.2. Click POST /Users/login
3.3.  credentials value input {"username":"tt", "password":"xxx"}
3.4.  if see id , ttl, created, userid then success. id = access token
3.5. copy id value, put access token on page top. click Set Access Token.
3.6. now go back 3.1, try again. now success. login user only can use by self fun.

StrongLoop OpenShift offine-sync TEST

1. https://developers.openshift.com/en/getting-started-client-tools.html#ubuntu

2. http://docs.strongloop.com/display/SL/OpenShift

3.http://xxxx-xxxxx.rhcloud.com/
  http://xxxx-xxxxx.rhcloud.com/explorer/

http://strongloop.com/strongblog/node-js-rest-api-openshift-redhat/?utm_source=tuicool

old : loopback :http://loopback.io/
new : http://strongloop.com/
===========
rhc create-app sl https://raw.github.com/strongloop/openshift-cartridge-strongloop/master/metadata/manifest.yml

rhc show-app xxxxx 查相關資訊
rhc show-app xxxxx --gears quota    查空間
===========
update to openshift, need to install local npm and strongloop
*ubuntu *
1. curl -sL https://deb.nodesource.com/setup | sudo bash -
2. sudo apt-get install nodejs  https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
3. npm install -g strongloop
===========
ALL in LOCAL:
slc loopback:datasource myMongoDB    this is local, not on openshift

if local no file, use rhc git-clone to get file in local. *ps.1

use mongodb : sudo npm install loopback-connector-mongodb --save

** mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/    ......this can't use, please login openshit, then command line:
>echo $OPENSHIFT_MONGODB_DB_HOST
>echo $OPENSHIFT_MONGODB_DB_PORT


  • git mothod  : in local app directory

>git init
>git add -A
>git commit -a -m "Initial Commit"

>git commit -a -m "msg about commit"
>git remote add openshift <remote_git_url>
>git push --force openshift master


ps:
1. if local file failed, use command: rhc git-clone xxx   :: xxx -> app name
2. http://www.codeproject.com/Articles/746155/Deploying-MongoDB-and-Node-js-application-on-OpenS
3. http://docs.mongodb.org/ecosystem/platforms/red-hat-openshift/
-------------
http://strongloop.com/node-js/studio-beta/