Blog: Posts from October, 2013

Labels
AJAX(112) App Studio(7) Apple(1) Application Builder(245) Application Factory(207) ASP.NET(95) ASP.NET 3.5(45) ASP.NET Code Generator(72) ASP.NET Membership(28) Azure(18) Barcode(2) Barcodes(3) BLOB(18) Business Rules(1) Business Rules/Logic(140) BYOD(13) Caching(2) Calendar(5) Charts(29) Cloud(14) Cloud On Time(2) Cloud On Time for Windows 7(2) Code Generator(54) Collaboration(11) command line(1) Conflict Detection(1) Content Management System(12) COT Tools for Excel(26) CRUD(1) Custom Actions(1) Data Aquarium Framework(122) Data Sheet(9) Data Sources(22) Database Lookups(50) Deployment(22) Designer(177) Device(1) DotNetNuke(12) EASE(20) Email(6) Features(101) Firebird(1) Form Builder(14) Globalization and Localization(6) How To(1) Hypermedia(2) Inline Editing(1) Installation(5) JavaScript(20) Kiosk(1) Low Code(3) Mac(1) Many-To-Many(4) Maps(6) Master/Detail(36) Microservices(4) Mobile(63) Mode Builder(3) Model Builder(3) MySQL(10) Native Apps(5) News(18) OAuth(9) OAuth Scopes(1) OAuth2(13) Offline(20) Offline Apps(4) Offline Sync(5) Oracle(11) PKCE(2) Postgre SQL(1) PostgreSQL(2) PWA(2) QR codes(2) Rapid Application Development(5) Reading Pane(2) Release Notes(183) Reports(48) REST(29) RESTful(29) RESTful Workshop(15) RFID tags(1) SaaS(7) Security(81) SharePoint(12) SPA(6) SQL Anywhere(3) SQL Server(26) SSO(1) Stored Procedure(4) Teamwork(15) Tips and Tricks(87) Tools for Excel(2) Touch UI(93) Transactions(5) Tutorials(183) Universal Windows Platform(3) User Interface(338) Video Tutorial(37) Web 2.0(100) Web App Generator(101) Web Application Generator(607) Web Form Builder(40) Web.Config(9) Workflow(28)
Archive
Blog
Posts from October, 2013
Sunday, October 20, 2013PrintSubscribe
Placing a Code On Time App under Source Control

Suppose that we have an application called “Northwind” that we need to place under source control with Microsoft Team Foundation Service (TFS).

Web apps created with Code On Time are contained in a single folder and organized by project type under My Documents\Code OnTime\Projects.

Location of the Northwind project.

The folder that needs to be synchronized is located at ~\My Documents\Code OnTime\Projects\Mobile Factory\Northwind in the picture above.

TFS organizes projects and assorted files into groups called “team projects”, which are themselves organized into collections. We will need to connect the ~\My Documents\Code OnTime\Projects\Mobile Factory\Northwind folder to a specific folder inside of a team project. The picture below shows the server folder organization in Source Control Explorer of Visual Studio after the project is added to TFS.

Note that Mobile Factory and Web Site Factory apps are contained under a master folder with the same name as the application project. The master folder also stores the Visual Studio solution file for the project. This is how TFS organizes projects of these types.

Folder layout in the TFS server.

Every other project type does not have a master folder. The Visual Studio solution file is stored directly in the project folder.

The Visual Studio solution file is stored directly in the project folder.

Let’s create a project and add it to the Team Foundation Service.

You will need to open a new TFS account if you do not already have one.

Connecting a Project to Team Foundation Server

Create a new web application. When complete, open the project in Visual Studio. Open the Team Explorer toolbar, typically available in the same window as the Solution Explorer. Click on the Connect icon on the toolbar to connect to team projects.

Connecting to a team project in Visual Studio.

Select the “Connect” link to activate the Connect to Team Foundation Server window. Click on the “Servers…” button.

Adding a TFS server.

Press “Add…”, and enter the URL of your server in the textbox.

Specifying the URL of a team foundation server to add to Visual Studio.

