Deployment

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
Deployment
Friday, March 30, 2012PrintSubscribe
Azure Factory

With the release of Windows Azure, Microsoft has provided a great cloud database, storage, and computing service platform. Windows Azure offers many benefits, such as guaranteed 99.95% uptime, automatic OS and service  patching, integrated network load balancing, and easy scaling.

While the Windows Azure cloud may offer the perfect platform to deploy your next web application, you still need to build this application. This is where Code On Time’s Azure Factory comes in. All you have to do is paste in your SQL Azure database connection string, and hit Generate. In a minute, your advanced web application will start in your default browser, complete with sorting, adaptive filtering, reporting, charts, and much more. Hit Publish, and the application will be packaged. Upload the published deployment package to Windows Azure, and within minutes you’ll have your app running in the cloud.

Need to add more features and customize your app? Just use the easy to use Designer to make necessary changes to the logical definition of the application. While no coding is needed to make a great app, you can always open the source code in Visual Studio and change it to precisely fit your requirements.

The following article will explain how to generate and deploy an Azure Factory application. View our learning system if you need help setting up a Windows Azure account, creating a database server, or creating a database using SQL Azure tools.

Generating the Azure Factory Project

Launch the web application generator, and create a new project. Choose Azure Factory.

Create a new Azure Factory Project

Give this project the name of “AzureFactory”. Pick the programming language of your choice. Press Create to create the project.

New Azure Factory project with name of 'AzureFactory'

On the next page, you can specify your namespace. We’ll leave the default of “MyCompany” and continue to the next page of the wizard by pressing Next.

New Windows Azure Project screen

This page requires you to specify a database connection. Click on the “…” button next to the Connection String field to configure the string.

In the Server field, enter the database’s Fully Qualified DNS Name. This can be found in the Properties of the server when using Windows Azure Management Portal.

Fully Qualified DNS Name for the Server in Windows Azure Management Portal

Enter your server username and password.

If you already have an SQL Azure database, then enter it’s name in the Database field. If you don’t have a database, you can quickly create one using the web application generator. The next few steps explain how to create a sample Northwind database.

In the Database field, write “Northwind”. Press the Create button to create the database. Press Yes to confirm creation of the database.

Create a Database from Code On Time web application generator

You will be notified that the database has been created. Press OK to close the notification, and select Northwind from the Sample Tables dropdown. Press Install to install the Northwind sample into the database, and press Yes to confirm.

Installing Northwind sample from Code On Time web application generator

Once complete, you will be notified. Press OK to close the notification.

The next steps explain configuration of ASP.NET Membership and Session State management that apply to any database.

Let’s add ASP.NET Membership to this database. Under Membership, press Add. Press OK to confirm installation.

Installing ASP.NET Membership from Code On Time web application generator

Once complete, press OK to close the notification.

By default, Azure Factory applications are configured to use two extra-small server instances in the cloud. If you use multiple instances, then Session State management must be included in the application. Under Session State, press Add. Press OK to confirm the installation.

Installing Session State Management from Code On Time web application generator

Press OK to close the notification, and press OK one more time to save the connection string. Press Next twice to get to the Reporting page.

Configured connection string on Database Connection page of Code On Time web application generator

Check the box to enable reporting, and keep pressing Next to reach the Theme page.

Enable reporting in Code On Time web application generator

Let’s choose the Azure theme. Select Azure from the list.

Azure theme selected in Code On Time web application generator

Hold down Shift key, and press Next. This shortcut will take you to the Summary page. Press the Generate button.

Generate button in Code On Time web application designer

Wait until the generator finishes, and your default browser will open with your new web application. While the application is running on your computer, the database is located in the cloud. You can log in and start using the app immediately.

Azure Factory web application running locally while connected to SQL Azure cloud database

Deploying the Web App

It’s time to deploy the app to Azure. Go back to the generator, and click on the project name. Press Publish.

Publish button on Project page of Code On Time web application generator

The generator will package the web application and create the files necessary for deployment. A Windows Explorer screen will open and display the location of the files.

Published Azure Factory packages ready for deployment

Log in to your Windows Azure Management Portal, and switch to Hosted Services, Storage Accounts & CDN section in the bottom left corner. In the folders, click on Hosted Services. Select your subscription, and press New Hosted Service on the ribbon.

Create and deploy a new hosted service button in Windows Azure Management Portal

Use the following settings for your new hosted service:

Choose a subscription 3-Month Free Trial
Enter a name for your service AzureFactory
Enter a URL Prefix for your service AzureFactory (if not available, use something else)
Choose a region or affinity group Anywhere US (or your closest region)
Deployment options Deploy to stage environment
Deployment name AzureFactory
Package location ~\MyDocuments\CodeOnTime\Publish\Azure Factory\AzureFactory\CloudApp.cspkg
Configuration file ~\MyDocuments\CodeOnTime\Publish\Azure Factory\AzureFactory\ServiceConfiguration.cscfg

