Installing PhoneGap for iOS

If you want to HTML5 and leverage javascript libraries like jQuery Mobile or Sencha Touch then PhoneGap is for you. The best place to get started is http://phonegap.com/start. The page defaults to the iOS Platform. I recommend review this page before watching my quick video on how to install PhoneGap.

Here is a summary of the process:

  • Make sure you have the latest version of Xcode
  • If not, you can download it at http://developer.apple.com
  • Download the latest copy of PhoneGap at http://phonegap.com/download
  • In the video below i copied the download to: /users/username/Public
  • Navigate to the ios folder: phonegap/lib/ios
  • Right-click on the Cordova-1.6.1.dmg and select open
  • Next right-click on Cordova-1.6.1.pkg and select open
  • Walk through the install Wizard
  • Once the install is complete open XCode and you will have a new Template
  • In the next Blog post I will create a simple PhoneGap Application using the Template

Below is a quick review of the install process:

 

 

 

Joomla! Configuration Error – JFTP::write: Bad response

 

I just installed Joomla! version 1.5.22 the other day for a Not-For-Profit organization.   I tried to change the Color Variation and Background Variation property from Black to Blue in the Template Manager:

image

When I applied the change I received the following errors:

  • JFTP::write: Bad Response
  • Operation Failed!: failed to open /home/user/public_html/imagearts/…/params.ini for writing

Many time when there is a problem with file write permissions people have a tendency to perform a chmod 777.   Sure this approach works but it allows any to have access to the file.   So I took a conservative approach and started by looking at the existing permissions which was 555 and change it to 755 which gives the Owner Write access. 

image

I used Filezilla to modify the file permissions.  Once the permissions were modified to 755 the changes were applied successfully:

image

I also experienced a similar situation with the configuration.php file but in this case it was the Group that required Write permissions (the Owner already had Write).  You need to set the permissions to chmod 664 :

image

The web server is hosted by Host Papa and it is a Linux/Apache server. 

Troy

BDC Models in Visual Studio 2010 for SharePoint Foundation Server 2010

When I first started building External Content Types in (ECT) SharePoint Foundation Server I used SharePoint Designer.   SharePoint Designer is a good place to start if you are learning how build ECT’s.  It does not require any .NET code and you can build a fairly decent application in little time especially if you have a solid relational database background.  But I wanted to try build an External Content Type using Visual Studio 2010.   In this case I am going to build a simple BDS Model based on the SalesLT.Customer table in the AdventureWorksLT2008R2 database.

First, lets start by creating an empty SharePoint 2010 Solution (C#)  in Visual Studio 2010.  Select File > New > Project from the file menu.  In the Installed Template section under Visual C# > SharePoint > 2010 select the Empty SharePoint Project and name the project SPDev1.  This will create an empty SharePoint project which we can add multiple projects to.

image

When you select Ok the SharePoint Customization will be displayed.  Enter the the site you want to use for debugging the project and make sure you select “Deploy as a farm” solution:

image

Right-click on the SPDev1 project and select Add New Item:

image

Now Select Business Data Connectivity Model from the Add New Item list and name it AWLTCustomer.  Once you enter the name of the model click Add:

image image
Add BDC Item BDC Solution

When the BDC Model is added it is fully functional.  If you Build the project it will compile without any errors. 

You will notice that I named the Blog Post “BDC Models in Visual Studio 2010 for SharePoint Foundation Server 2010”  and not “BDC Models in Visual Studio 2010 for SharePoint Server 2010”  .  If you created this project using SharePoint Server 2010 you can actually deploy this project to the debug site and it will create an BDC Model with an entity called Entity1.  But if you are using SharePoint Foundation Server 2010 you will receive the following error when the project is deployed (Right-click the project and click Deploy):

Error    1    Error occurred in deployment step ‘Add Solution’: Failed to load receiver assembly "Microsoft.Office.SharePoint.ClientExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" for feature "SPDev1_Feature1" (ID: 1a75169a-e716-4d4b-a43c-3c0cf032fc40).: System.IO.FileNotFoundException: …

In order to deploy a BDC Model to Foundation Server a Feature Event Receiver is required to publish the mode to the site:

Publish BDC Model project to SharePoint Foundation 2010 with Visual Studio 2010

The following post on one of the Microsoft Blog sites provides details on how create the Feature Event Receiver. 

Deploy a BDC Model project to SharePoint Foundation 2010 using Visual Studio 2010

Basically you need to download the following file from the first link:

Feature Event Receiver (C#) 

In the current project, add an Event Receiver to Feature1 by right-clicking Feature1 and select Add Event Receiver:

image 

First copy the existing content of Feature1.EventReceiver.cs to a file using notepad.  Next, replace the contents of Feature1.EventReceiver.cs with the contents of the file downloaded from the Microsoft site (FeatureEventReceiver.cs) (Ctrl-C, Ctrl-V).   The details from this point on can be found in the Microsoft Blog post mentioned above (Deploy a BDC Model project to SharePoint Foundation 2010 using Visual Studio 2010), but I will provide some additional screenshots along with the steps.

We need to Add a reference to the MicrosoftBusinessData.dll. In order to do this you have to copy the dll from the GAC.    Click Start > Run and enter the following:

  • C:\Windows\assembly\gac_msil
image image

 

Find the Microsoft.BusinessData folder and copy the Microsoft.BusinessData.dll to the following folder:

  • C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI

Next add the following references to the project:

image image
System.Web Microsoft.BusinessData.dll

Set the BDC (SharePoint item property) which in our case is located in the AWLTCustomer model and set the following properties located under Feature Receiver Category:

  • Assembly = Assembly = $SharePoint.Project.AssemblyFullName$
  • Class Name = SPDev1.Features.Feature1.ImportModelReceiver
image image
Properties Before Properties After

Set the Feature property by double clicking on Feature1.Feature and update the following property:

  • Receiver Class = SPDev1.Features.Feature1.ImportModelReceiver
image image
Properties Before Properties After

One last thing, we need to change the Namespace of the code that was copied into Feature1.EventReceiver.cs from BDCModelReceiver to SPDev1:

image 

I have been writing this post while following  Microsoft Blog.  So, here is the moment of truth.  After the last step we should be able to deploy the BDC model.  Right-click on the project and click deploy or click F5 if you want to debug the solution.  To view the content type you can open SharePoint Designer and navigate to the External Content Type sit object:

image

Before you can create an External list based on the new External Content Type the permissions must be set.  Check out this post for setting the permissions using the SharePoint Central Administration site:

Setting Permissions for an External Content Type

Once the permissions have been set an External List can be created.  In this example the External List is very basic and in fact the model has not been connected to the External table in the Adventure Works.   But that is a topic for another post.

For more information on BCS check the Microsoft BCS Team Blog:

http://blogs.msdn.com/b/bcs/

 

Troy