Aspire Design Guidelines

satya - Wednesday, February 15, 2012 10:34:05 AM

See SQL design guidelines here

See SQL design guidelines here

satya - Wednesday, February 15, 2012 10:35:57 AM

qualify updates to all tables with logged in userid

this will help with any inadvertent updates from one user updating content from another. This is the last lien of defense. Hopefully the protection is applied at the URL level as well before it even gets this close. Do this also with deletes.

satya - Wednesday, February 15, 2012 10:36:58 AM

Provide a heading like this at the top of the file


<!--
**********************************************************
* file: delete-folder-view.html
* Module: delete a folder
* based on: notes-imp-titles.html
* directory: /reports/folder-views/
**********************************************************
-->

satya - Wednesday, February 15, 2012 10:37:44 AM

Mark sections like this


<!--
**********************************************************
* doc-title: start
**********************************************************
-->

<!--tag_bgn capture doc-title -->
<title>kf/{{ownerUserId}}: {{folderName}}</title>
<!--tag_end capture doc-title -->

<!--tag_bgn capture doc-display-title -->
Do you want to delete folder "{{folderName}}"?
<!--tag_end capture doc-display-title -->

<!--
**********************************************************
* doc-title: end
**********************************************************
-->

satya - Wednesday, February 15, 2012 10:45:35 AM

In a properties file use this header


###################################
# file: delete-folders.properties
# based on: folder-views.properties
# directory: /reports/folder-views/
# Module: delete a folder
###################################

satya - Wednesday, February 15, 2012 1:15:17 PM

In every URL document its arguments. Example


###################################
# DeleteFolderURL: Inner Master page version
# args: folderId(M) 
###################################

satya - Saturday, February 18, 2012 10:59:38 PM

Read URL guidelines


1. Validate mandatory params
2. Data exists
3. You are authorized to the data

satya - Monday, February 20, 2012 10:16:13 AM

You have access to these javascript functions: use them


escape
encodeURI
encodeURIComponent

urlEncode
escapeDoubleQuotes

Find out what they are and how to use them

satya - Monday, February 20, 2012 10:18:29 AM

Use different prefixes for browser and serverside variables


bArg1
bArg2
Arg1 (server side)
Arg2 (server side)

satya - Friday, February 24, 2012 2:17:09 PM

Do most of your work with id's and not names

Do most of your work with id's and not names

satya - Mon Apr 16 2012 14:31:49 GMT-0400 (Eastern Daylight Time)

Use a log statement like this


AppObjects.trace(this,
                  "Creating a new insert statement for %1s", 
                  f.tablename);

satya - Mon Apr 23 2012 11:53:59 GMT-0400 (Eastern Daylight Time)

You may want to prefix your constants ex:


public static final String C_COLUMN_NAME_SEGMENT = "akclist_columnnamessegment";
public static final String C_COLUMN_VALUE_SEGMENT = "akclist_columnvaluessegment";

This will let you do CTRL-SPACE in eclipse after you type "c_".

satya - Mon Apr 30 2012 09:38:19 GMT-0400 (Eastern Daylight Time)

here is an example of using escapeDoubleQuotes


function gotoGoogle()
{
   text = "{{escapeDoubleQuotes(report_short_name)}}";
   url = "http://www.google.com/search?hl=en&q=" + escape(text);
   document.location=url;
}

satya - Fri May 25 2012 13:56:47 GMT-0400 (Eastern Daylight Time)

Here is a nice java pattern


class InputMethodState {
        Rect mCursorRectInWindow = new Rect();
        RectF mTmpRectF = new RectF();
        float[] mTmpOffset = new float[2];
        ExtractedTextRequest mExtracting;
        final ExtractedText mTmpExtracted = new ExtractedText();
        int mBatchEditNesting;
        boolean mCursorChanged;
        boolean mSelectionModeChanged;
        boolean mContentChanged;
        int mChangedStart, mChangedEnd, mChangedDelta;
    }
InputMethodState mInputMethodState;

satya - 4/14/2014 1:33:42 PM

Another example of a properties file header


#############################################
# file: public-upload-test.properties
# directory: /reports/upload
# full file: /reports/upload/public-upload-test.properties
# Date: 4/14/2014
#
# Purpose
# *************************** 
# Test File Upload for Public
# Dave asked for this
#
# References: 
# *******************
# http://satyakomatineni.com/item/4791
#
#############################################