Create a New Hosted Service screen in Windows Azure Management Portal

Press OK, and Windows Azure will start the deployment process. This step may take 10-15 minutes. Once the status of the deployment changes to Ready, use the link found under Properties. You will be taken to the fully functional website running in the cloud .

Code On Time web application deployed to Staging environment

If you look at the URL, you will notice that it uses the ID of the deployment, not the requested DNS Name. This is because the deployment is a staging deployment. You can go back to the management portal, and choose Swap VIP to change it into a production deployment. Now you can use the DNS Name you specified during creation of the hosted service.

Deployed Code On Time web application in Production environment

When you are ready to deploy a new project revision, create a new staging deployment. Test the new deployment in the cloud. If everything is working as expected, then swap the virtual IP address of the staging deployment with the production one. Click Swap VIP button on the Management Portal ribbon to do so.

Deployment ribbon in Windows Azure Management Portal

When VIP swapping has finished, the previous application revision will become a staging deployment. Shut it down if you don’t need it. Continue upgrading staging deployment with the new revisions of the application, and swapping them later with production.

Sunday, January 22, 2012PrintSubscribe
SharePoint Factory

Microsoft SharePoint Foundation 2010 is the fast growing corporate intranet portal gaining momentum in the development community and businesses. Powerful collaborative platform attracts developers and business users finding creative ways to utilize easy-to-build custom lists integrated with user generated content.

Developers soon discover that the custom list capabilities are limited and Microsoft does not recommend creating lists exceeding a couple of thousand records. The natural solution is the traditional database.  Fortunately the development of applications based on Microsoft SharePoint is very simple. Install SharePoint Foundation 2010, build your app using Visual Studio 2010 and deploy to the server instance from Visual Studio.

There is a downside as well. It is your responsibility to write the code interacting with the database and presenting the results to the end users.

Code On Time and SharePoint Factory will greatly simplify the production of powerful database web applications that can be deployed natively to Microsoft SharePoint portals. These web applications will have a perfect visual match to SharePoint user interface elements. Generated web applications will provide data filtering and searching capabilities exceeding the comparable features of custom SharePoint lists while handling database tables of any size.

image

Installing Development Tools

Start by installing a Microsoft Foundation 2010 on your Windows 2008 or Windows 7 machine. We have compiled a useful tutorial that guides through the SharePoint Foundation 2010 installation steps.

Download  and install Visual Web Developer Express and SharePoint Tools.

Download Code On Time web application generator at http://codeontime.com/download.aspx and install it on the same computer.

For the purpose of this tutorial we will create a web application that uses Microsoft SQL Server as the database backend.

Building a SharePoint Factory Project

Start Code On Time and select SharePoint Factory in the list of available project types.

image

Enter the project name and select the programming language that must be used to generate the project source code.

image

Click Create and validate the connection to your SharePoint instance.

image

Proceed to the Database Connection page of the project wizard. Click the button next to the Connection String input field. Enter the server name. If you are connecting to SQL Express instance then enter “.\SQLExpress”. If you have an instance of SQL Server then enter “.” in the Server field. Configure the login identity.

We will create a blank database and populate this database with the sample Northwind dataset. You can connect to an existing database if you wish.

Enter “SharePointNorthwindDemo” in the Database field  and click Create button, select “Northwind” in the Sample Tables drop down and click Install.

image

Click OK button and continue to Reporting page of the project wizard. Enable dynamic and static reports and proceed to the Features page.

Activate Package Properties section and enter the title and description values as shown in the picture.

image

Click Next a few times until your reach the page displaying a summary of application data controllers. Proceed to generate the web application.

image

A sample web site will launch in the default browser when the web application code generation is over.

The web application displayed in the web browser does look a lot like Microsoft SharePoint portal. In fact, this is a sample ASP.NET web site created as a part of your project to allow quick prototyping and design that does not involve the actual instance of the portal.

The right-hand side of the page presents an area similar to the actual SharePoint Web Part property editor. Select the logical application page constructed by the code generator to activate the Preview mode.

image

Click OK button and you will see the selected logical application page in action.

image

Use Code On Time designer to customize the web application as needed.

Deploying SharePoint Factory Web Applications

The constructed web application solution include a special project that implements a single SharePoint 2010 web part. Web parts are building block of SharePoint sites.

Here is how you can deploy the application to the SharePoint portal installed on your computer.

Select the project name on the start page of the web application generator and click Publish.

image

The code generator will package the application for deployment and in a few short moments you will see a Windows prompt asking to allow the command line processor to alter settings on your computer.

The prompt will be launched to execute a Windows PowerShell installation script that requires elevated permission to run. The script will deploy your application to the SharePoint instance on your computer.

image

You will also see a folder with binary files that can be passed to your network for deployment on the production server. Notice that Deploy.bat and Retract.bat batch files are configured to run specifically on your computer and the administrator will have to change them to work correctly in the production environment.