Press OK to save the server. You may need to log in to access the server. If there are no errors, press Close to close the Servers window, select the team project in the Team Projects list, and press Connect.

Adding the Solution to Source Control

Switch back to the Solution Explorer tab. Right-click on the solution, and press Add Solution to Source Control.

Adding a solution to source control.

Select the Team Project in Add Solution to Source Control window. Create a new folder to organize your projects and specify a name for the solution folder that the web app will be saved in. Press OK to add the solution.

Specifying the location on the team foundation server that the project will be saved to.

To perform the initial check-in, right-click on the solution in the Solution Explorer and press “Check In…”.

Checking in the project.

The Team Explorer window will be activated. Enter an optional comment.

Entering an optional revision comment.

Visual Studio will decide on its own which files will be under source control. There are several files that need to be excluded or included under source control. This will depend on the project type.

Application generator maintains several XML files that describe the application design. Some of the files are not necessary for the application to run and do not need to be placed under source control.

Excluding Files in Mobile Factory or Web Site Factory

Visual Studio will decide to include all project files in a Mobile Factory or Web Site Factory project.

Click on “Go to All Changes”, hold Ctrl, and select the following files in the list:

Application.Baseline.xml
Application.Cache.xml
Application.Log.xml (if present)
Controllers.Baseline.xml
Controllers.Cache.xml
Controllers.Log.xml (if present)
DataAquarium.Metadata.xml

Right-click, and press Exclude.

Excluding the project files from source control.

Excluding Files in Web App Factory, Azure Factory, DNN Factory, and SharePoint Factory

Web App Factory, Azure Factory, DNN Factory, and SharePoint Factory require the inclusion of essential project files.

Under the Excluded Changes section, click on “Detected:…”.

Clicking on "Detected..." to include several files that are excluded by default.

Select only the following items: “ClientLibrary.*.txt”, “DataAquarium.Project.xml”, and “DataAquarium.Version.xml”.

Including the correct files so that the app generator can still handle the project.

Press Promote to add the files to the pending changes.

Committing the Revision

Press the Back icon on the Team Explorer toolbar, and then press Check In.

Checking in the project.

The project code is now under control of Team Foundation Server.

Activating Project Synchronization

Start the web app generator. Click on the project, and select Sync.

Selecting Sync option in the Project Actions page.

Enter your user name and password in the relevant fields. If you have not yet created an account, enter your purchase email and activation code.

Entering username and password in order to configure synchronization.

Press Save, and the web application generator will proceed to upload your project.

Note that your account must be marked as an Account Owner or Project Manager in Code On Time Account Manager in order to add a new project.

Now, the other team members can get the latest version of the project from Team Foundation Service and establish synchronization of Project Designer change logs.

Adding New Project Members

In order for other team members to work on the same project, they must be added to the Team Project in TFS and the synchronization service account.

First, navigate to https://manage.codeontime.com and proceed to log in.

d

Navigate to the Users page. On the action bar, select New User.

Adding a new user to the account.

Enter the user details. Make sure to mark the user as enabled. Also select the checkbox next to the project name.

Specifying details for the new user account.

Press OK to save the new user account. Select Activation Code | Email action on the action bar to send the personal activation code to the user.

Emailing the personal activation code to the new user.

Note that personal activation code is different from the Code On Time product activation code. The personal activation code will allow developers to activate the app generator and synchronize Project Designer changes.

Next, navigate to URL of your team foundation service. In the top-right corner of the page, click on the Gear icon.

Selecting the Gear icon in TFS website to access settings.

Navigate to the Team of the project, and click on “View the team administration page”.

Accessing the team administration page.

In the list of Team members, press Add… | New User.

Adding a user to the project.

Type in the Windows Live ID of the new user, and press Save Changes.

Adding a user to the project.

The user will now have access to the project stored in Team Foundation Service.

Getting Code on the Project Member Computer

The team member must start Visual Studio and log into the TFS server using the their own credentials. The following steps will need to be performed.

In the menu, press File | Source Control | Advanced | Workspaces….

