Friday, June 6, 2014

7 Comments


Executive Bloggers S. Somasegar Brian Harry Steve Guggenheimer Scott Guthrie Jason Zander Visual Studio Visual Studio Blend LightSwitch Line of Business Apps by Beth Massi Setup & Install by Heath Stewart Application book Lifecycle Management Application Lifecycle Management Visual Studio Online Languages Visual Basic Visual C# Visual C++ Visual F# JavaScript book TypeScript .NET Framework .NET Framework .NET Parallel Programming ADO.NET (Managed Providers, DataSet & EF) ASP.NET by Scott Hanselman book Base Class Library (BCL) Silverlight WCF Data Services Workflow Platform Development Internet Explorer Apps for Office and SharePoint 2013 SharePoint Office Web Windows Windows Store Apps Windows book Azure Windows Phone
7 Comments
Andy book Kung Announcement Architecture Article Beth Massi Code Data Deployment Extensibility How-To HTML JavaScript Jay Schmelzer Joe Binder John Rivard LightSwitch Matt Sampson OData Sample Screen book Design SharePoint Sheel Shah Video VS2012 VS2013
li.tag-item').show(); $('#TagLessLink').show(); $('#TagMoreLink').hide(); return false;" />More ▼ li.tag-item').hide(); $('#TagMoreLink').show(); $('#TagLessLink').hide(); return false;" />Less ▲
Archives June 2014 (1) May 2014 (4) April 2014 (7) March 2014 (7) February 2014 (3) January 2014 (2) November 2013 (5) October 2013 (5) September 2013 (5) August 2013 (4) July 2013 (9) June 2013 (1) May 2013 (6) April 2013 (7) March 2013 (10) January 2013 (2) December 2012 (3) November 2012 (6) September 2012 (1) August 2012 (8) July 2012 (6) June 2012 (8) May 2012 (6) April 2012 (8) March 2012 (12) February 2012 (1) January 2012 (2) December 2011 (2) November 2011 (2) October 2011 (7) September 2011 (5) August 2011 (10) July 2011 (12) June 2011 (6) May 2011 (2) April 2011 (11) March 2011 (7) February 2011 (4) January 2011 (5) December 2010 (2) November 2010 (7) October 2010 (4) September 2010 (5) August 2010 (13)
One of the great features of Visual book Studio book LightSwitch and Cloud Business Apps (CBA) is its ability to perform what we call data mashup . You can connect to multiple data sources, configure virtual relationships between entities in different data sources, and then visualize all of the data at the same time.
One interesting data mashup scenario is to attach to an external entity, then extend that entity with some application-specific intrinsic (internal) data. Perhaps the external entity represents basic Employee information but the application is a corporate Facebook-like application which would like to additionally store more detailed profile information such as a photo and areas of expertise.
In this scenario, it is possible that application users would want to view and edit all the employee information together. LightSwitch easily supports book mashing up the external and intrinsic entities into a single view, but editing is problematic, as changing data on both the external and intrinsic entities at the same time results in pending changes to both data sources, and these changes cannot be saved in a transactional manner.
Because of this problem, LightSwitch does not automatically enable saving to multiple data sources. However, there is a code entry point through which an application developer can write logic that chooses precisely how to handle such a scenario. This post walks through an example book of how to effectively make use of this entry point when the situation calls for it. Example
The example application we are going to create takes an existing data source that contains some basic person information, then extends it with additional profile information stored in the intrinsic application database. We will then build a HTML client that can both view and edit all of the person information in a single set of browse, book view and edit screens.
This post assumes some previous knowledge of LightSwitch, including how to create LightSwitch projects , attach to existing data , navigate the entity designer and create screens using the built-in templates. Also, this example assumes that you are using Visual Studio 2013 Update 1 along with the March 2014 Update of the Office book Developer Tools (which book includes LightSwitch). book Creating book the Project and Attaching to Person Data
Start by creating a new LightSwitch HTML application called ProfileApplication . After the project has been created, book we want to attach to the existing person data source. For this post, let s use an example read/write OData service located at http://www.odata.org/odata-services . Open this link, choose the OData v3 tab and click on the OData (read/write) link. This will navigate you to a temporary URL assigned by the OData web site that allows for both reading and writing data. Copy this URL to the clipboard it will look something like http://services.odata.org/V3/(S( code ))/OData/OData.svc/ .
Now in your LightSwitch project, attach to this OData service, making sure to uncheck the Attach to this data source as

No comments:

Post a Comment