Hellooooo Sharepoint online!

Was really surprised how easy it is to develop an app for SharePoint online. There are some items that needs a little look at, and these are mostly for the deployment side of things.

SP Dev, The good, the bad and the ugly

 

I will categorically state, right now, that SP2010 dev, is not really a big requisite to develop for SPOnline. I think this is good. Another good thing, coming from a dev point of view, is that I don’t need to setup SP on my dev machine, so I got that going for me which is nice..

The bad stuff tho.. if you are used to developing for an on premise SP deployment.

  1. You don’t have control over the machine anymore
  2. You don’t have control over the file structure anymore
  3. You don’t have access to SQL Server anymore

Because I am a dev.

 

So, what will you need?

  1. A dev machine
  2. A sharepoint online subscription
  3. A dev site on the subscription
  4. Dev tools.

 

Step 1. – install all the dev tools. VS, Office Dev tools etc.

Step 2. Login to your sharepoint online Dev environment

I could show you how to create a Dev site collection but that’s for another blog.

Now open up visual studio.. and do the File – New thingy

Choose the proper app template. If you cannot find this template, then you have not properly installed the Office Dev Tools on your VS.

VS will ask you for the URL of your dev collection

Click finish.

It might ask you for credentials

After signing in, you should already be connected to your SP Dev site.

So.. this is the basic structure of a SPOnline App

Your UX will be at Default.aspx

Now it is time to update the app homepage. Using the Solution Explorer tool window, right-click the Pages/Default.aspx file and select Open. After the existing div, add the following markup

Inside default.aspx, locate the PlaceHolderPageTitleInTitleArea placeholder control and replace the content inside with the title “Hello Keesha!”.

<input type=”button” value=”Push Me” onclick=”hello();” />

<div id=”displayDiv”></div>;

Then

The next step you will update the app script file. Using the Solution Explorer tool window, right-click the Scripts/App.js file and select Open. Add the following function to the bottom of the file that will be called when you click the button.

 

function hello() {

$get(“displayDiv”).innerHTML = “<p>Hello, Apps!</p>”;

}

 

 

Okay.. hit F5

VS uploads the file for you

And…

 

 

After initializing…

 

If you click..

Posted in Computers and Internet | 1 Comment

New “Size D” Azure VMs run on SSDs!

Was doing an estimate on costs when.. BOOM!!!!

Saw this new “D Series” of VMs and so I dug a little and found..

http://blogs.msdn.com/b/uk_faculty_connection/archive/2014/09/23/new-ssd-based-azure-cloud-services-announced-perfect-for-virtual-machines-and-cloud-services.aspx

 

So I guess there it is! New VMs running on SSDs J

Nice…

 

Posted in Computers and Internet | Leave a comment

Setting up the Azure Search Service on your account

 

Since the announcement of the public availiability of the Azure Search API a lot of folks have sent me questions on how to enable it or where to find it in the Azure Management Portal so here goes..

So first, of course you would need to have an azure subscription. There are tons of blogs out there to do that so I won’t mention it here anymore.

Then, you will need to log on to your subscription, on the new portal.

And like I always metion during my tlaks, when one needs to ask an IT person how to “add” something.. the answer will be “look for the Plus (+) sign; then click it” ;)

Remember to do this with a decent internet connection.. or else..

Which is cute.. but not even remotely helpful.

On my subscription, the SEARCH api is readily available (as I have used it before), but you might have to dig a bit deeper..

After clicking, it should start spinning up..

And after waiting a bit…

Give it a name.. it will check if the name is OK. Then choose your pricing tier

Of course I chose the free one. J

Then you click on Resource Group to either create a new one, or choose an existing group.

I will create a new one.

If you have more than one Azure Subscription, you can choose which one to use:

Lastly, you will need to choose a location:

I chose a location really near me:

All is set to create!

After clicking Create, your service should be ready in a few minutes.

 

After it is done.. your menu should look like:

Now you have a Search Service! Next blog will be on how to use this J

 

BUT.. I will leave you with a research item..

 

So apparently, even with the service stopped, billing will continue.. J

Posted in Computers and Internet | Leave a comment

Microsoft Azure Service Bus – C#

Currently fiddling with the Service Bus and Queues. In the process of seeing if this would be a better way to send data to Azure. So how does one programmatically communicate with a Service Bus Queue?

There are a few things that one would need.

  1. A Microsoft Azure subscription. For this, go to www.windowsazure.com and subscribe.
  2. A Service Bus and Queue (although I will need to create the queue programmatically)
  3. Visual Studio and some C# skills.

So, what will be done is to create a Service Bus on your azure subscription.

And that bus will have its properties, take note of the connection string.

Then fire up Visual Studio and create a new project. A console project will do. Nothing fancy here, just need to establish communication to the Queue by sending some stuff and then retrieving them right after.

You will need to add some references to access the ServiceBus namespace J

 

And once you have those in place, you can proceed to coding this out. Now would be a good time to fix up the references

So, what object would you need to “talk” to the Queue? Well, common sense would dictate that you would need a “message” to send before attempting to talk to the queue right? It appears to be a bit of too many pieces, but these could all be “managed” right? So.. Microsoft.ServiceBus.NamespaceManager would do us well..

How to programmatically create a Queue on Microsoft Azure using C#.

