QuickStart - dfryan/dreamfactory GitHub Wiki
The QuickStart utility was designed to assist a developer in quickly building an application on their DSP.
The first step is to enter an app name, followed by selecting the type of application you will be building. A Web application is hosted on the local or remote file storage. Some developers prefer to edit all of their HTML, CSS, and JavaScript files on their local computer and then upload them to the DSP for deployment. This option makes debugging simpler and allows the use of desktop development tools.
When Web is selected the next step is to decide where the development of the application is going to occur on the developers local machine or by editing code inside the web browser. When develop on the local computer is select the developer will be provided the option to download the DreamFactory SDK. When developed inside the browser is selected, the developer will see a button to launch the application by pressing this button the user will see the application in preview mode. To edit the hosted files, press the folder icon. In the file editor you will see the "index.html" file. This has some example code to help the developer get started calling the services. There is also a "ReadMe" file with additional information.
A native application will use a native device (iOS, Android, Windows 8RT) to store applications. Some developers edit the hosted application files in the Admin View. This option allows the app to be run immediately. Please consult your native device development environment for the best way to make REST API calls to the DreamFactory Services Platform. You can select either JSON or XML documents for request and response. The details of technical integration are explained on the "API / SDK" tab at left integrated into the DSP. This API/SDK shows the available services and example transactions along with detailed documentation.
What is the SDKThe DreamFactory Javascript SDK Requires version 1.1 or above of the DreamFactory Services Platform. The SDK is a convenience wrapper for all the methods you can use with our REST API. It's also a LIVE API, meaning any services you add in the DreamFactory Admin View will be available the next time your application is loaded.
The SDK contains your REST endpoint and API key already inside, so no configuration is needed. Just start coding.
You can see the "df" object in your debugger. Underneath "df.apis" you'll see all the available resources and methods simply by opening up the DOM inspection tab and scrolling down to the "df" object. As a global object, it's attached to the window object. For example, using Chrome's Dev Tools, simply open the console and start typing "window.df.apis" and its typeahead will display all the methods and properties.
Use of this SDK on the file system requires "*" to be in your list of allowed hosts in the CORS configuration section of the Admin app.
To deploy the DSK unzip the file into a local folder to create a workspace for building your application. To get started run the "index.html" file in a browser, we have included example code there to help you get started calling the services. There is also a "ReadMe" file with additional information.