A repository containing the code needed to extend Blackbaud CRM's Fundraiser on the Go SKY-based mobile app.
Follow these instructions to enable your development machine to create and extend Blackbaud SKY-based mobile apps.
-
Install nodeJS 6.10.0, leaving all options as the default.
-
Edit
npmrc
to change node to be global instead of per user.- Go to
C:\Program Files\nodejs\node_modules\npm\npmrc
. - Edit
npmrc
to readprefix=c:\nodejs
.
- Go to
-
From a Windows command prompt with Administrator rights, run the following command. This sets the npm cache to a location that is available for all users.
npm config set cache C:\npmcache --global
Note: Keep this command prompt window open. We will be using it multiple times.
-
Access the Advanced System Properties dialog and select Environment Variables.
-
If the directory exists, add
C:\Program Files\nodejs
to the User PATH environment variable. Otherwise, useC:\nodejs
. Additionally, addC:\nodejs
to the System PATH variable. -
Update
npm
by running the following command.npm update -g npm
-
Install Grunt by running the following command. The command prompt will display a progress bar and then let you know it's completed.
npm install -g grunt-cli
-
Install Git 2.12.0.windows.1, leaving all options as the default. Git is a source control used by different parts of our product.
-
Install Bower. Bower is a package manager for various frameworks including Javascript. Like Grunt, Bower will show a progress bar and then notify you when it completes.
npm install -g bower
-
Open the Git command prompt, found in the Windows Start Menu and run the following command. This configures Git to allow long file paths.
git config --global core.longpaths true
Note: This is necessary because Bower uses the temp directory to store the packages before removing ignored files, and there can be files that are too long for Windows that cause the build to fail.
-
Restart so the environment variables are set for the build. Logging out does not work.
-
Install CRM using a Blackbaud-issued installer.
-
Modify
web.config
to search for custom directories. The default isbin\custom
. -
Download Fundraiser on the Go code from the Blackbaud GitHub.
-
Build
Blackbaud.CustomFx.Frog.Catalog
andBlackbaud.CustomFx.SkyUI
and place the DLLs in the custom folder within your virtual directory. -
Open
gruntfile.js
in theBlackbaud.AppFx.MajorGiving.Mobile.Sky
directory and modify thevroot
variable to your local installation's virtual directory root. -
Open
crm.custom.js
in theBlackbaud.AppFx.MajorGiving.Mobile.Sky\src\api
directory and modify the methods there to the versions below. This flips a software switch that will enable the code to function as a stand-alone custom installation rather than the out-of-box version that we build. You will also have to remove the injection ofcustomizableRoot
, since it is no longer used after this change.getRootFolder: function () { return 'frogger'; }
isCustomApp: function () { return true; }
-
Open an administrator command prompt and run the following series of commands:
npm install bower install grunt buildcustom
Note: It is not recommended to run
grunt build
, even though it is a registered task with Grunt. This will irreversibly overwrite your out-of-box Fundraiser on the Go instance. -
Access installation by navigating to: https://<application root>/browser/htmlforms/custom/frogger/?databaseName=BBInfinity
-
To rebuild and redeploy the code after making changes, simply re-run
grunt buildcustom
from an administrator command prompt.Note: Depending on what changes you make in your local development environment, it's possible that code in deleted files could still be deployed in your test builds. This is because the
/build
and/tmp
folders in theBlackbaud.AppFx.MajorGiving.Mobile.Sky
directory still contain these files if they were present in a previous build. To ensure you are deploying the most recent version of the code in your local workspace, delete these folders, then rungrunt buildcustom
from an administrator command prompt.
The following sections are a primer to help you understand the different components of Fundraiser on the Go and some basic ways that they can be customized or extended. This is by no means a comprehensive guide.
Behind Fundraiser on the Go is a variety of standard Infinity components, such as DataList
s, SearchList
s, and DataForm
s like those with which many developers are accustomed. These components allow Fundraiser on the Go to interact with the CRM web server and database. We did not open source that part of the code, but you will see references to many of these components baked in to the javascript, particularly in the frog.api
module.
We have included an empty catalog for you to use to house any custom Infinity components you may need to support your extensions. Simply place them in Blackbaud.CustomFx.Frog.Catalog
like you would any other spec. They still need to be loaded into the database via LoadSpec
, compiled, and sent to the virtual directory using Visual Studio.
Once you have added any custom Infinity components, you will need a way for Fundraiser on the Go to interact with them. You'll find these API calls in Blackbaud.AppFx.MajorGiving.Mobile.Sky
's src/api
folder. We've organized different API calls by function to make the collection more manageable.
There are many places, especially in javascript controllers, in which the default behavior can be overridden. To specify such a method or property, you must add it to crm.customizable.js
. This factory, a part of the main frog.api
module, is available everywhere the API is available. Here, add the properties or methods you wish to use and specify their default behavior. We'll override it in another file.
yourFunctionName: function() {
// Out of box code for your function
}
Once that is complete, turn your attention to crm.custom.js
. Specify a method or property with the same name and signature as before, but this time define the custom behavior you wish it to have. Now, you can call this method from anywhere that the API is available simply by invoking:
customizable.yourFunctionName();
We built it this way to make application-wide functionality easier to manage. For example, one change in crm.custom.js
to call the method found in crm.customizable.js
instantly reverts all references to it to use standard behavior.
Found in the Blackbaud.AppFx.MajorGiving.Mobile.Sky
solution in the src/views
folder, these javascript components provide a bridge between your CRM installation and the HTML-based Fundraiser on the Go UI. These controllers are analogous to UIModel
event handler classes found in conventional Infinity development in that they control the behavior of the component that it represents. This time, the code is executed in the client browser rather than on the web server.
It is possible to override functions within our controllers or to create your own controller entirely. Typically, objects that are to be displayed in the UI (or those that influence how those objects are displayed) are stored in the locals
variable within the controller. They can then be referenced in the corresponding HTML by referencing locals.objectName
.
Found in the code base alongside their respective controllers, HTML views dictate layout and, to some degree, behavior of the UI. Here, you can use a mix of HTML and Angular to build your UI, using components made available in the controller behind it. In the code, you will find HTML forms of varying complexities, as well as several different types of controls that are made available via the SKY UX framework. For more information on what controls are available, please visit the Blackbaud AngularJS (1.x) documentation page, linked in the Resources section.
To see these techniques in action, be sure to view our fork in the Blackbaud Community containing a comprehensive code sample. The sample demonstrates best practices for customizing Infinity components, API call wrappers, javascript controllers, and the HTML front end.
Follow these instructions to deploy your finished product into staging or production environments.
Deploying customized Fundraiser on the Go code is very similar to current processes. Just follow these steps below.
- Deploy Infinity specs using a
PackageSpec
. For more information, consult the Infinity SDK Guide. - Deploy the latest versions of the
Blackbaud.CustomFx.Frog.Catalog
andBlackbaud.CustomFx.SkyUI
DLLs to the custom folder within your virtual directory. Some customizations will require changes to these assemblies. - Deploy the compiled Fundraiser on the Go code, found within the
/build
folder, to thebrowser/htmlforms/custom/frogger/
folder within your virtual directory. - Reset your web server.
Please contact Blackbaud to get your finished product deployed. We will use the same process that we currently use for standard Infinity customizations.
Please see the accompanying LICENSE file to review the MIT OSS License that comes with this code.
Please refer to the Developer Terms document for a complete description of the terms and conditions.
To contribute to this code base, you need to sign the Contributor License Agreement.
Blackbaud AngularJS (1.x) documentation
Fundraiser on the Go is built on SKY UX 1, which uses AngularJS 1. Here, you'll find helpful documentation that will show what controls and functions are available through the framework as well as design standards and recommended best practices.