I’ll go ahead and create a separate method to programmatically create a Queue on my Azure Subscription using C#.

private
void CreateMyQueue()

{


NamespaceManager MyManager = NamespaceManager.Create();

MyManager.CreateQueue(“TestQueue”);

}

This is simple.. too simple. (always wanted to say that).

And some searching will reveal that there are some other things that one would need to make this work, but sometimes I just like to play around and hit F5 to get to see what I need to do.

Running the app and calling the method should give you this: (not exactly.. there is a surprise here that I am sure you can fix on your own)

“Configuration is missing required information. Make sure the property ‘Endpoint’ is defined as part of ‘Microsoft.ServiceBus.ConnectionString’ key within ‘appSettings’ section, or Windows Azure configuration settings.”

This is as straightforward as it can be. You need to add the servicebus connection string in you appSettings J So..

Retrieving the settings:

Adding it to app.config:

Should allow us to run it without doing anything else :D

So basically, we have created a way to create a Queue, where will this queue be created? In the Azure Subscription identified by the connection string. So running this would result in..

A newly created queue, programmatically, with nothing in it. LOL. Anyways, it worked.

Do take some time to investigate. Did you notice that the casing of the queue’s name was converted to lower case?

Looking at the documentation, upper case characters should be allowed. Let us dig into that some other time.

Send Message to Azure ServiceBus Queue using C#

So now we have a queue; how do we send message objects?

The QueueClient object should do well here. So I make a separate method to send a simple message object of type BrokeredMessage.

private
static
void SendSampleMessage()

{


QueueClient MyQueueClient = QueueClient.Create(“testqueue”);


BrokeredMessage MyMessage = new
BrokeredMessage(“this is a test message”);

MyMessage.MessageId = “1”;

MyQueueClient.Send(MyMessage);

}

 

Very very straightforward and devoid of any validation J

Create a message, send the message. That’s it.

 

It says the length now is 1, because the app has sent one message J

How to retrieve an azure servicebus queue message using C#

So now let us retrieve the message and its contents.

I had to step into the code to show the retrieved message.. too lazy to go Console.Writeline. LOL!

So there you have it.. your basic of sending and retrieving messages to the Microsoft Azure ServiceBus Queue. The items you see here is by all means the simplest and most happy programming available. If one follows this step by step, one will encounter an error that should easily be resolved J

Also, I will leave it up to the reader to:

  1. Add validation to the methods. Best practice would dictate to see first if the Queue exists before creating it.
  2. Refactor the code for better performance.

Thank you!

 

 

 

 

Posted in Computers and Internet | Leave a comment

Asynchronous Grill

So the question remains.. “how many MVPs does it take to start a barbeque?” :D

For those not in the know, Microsoft MVPs are select people who are nominated by peers and have shown strong community influence and are recognized as Industry Experts. These people; as some may claim, are the cream of the crop, in their respective fields.

BUT, in the case of the Philippines, we MVPs also have connections outside of the world of technology. And as it goes, we all sometimes like to go “unplugged” once every so often. To detach ourselves from technology J. A few years back, we went birding; then some went to the beach.. this year, a lot of us decided to spend some time on the beach again, which is good.

April 26th came and several of the Philippine MVPs went to a beach…

Allan, Jojo, Jon, Glen, Eufer, Erwin, Mike, John, Jay R and I went to Paniman Resort in Cavite with a few items to do:

  • Cook
  • Eat
  • Talk
  • Eat
  • Talk some more
  • Eat some more

If you took the time to view our profiles, you would see that among us, there is enough skills to author and deploy an enterprise IT solution. But that was not the topic that day, what we wanted was to go offline for a bit and enjoy mother nature.

So, upon arrival we quickly set up to grill the food..

Pork chops and chicken on one grill..

And oysters on another.

Man, you can take the geek out of tech but you can’t take the tech out of the geek..

There were really no big problems this time; (except for the poor internet signal). The challenge of starting a fire was not that big. Although we did contemplate at one point which would make the best grilling material between an iPhone and and Android device. LOL

Here’s Jon taking care of lunch..

Eufer set up his own grill and cooked some oysters.

So basically, the grill was on dual processors with async properties.. and while they were grilling, the hungry mouths laid in wait.

Waiting for this to get cooked..

Glenn brought a huge slab of beef!!! Yummy!

Of course we would take turns fanning the grill while others cheated by “stealing” some of the beef..

One of the personal highlights for me was doing some fishing..

It was quite productive.. caught some little buggers J

Some walking along the beach..

But the most fun was, talking about the other MVPs who were not there LOL!

All in all.. it was a great way to spend a Saturday J

Posted in Computers and Internet | 2 Comments

Staged Publishing of Monaco maintained app!

Really nice surprise today.

Was fiddling around with Monaco and found this..

 

This is really nice. Now we have a way to see the edits I did on the website, on a staging level.

Awesome….

Posted in Computers and Internet | Leave a comment

Blog from OneNote

When we were talking about blogging from MSWord, an officemate asked me if I could do the same with OneNote. I guess he uses OneNote more than MSWord.

So… I kinda fiddled with OneNote and found this!


 
 

There is a Send to Blog button.. And to test how this works.. I am now blogging this using OneNote. :)

You know what happened? When I clicked “Send to Blog”.. it sent me to MSWord! LOL!

Posted in Computers and Internet | Leave a comment