You are here:   Blog
Register   |  Login

 

By Michael Washington on 7/11/2015 4:12 AM

 

image

You can create a static header for your LightSwitch HTML Client application…

By Michael Washington on 6/4/2015 7:50 PM

image

You can easily add a watermark to your LightSwitch application using a method by Chris Cook

By Michael Washington on 3/18/2014 4:43 AM

image

In this article we will create an end-to-end HTML application in Visual Studio LightSwitch. The purpose is to demonstrate how LightSwitch allows you to create professional business applications that would take a developer days to create. With LightSwitch you can create such applications in under an hour…

By Michael Washington on 10/6/2013 9:34 PM

 

 

image

Handling complex business logic in a Single Page Application (SPA) is not a simple task. Process flow that is normally easily enforced in a traditional postback web application, can have security holes, because hackers can access the service methods directly...

By Michael Washington on 9/29/2013 6:01 AM

image

This article demonstrates one method to implement paging and sorting in the LightSwitch HTML Client. This example uses a PreprocessQuery that takes parameters…

By Michael Washington on 9/17/2013 6:21 PM

LightSwitchTree

When displaying hierarchical data, or lists inside of lists, in a business application, a tree control is usually used. However, a traditional tree control is not well suited to a mobile friendly application.  JQuery Mobile recommends using collapsible content blocks.

To enable collapsible content blocks in Visual Studio LightSwitch HTML Client, it is necessary to use the Jewel Lambert method described in jQuery Mobile Collapsible Content Control with LightSwitch. This will enable collapsible content, but it will not handle dynamic content inside the collapsible sections.

To enable dynamic content we can create dynamic HTML inside the collapsible content blocks…

By Michael Washington on 9/8/2013 7:56 AM

image

Blocky is a visual JavaScript programming editor. You can learn all about it at the following link: http://code.google.com/p/blockly/.

We will use the website to create JavaScript visually that we will then consume in LightSwitch. For our example we will create a simple number guessing game…

By Michael Washington on 9/5/2013 6:35 AM

I have used Visual Studio LightSwitch HTML Client for a number of years.  Here I am listing the top 10 things, in order of importance, that in my opinion, you need to know how to use to create applications:

  1. Data binding
  2. Promises
  3. WCF RIA Services
  4. ServerApplicationContext
  5. Before Open and After Close
  6. How to implement JavaScript plug-ins
  7. How to create records dynamically
  8. Custom Control (Creating a DIV)
  9. Client side queries
  10. Server side security
By Michael Washington on 9/1/2013 8:59 PM

image

This example application shows how you can integrate a complex API such as PayPal Adaptive Payments with Visual Studio LightSwitch.

I recently had a challenge where I needed to create a marketplace where people can sell items. I did not want to collect the money and pass it from buyer to seller because I would get stuck with losses if the buyer reversed the charges (for example because their account was used without their permission) and I had already passed the money to the seller. The solution was to submit two charges, one directly from the buyer to the seller, and one as a fee that would go to me for hosting the marketplace. In addition, I did not want to release the item being sold (in this case a picture download) until the funds had cleared. For example, if a person pays with a check it can take days for the check to clear…

By Michael Washington on 7/29/2013 5:47 AM

image

Visual Studio LightSwitch contains an advanced JavaScript data binding framework on par with any of the alternatives that you will find. It has the advantage that it also has an integrated business and data layer. The most important aspect is that it is built into and fully integrated in Visual Studio, the most advanced web development tool available.

The example application covered here is simple, but the most important thing to note is that it is simple to create, understand and most importantly simple to refactor…

By Michael Washington on 7/28/2013 10:33 AM

image

Logging into a website using a small keyboard, such as the one used on a cell phone, can be painful. A username and password that takes a user 5 seconds to enter on a full sized keyboard can take up to a full minute when using a small keyboard on a mobile device. This can make some mobile applications unappealing to the end-users…

By Michael Washington on 6/13/2013 8:22 PM

image

Visual Studio LightSwitch team member Huy Nguyen is a good person to follow on the Visual Studio LightSwitch forums. He typically provides well explained answers to difficult questions and usually provides code samples, and in some cases downloadable projects.

Previously, I created examples using techniques I learned from some of my favorite posts that he made. Those articles are:

  • Visual Studio LightSwitch Screen Navigation and Advanced JavaScript Examples
  • HUY Volume II - Visual Studio LightSwitch Advanced JavaScript Examples

In this article, I have created more examples from his latest articles…

By Michael Washington on 6/8/2013 6:46 AM

image

After using the Visual Studio LightSwitch HTML Client, you may wonder, how does it work? How does it turn the program we designed into an actual web application?…

By Michael Washington on 5/27/2013 11:12 AM