Managing workspaces from Visual Studio.

Press Add… in the bottom left corner.

If the project type is Mobile Factory or Web Site Factory, two mappings are needed. The first mapping will correctly place the solution file in the ~\Code OnTime\Solutions folder. The second mapping will place the code under the ~\Code OnTime\Projects folder.

Adding two working folders. One is for solution and the other is for the project.

If the project type is Web App Factory, Azure Factory, DotNetNuke Factory, or SharePoint Factory, only one folder needs to be mapped to ~\CodeOnTime\Projects\PROJECT_TYPE\PROJECT_NAME.

Source control mapping for Web App and Azure Factory projects.

Press OK to save the mappings.

When Visual Studio prompts to download the source code files, confirm and wait for the download to finish.

Visual Studio downloading the source code.

Once the download is complete, switch back to the app generator and refresh the start page by pressing F5. Click on the newly added project and press Sync. Add your credentials and press Save.

Saving synchronization settings for the project.

The generator will proceed to download the latest version of the web application revisions and refresh the project.

Press Design to activate the Project Designer or Generate to view the application in a browser.

Saturday, October 19, 2013PrintSubscribe
Sharing Work with Other Developers

Code On Time’s synchronization service is designed to work in unison with Team Foundation Service and other application lifecycle management systems. Let’s see an example of a typical workflow involving TFS and Code On Time synchronization service.

Synchronizing

Any changes done in the Project Designer must be committed to the synchronization service in order to share them with other team members. App generator will prompt to synchronize changes when the developer leaves the Designer if any uncommitted changes are detected.

For example, in the Project Explorer, drop Employees page node on the right side of Home page.

Dropping Employees page node on the right side of Home page.     Employees page is placed after Home page.

On the Project Designer toolbar, press Exit. Changes will be detected and the synchronization prompt will be displayed.

Entering notes for the revision and committing.

Enter notes for the revision, and press Yes to commit. The comment has been copied to the clipboard if the checkbox “Copy notes to clipboard” has been selected. When complete, continue to regenerate the web app.

Open the project in Visual Studio and activate the Team Explorer window. Notice that one file has changed. In the comment box under the Check In button, press Ctrl+V to paste the comment from the clipboard. Then press Check In.

Committing code base changes in TFS.

Updating

Start the app generator, select the project, and activate the Project Designer. The generator will contact the synchronization service to find any new revisions not available on the computer. If there is a new revision available, a prompt to update will be displayed.

The generator has detected a new revision.

Press Yes to download the latest revision. The generator will download new Project Designer revisions done by other developers. Then it will automatically refresh the project. The Project Designer will open when refresh is completed.

If you generate or browse the project, then only Designer changes will be reflected in the app. If the other team members are writing code business rules or creating additional modifications of application framework, then you may need to get the latest version of the source code.

Press Develop on the Project Designer toolbar to open the project in Visual Studio. In the Solution Explorer, right-click on the solution and press Get Latest Version (Recursive).

Updating the code base to the latest version.

Visual Studio will proceed to download the latest versions of any modified business rules, user controls, and stylesheets.

At this point, you are guaranteed to have the latest version of the application source code.

Continue to regenerate the application by pressing Browse on the Project Designer toolbar.

Saturday, October 19, 2013PrintSubscribe
Creating a Team Foundation Service Account

TFS organizes Visual Studio projects and other miscellaneous files into folders called “team projects”, which are themselves organized by collection. Code On Time apps are standard Visual Studio projects, which allows using TFS to keep track of source code changes. All you need is a Team Foundation Service account.

It is easy to sign up for a new Team Foundation Service account.

Start your browser and navigate to http://tfs.visualstudio.com. Click on “Sign up for free” link.

Specify a URL for your Team Foundation Service and press Create Account.

Specifying an Account URL for a new TFS account.

When complete, you will be redirected to the TFS start page.

To begin, click on the “New team project” button.

The start page for TFS.

Specify a name, and press Create Project.

Creating a new team project in TFS.

Your “team project” is now ready.