Both batch files require elevated permissions to run. You can retract or re-deploy your web application if you right-click the corresponding file and choose “Run As administrator” option.

image

Using Generated Web Application in SharePoint

If the deployment has been successful then you are ready to start using your web application.

Launch a web browser and navigate to your local SharePoint instance. The following page will be displayed.

image

Create a new page by selecting Site Actions | New Page option in the menu.

image

Enter “Products” as the page name field and click Create button.

image

The new page will be displayed in design mode. 

Select Insert tab on the ribbon and click Web Part button.

Select Web Apps under categories. You should see the single web part named “Share Point Factory Demo” listed under the category.

image

Click Add button to insert the web part in the page.

You will see the instruction in the main area of the page suggesting to select the logical application page. This is the default message rendered by your application when the web part is inserted in the page layout.

image

Choose Edit Web Part option in the context menu of the web part on the page.

Select the logical page Categories | Products and click OK button.

image

Exit page design mode and try interacting with your web application.

The next screen shot shows a SharePoint Factory web application up and running in the actual SharePoint portal.

image

Conclusion

SharePoint Factory  and Code On Time allow quick and easy creation of powerful database web applications designed to operate in Microsoft SharePoint portal instances.

Create a collection of application pages implemented as user controls; package them for deployment as Microsoft SharePoint 2010 Feature with a single Web Part. Integrate a line-of-business database application with a widely adopted corporate web content management system.

Friday, August 12, 2011PrintSubscribe
Reporting Enhancements & Web App Publishing

Code On Time has released the new update that includes several enhancements and bug fixes.

Reporting in has been enhanced to print a form-layout if report is activated from a form views. Reports will now print Charts and images. Reports support explicit portrait and landscape orientation and multiple font sizes. You can create a permanent report template and have it customized in Visual Studio. We are working on a tutorial covering all of these topics.

All web apps now offer “publish” option on the start page of the code generator. Publishing results in a production of file set ready for deployment to your web server.

Form-style layout and support for images were included in ASP.NET 4.0 version only. We expect to bring reporting capabilities of ASP.NET 3.5 web apps in line with ASP.NET 4.0 when SharePoint Factory is released to production.

  • Version of the web application code generator is displayed in the status bar.
     
  • Navigation between records in a form view will result in correct printing and exporting of the current record only. Previously complete list of records was included in the export record set and printed reports if user navigating between records in a form view.
     
  • Code Generator now supports new expression stringFormatExpression.
     
  • Report  template in ASP.NET 4.0 will produce a report for Chart views. This report will take in account any user defined filters.
     
  • Pattern escaping for SQL Server has been implemented. Quick Find and other search operations resulting in LIKE comparison will have the value escapted to allow finding symbols %, _, and [.
    Read about it at http://msdn.microsoft.com/en-us/library/ms179859.aspx.
     
  • Clearing of a user-defined filter in a view via "x" button in the filter description will only clear the filters from the fields that are not hidden. Previously this was causing incorrect behavior in Project Designer and some other instances.
     
  • Custom report templates are now supported. Select any view in a data controller (gridf1, editForm1) and indicate that you want to have a report template. Generate the project. You will find the report template in ~/Reports folder of your application (Web Site Factory) or in the class library (Web App Factory and Azure Factory).  Click “develop” link next in the Actions column on the start page of the code generator and modify report template as needed. The report will be engaged whenever requested from the corresponding view.
     
  • Report template for grid /data sheet views automatically determines the page orientation. You can choose a specific page orientation if you edit Orientation property of a data controller view.
     
  • Report template now supports Font Size property. Select X-Small, Small, Medium, Large, or X-Large font size for a given data controller view.
     
  • Upgrading of the product edition will cause the project to be re-generated to reflect new features.
     
  • Web App Factory and Web Site Factory now support publishing. Select this option to produce a set of files ready for deployment to your server.  You can publish an app on the start page of the project wizard.
      
  • "Small" and "toll" image thumbnails are fitted better in the image preview rectangle rendered for binary / image fields.
     
  • Modal forms now support annotations. If you select a modal form then you will notice a clip icon next to form navigation buttons (up and down arrows).
     
  • Annotations are now supported with Windows Authentication
     
  • “Print” icon is now displayed in modal views next to form navigation buttons if any “ReportAs…” is available.
     
  • Resizing of modal views with tabbed categories has been improved. Switching of tabs will allow the tab content to take the maximum available size and scroll if the content does not fit on 4/5 of the page height.
     
  • VB.NET "Handles" clause in code-behind class methods is produced only for for master, aspx, or ascx pages to remove the conflict with certain name patterns in business rule methods.
     
  • Context field values are now included in "Details" page link when a user click on the arrow next to lookup fields.
     
  • Test Bench preview will start the preview with URL parameters that allows saving of the data in form views.