image

Visual Studio LightSwitch team member Huy Nguyen typically provides well explained answers to difficult questions, and usually provides code samples, and in some cases downloadable projects.  Previously, I created examples using techniques I learned from some of my favorite posts that he made. In this article, I have created more examples from his latest articles…

By Michael Washington on 5/23/2013 5:55 AM

image

To maximize performance, all applications must properly manage the flow of data. When dealing with an entity (one row of data), Visual Studio LightSwitch transfers the entire entity from the data layer to the client, the user interface (UI) layer.  When dealing with collections (rows of data) LightSwitch uses Visual Collections, and is very deliberate as to how, and when it places entities in the Visual Collection

By Michael Washington on 5/20/2013 9:31 PM

image

You can easily implement animated help agents in your Visual Studio LightSwitch HTML Client applications…

By Michael Washington on 5/19/2013 9:41 AM

image

An objection many developers have about using Visual Studio LightSwitch HTML Client for their projects, is that they feel they need normal web pages. To many developers, LightSwitch HTML pages look odd when viewed in a normal desktop web browser.

The Reflow table displays data in a desktop web browser like any normal data grid, yet it will dynamically pivot the table when the screen becomes smaller (rather than just squeezing the table smaller). A user can easily view and navigate the table on any sized device…

By Michael Washington on 5/9/2013 6:28 AM

image

The Visual Studio LightSwitch runtime was updated to support JQuery Mobile 1.3. This is a step by step guide to updating the LightSwitch JavaScript Runtime…

By Michael Washington on 5/8/2013 7:59 PM

image

Visual Studio LightSwitch team member Huy Nguyen is a good person to follow on the Visual Studio LightSwitch forums. He typically provides well explained answers to difficult questions and usually provides code samples, and in some cases downloadable projects. In this article, I have created examples using techniques I learned from some of my favorite posts that he made…

By Michael Washington on 5/5/2013 8:41 PM

image

You may have situations where you need to dynamically create records. Typically you will want to do this when you don’t want to navigate away to a new page to add a record…

By Michael Washington on 5/3/2013 6:34 AM

image

LightSwitch will allow you to easily create a popup to allow a user to select an item from a list in an associated table and to set a value. What is more difficult, is constraining that list of items presented based on business rules…

By Michael Washington on 4/25/2013 7:25 PM

clip_image002

The Microsoft Visual Studio LightSwitch Team recently posted example JavaScript code to accompany the MSDN documentation: How to: Modify an HTML Screen by Using Code. In this article, we will look at some of the examples they posted and provide a step-by-step walk-thru…

By Michael Washington on 4/23/2013 1:02 PM

image

You have multiple options when you programmatically delete data in the Visual Studio LightSwitch HTML Client. Unlike the insert and update tasks, there is no wizard to allow you to easily create a button to allow a user to delete data. You must write a bit of code…

By Michael Washington on 4/12/2013 6:31 AM

image

The LightSwitch HTML Client allows you to easily create a server side search…

By Michael Washington on 4/11/2013 9:43 PM

image

The current version of the LightSwitch HTML Client does not expose the computed properties created at the Entity level. Here are a few methods you can use…

By Michael Washington on 2/7/2013 9:40 PM

 image

In this article we will create an end-to-end HTML application in Visual Studio LightSwitch. The purpose is to demonstrate how LightSwitch allows you to create professional business applications that would take a developer days to create. With LightSwitch you can create such applications in under an hour…

By Michael Washington on 1/21/2013 1:37 PM

image

You can implement any functionality you need with the Visual Studio LightSwitch HTML Client when you use ServerApplicationContext, Generic File Handlers (.ashx files), and JQuery Ajax calls…

By Michael Washington on 1/6/2013 6:57 PM

image

At the time of this writing, the LightSwitch HTML Client is still in preview. We can expect additional functionality in the future release. For now, any updates to the data require the user to explicitly press the save button. This is not optimal in all situations.…

By Michael Washington on 12/31/2012 3:01 PM

image

The LightSwitch HTML Client (currently in preview) brings a new feature called ServerApplicationContext. Here is an example that uses a ASP.NET Web Form page to create CRUD (Create, Read, Update, and Delete)…

By Michael Washington on 12/28/2012 10:24 AM

image

To create responsive HTML applications (using JavaScript) you will need to use asynchronous calls to communicate with external resources. While you can make requests synchronously, it is a bad practice because it locks up the web browser…

By Michael Washington on 12/16/2012 9:51 AM

image

In the Visual Studio LightSwitch HTML Client, extra steps are required to determine who the currently logged in user is.

Microsoft Visual Studio is a registered trademark of Microsoft Corporation / LightSwitch is a registered trademark of Microsoft Corporation