Showing posts with label Microsoft. Show all posts
Showing posts with label Microsoft. Show all posts

Tuesday, October 30, 2012

The Windows Store apps ecosystem

It’s been pretty exciting lately with all the announcements from Microsoft. Windows 8 finally came out, we saw the Surface tablet and other some really cool devices, and today Windows Phone 8 was announced to hit the stores in a few days.

I’ve been using Windows 8 since the developer preview and of course it takes some time to get used to it, but if you think about it, and you actually DON’T think too hard about it, Windows 7 keyboard shortcuts work as expected on Windows 8. So if you’re a keyboard wiz, you will have no trouble to find your way around.

What I like about all this new wave is the concept of one app in many devices. I don’t have an Xbox (yet) but being able to take a photo with my phone and have sent over my my notebook, tablet or favorite social network, is (for me) a big step forward. I know people with iPhone and Android devices will say “hey, I can do that with my phone already”, I know. I know it’s not rocket science, I’m just saying it’s a time saver to have it now with Windows, the OS my whole family uses… so now my mom won’t be calling me to help her hook the camera with the computer (that’s not a good example since she’s got an iPad, but you get the idea).

What I don’t like for what I’ve seen so far? The Windows Store. I guess Microsoft didn’t think it would grow-up so fast… the Windows Store as we know will NOT scale up. It’s already difficult to find an app. I don’t know what others have done, but it’s almost impossible to find a game I would like with such an awful layout. At this moment the games category has 1033 apps (games) laid out awfully, so unless you’re looking for Angry Birds or Cut the Rope, it’s frustrating to go in there in pursuit of a cool game. I’ve shut the window store app many times without a single download.

Another weird thing is how many apps have the default Visual Studio 2012 templates images. Either from previous preview versions as for the official released version, I’m talking about the little cross in a box or the star. What’s up with that? Why is Microsoft allowing those crappy looking apps into the store?… there’s no way in hell I’ll even pay attention to an app that’s was not paid attention in the first place from its own developers. That not only increases the amount of apps, which in this case is not good, but it also gives the impression of “beta”… and I’m not talking about the apps, I’m talking about the store.

I know what’s going on. There are a bunch of Microsoft developers who saw how others got rich with apps for iOS and/or Android. Nobody thought that could be possible. Even so, five years ago there were 0 (zero) iOS developers, today they say there more than a quarter million. While those “developers” made millions of apps, some Microsoft developers waited for Microsoft to come up with something, and now it did. And I bet those developers thought, “ok, now is my turn. I know this shit, I’ll get a Windows Store app in no time”. Well my friend, you don’t know shit about Windows Store apps. Actually nobody knows, we’re all learning about it, and if you take a look at the official Microsoft made apps, you’ll see they are also learning. So don’t give me that “I know Silverlight and Xaml, I know what I’m doing” cause your app will look like crap if you don’t sit down and read the tons of guidelines out there about Windows Store apps.

I’ve heard a lot lately that the Surface is great; great hardware but no good apps. I can’t believe there’s no facebook app, aren’t you guys friends anymore? and no official twitter app either? I just hope it’s not attempt from Microsoft to “make us” use IE10 instead, like they’re doing with Xbox.

The good news is, we’re making a Windows Store apps generator. I wrote before about it and showed some of the cool features you can take advantage of with our generator. You might be wondering what kind of apps can we build with this generator. Is it final consumer apps or is it enterprise level apps? Yes to both o them. There’s a big showcase of apps we have built with Genexus for iOS and Android, so expect the same apps for Windows 8 soon.

So, is there an app that you wish Windows 8 had but it is not there? Don’t wait for someone else to build something close to what you need. Download Genexus Tilo now, and start creating the next Windows 8 killer app.

Read Full Post

Tuesday, October 02, 2012

Building a code generator, and running a marathon

485778_4347864811580_1796142993_nMany have been told about how writing code resembles to exhaust training. The long hours, the dedication, the exclusion of what others think of fun, and specially how others can’t understand what you do or why you do it. (assuming you also code for fun)

In the latest months I’ve been doing both of them, training for a marathon and writing the Genexus “Tilo” Windows 8 generator… but unlike the Win8 generator, I can say I finished the marathon (in one piece).

Of course I can’t say the generator is finished, the guys from Android and iOS have been working on them for over a year now so there’s a ton of work to be done. But just like while running the marathon(*), I’m not going to think about what’s missing but what we have achieved instead.

In Genexus we care about letting you model your solution, your needs, and don’t worry about what platform you’re targeting. We call it “platform-independent” or “platform-agnostic” but what I think is most important is our “non platform-ignorant” philosophy. And what does that mean for our Win8 generator? That you as a customer will want your app to use all the “cool features”  Windows 8 has as you would if you develop the app from scratch (meaning writing all the code yourself). So the cool thing is we already wrote all that code so it’s dead simple for you to use. Here I’ll show you what we have and what you need to do in order to have it running on your next Genexus Win8 app.

Lives Tiles

tiles

Lives Tiles is probably the first feature that will call your attention. This feature allows the “icon” (tile) of you app to show different info about your app. A news app for instances shows the latest news, a weather app shows the current conditions and so forth.

With Genexus all you need is a DataProvider that exposes the data you want to show in your tiles. That DataProvider must populate a known structure (SDT) so the app “knows” what to use for the image and what to use for the description. You have to keep in mind that only the latest 5 tiles will be displayed so you might want to limit that on the server side, on the dataprovider itself.

Genexus will provide the SDT (called ‘TileSDT’) and an example of the DataProvider, so all you need to do is modify the DataProvider to populate the SDT as you wish. Remember the [Count = 5] so you don’t send unused data to your app.

Full Device Integration

This was something simple to implement but it is very useful for apps. If you declare an attribute as an Image and you want your users to edit it they will want to use all the features they already have on the device. So that picture could be a file from the local hard drive, or a photo taken with the device’s camera or use any of the images that image providers apps provide. For instance, Windows 8 comes with a Photos apps that connects with your facebook account, flickr, skydrive and other computers, so you can choose an image from your facebook wall album to upload into your app. Cool uh? 

This comes “out of the box”.

Semantic Zoom

SemanticZoom

Semantic zoom lets you see a grid with a bigger picture view. So let’s say you’re showing contacts in your app and you have a grid where every item is of course a contact. You might want to reach to someone you know his name starts with an ‘S’ (like me). So you can scroll all the way to the S and then try to find me, or you can ‘pinch’ the grid and you will see a different view of the same grid, now grouped by the first name letter, doing it easier to go straight to the ‘S’ letter.

With Genexus you already have the “break by” feature of a grid, and you can now define different layouts for the same grid. So with that info you can have semantic zoom in your app.

Heterogeneous layouts

You probably had seen this but didn’t know the name of it. Heterogeneous layouts is the feature that allows you to see specific items of a grid with a different layout.

In Genexus you can define different layouts for your grids and pick on runtime the one you one for a specific pattern. Let’s say you want the item of the grid to be a big 2x2 square, or you want every 5 item to show one as a 2x1 ‘column’. Trust me, it sounds hardar than it is.

Search Charm

Charms is another cool feature of Windows 8. With the search charm you can search your apps, files, settings or in the context of an app. So you can search for ‘Angry Birds’ in the context of the Windows Store (which is an app) of course.

Windows 8 Genexus generated apps comply the search contract so once you call it swiping your finger from the right, your app will be there as a search provider.

Search

In Genexus, select the object where you want to display your results by setting the property “Search Result Object”. This object must have a grid with an attribute set as ‘Search’. That attribute will be the one your app will query for.

Share Charm

The share charm allows you share something from you app with someone else. Depending on the sharing apps you have, and the content you’re trying to share, some apps will appear as sharing target. Some of those apps will allow you to twit, send over email, send to skydrive, or maybe publish to your facebook wall.

Share is not an app wide feature, meaning that you must choose for every panel, that suits sharing of course, the attribute/variable you want to share.

Panels in Genexus have now a Share property where you can set the Attribute or Variable you want to share. Another way of sharing is by calling the Interop.SendMessage function.

Everything else

Of course there are tons of features that work as you would expect. Keep in mind we’re not even in beta yet but if you put a Date attribute the Date picker will be display, or an Enum domain will show you a combo or even the dynamic combos (Country – City) work as expected.

As mentioned before, there are some missing features… maps, notifications, audio, and more.

That’s a wrap!

So as you can see, there are quite a few cool Windows 8 features that your Genexus app can take advantage of. I encourage you to join the Genexus betatester program that will be available in a few weeks, download the Genexus Tilo night builds and give this generator a try. Right now there’s a alpha test program (at www.genexus.com/tilo) that you could apply if you have a project for Windows 8 (right now), if you just want to play around with it you’ll have to wait.

Also, just in case you just arrived earth from outer space, there’s this big (22nd) Genexus International Meeting in Montevideo from Oct 1 to Oct 3. There are a few sessions you might be interested in (if you found this post interesting), but there are tons of sessions, keynotes, labs and activities you’ll find amusing and educational. I’ll be there so come down and say hello and I’ll be happy to show you all this features live! It’s easy to locate me, I’ll be the guy in the suit.

works-on-my-machine] 

As I always say, this is “works on my machine” certified, but this time it’ll be soon ready for your machine :) stay tuned!

* When I reached the km 33 I hit “The Wall”… from that point on it was all will. I knew I had 9 km ahead of me, and by that time that seemed a lot, by I had already ran 33km, so giving up was not in my plans.

Read Full Post

Tuesday, June 19, 2012

The @FindMyPlane bot

A few days ago I wrote about the Genexus Challenge developer edition and my first Smart Devices app, Find my Plane. Once I get, what I think is, a good idea in my head I get around it a lot to improve it in every possible way. But this is not the case, sort of.

Right after I deployed the app to the Apple’s app store, I thought “how can I advertise it, without paying for advertising of course”, I needed people to find out about the app and download it, and a good word about it would be awesome too. So I thought about social networks… Facebook is for friends and I already told them to download it (did I mentioned it’s free?!) so twitter came to mind… but what can I do to promote my app from twitter, other than twitting about it of course.

So I thought of the @FindmyPlane bot and this post will tell you how I did it, not that it’s rocket science, but I found an interesting use of Windows Azure’s Worker Roles*. Wait, what?! you’re gonna tell people how to build a twitter spammer bot? No, let me get into that.

The @FindMyPlane twitter account works like this. You send a twit to @FindMyPlane with your flight number and find my plane will answer that tweet with useful info about it, the same kind of info you’d get in the Find My Plane app, but of course, only the info that fits in 140 characters.

So this is how it works. There’s a worker role (called Receiver) that every ten seconds access the twitter api looking for mentions for the @FindMyPlane account. Once it gets the list of tweets (if any of course) it saves them to a Table from Azure Storage and saves the latest tweet id in a Queue (also from Azure Storage) so the next time it just asks from that tweet on.

This is pretty much the code:

string lastTweet = "";
string previousMessageId = "";
foreach (CloudQueueMessage message in Queue.GetAllMessages(Constants.AZURE_STORAGE_ACCOUNT, Constants.AZURE_STORAGE_KEY, Constants.AZURE_QUEUE))
{
previousMessageId = message.Id;
lastTweet = message.AsString;
}

bool first = true;
foreach (Status status in Mentions.GetMentions(fmp, lastTweet))
{
try
{
Table.Insert(Constants.AZURE_STORAGE_ACCOUNT, Constants.AZURE_STORAGE_KEY, Constants.AZURE_TABLE, TweetEntity.FromStatus(status).ToString());
}
catch { }

if (first)
{
lastTweet = status.Id;
first = false;
}
}

if (!first)
{
Queue.DeleteMessage(Constants.AZURE_STORAGE_ACCOUNT, Constants.AZURE_STORAGE_KEY, Constants.AZURE_QUEUE, previousMessageId);
Queue.CreateMessage(Constants.AZURE_STORAGE_ACCOUNT, Constants.AZURE_STORAGE_KEY, Constants.AZURE_QUEUE, lastTweet);
}




And there’s a second Worker Role (called Replier) that every ten seconds queries the table where the tweets were saved for those that have not been replied yet and don’t have errors. For every tweet I try to get info of the flight number sent, if I do find info, I reply the tweet with that info and update the record on the table as replied. If I can’t find info, let’s say you tweeted “@FindMyPlane is awesome!” I update the record as ‘with errors’. This is just a way for me to know when I couldn’t reply because of an error on the system or because what I got was not a valid flight number.



Code here:



string query = "Replied eq 'False' and Error eq 'False'";
foreach (TableEntity entity in Table.Query(Constants.AZURE_STORAGE_ACCOUNT, Constants.AZURE_STORAGE_KEY, Constants.AZURE_TABLE, query))
{
string flightNumber = entity["Text"].ToUpper().Replace("@FINDMYPLANE ", "");
try
{
FlightInfo info = FlightStatus.GetFlightStatus(flightNumber);
string tweet = string.Format("@{0} {1}", entity["UserScreenname"], info);
Update.UpdateStatus(tweet, fmp, entity["Id"]);
entity["Replied"] = "True";

Table.UpdateEntity(Constants.AZURE_STORAGE_ACCOUNT, Constants.AZURE_STORAGE_KEY, Constants.AZURE_TABLE, entity);
}
catch
{
try
{
entity["Error"] = "True";
Table.UpdateEntity(Constants.AZURE_STORAGE_ACCOUNT, Constants.AZURE_STORAGE_KEY, Constants.AZURE_TABLE, entity);
}
catch
{
Table.DeleteEntity(Constants.AZURE_STORAGE_ACCOUNT, Constants.AZURE_STORAGE_KEY, Constants.AZURE_TABLE, entity.PartitionKey, entity.RowKey);
}
}
}



Cool uh?!



Here’s how all this works together



image



(*) for a good read on the Azure platform, Worker Roles and Storage (Table, Queues & Blobs) go to: http://bit.ly/SGAzure



You can download the ‘Find my Plane’ for Android and for iPhone.

Read Full Post

Monday, April 19, 2010

My Run 2.0 samples

annoysgomez Last week Run 2.0 took place in Montevideo and I had the privilege of working with Guadalupe Casuso (from Microsoft) and Luis Pandolfi (from Infocorp) on part of the Keynote, we talked about Windows Azure and if you ask me it was too short.

After the keynote I talked to some people who told me the session was great, but most of them already knew about Azure, so I guess I never know how good/clear was for someone new to the Windows Azure Platform (if you’re in this category please send me a line). One thing Guadalupe told us, and I guess she was right, is that there’s no point of showing something you can’t use yet… it’s like showing a kid a candy. I don’t know, but one thing I do know is that we could have use the entire conference to talk about Azure :)

On my part of the session I had to show something on ServiceBus so I showed Steve Marx’s AnnoySmarx sample. I changed a few thing from the listener, one thread would never end unless you close the cmd window, and added a few messages for demoing purposes. The sample is pretty cool cause it let you change the wallpaper of my computer by clicking the images from an online web page (in this case hosted on Windows Azure). For my sample I deployed the web app at http://gomezwallpaper.cloudapp.net/ and people from the audience would get online and click on the images while on the main screen you could see the wallpaper of my notebook changing. I was pretty cool and showed how you can get servicebus up & running with a little extra work from what you do to host regular WCF services.

Another tool I used is Windows Azure Storage Explorer which I built myself to browse and manage items from a Storage Account. I recently uploaded the source code to codeplex, the project is here.

Read Full Post

Wednesday, March 24, 2010

Goodbye trim()

I’ve been playing a bit the the RC version of the .net framework 4 and already found a new cool method.

Until now when I wanted to check for a valid string I had to use the following code:

if (string.IsNullOrEmpty(text) || string.IsNullOrEmpty(text.Trim()))
    throw newArgumentNullException("text", "text is not valid");

And I had to do that because a string containing nothing but white spaces was not valid and if you called the Trim() method on a null string you’ll get a NullReferenceException, you know the message… (“Object reference not set to an instance of an object.”)

So, the new cool method I found is a static method from string called IsNullOrWhiteSpace. the name pretty much says it all, except that the real name should be IsNullOrEmptyOrWhiteSpaces ;)

Instead of writing the code shown above, where you could easily forget the second condition, now you can have the same behavior in one single sentence:

if (string.IsNullOrWhiteSpace(text))
    throw newArgumentNullException("text", "text is not valid");

Read Full Post

Tuesday, March 09, 2010

New features to the Azure Web Storage Explorer

storageexplorer
On the first version you could only manage blobs, upload, delete and download them. Now I added the same functionality for Queues and Tables.
I found a pretty cool way of showing unstructured data from the Azure tables from a gridview control. How? with my good old friends the DataSets :)
I also updated the source code so you can download the source files from the version that it’s right now running on the Azure platform.
Go to http://storageexplorer.cloudapp.net/ to see the application running and here to download the source code.
Feedback is always welcome!

Edit: url is now http://azurestorage.azurewebsites.net

Read Full Post

Friday, September 04, 2009

Microsoft .net Framework 2.0 Configuration missing?

SDKAfter my Windows7 install I needed to modify some of the machine.config properties thru the .net configuration utility and I could find it. It wasn’t where it used to be (Administrative Tools) and even the Snap-in on the MMC was not present.

After a little bit of search I realize I had to install the .net framework 2.0 SDK. I guess I did it a long time ago cause I don’t remember even doing it.

Here are the links.

http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en (32bits)

http://www.microsoft.com/downloads/details.aspx?familyid=1AEF6FCE-6E06-4B66-AFE4-9AAD3C835D3D&displaylang=en (64 bits)

We’re welcome :)

P.S: I needed it in order to deploy a web app to the Azure platform, that’s why I’m tagging this post as “cloud computing” related

Read Full Post

Thursday, March 12, 2009

Forget what I said about SQL Data Services :(

Remember my two posts about Microsoft Sql Data Services (Starting Up With SDS and Writing Data To The Cloud)?, well, they are both wrong now. Not wrong but old.

This week I read on the SDS blog that they will introduce relational data base features (which I think it’s great) but also that they are removing the good old ACE model.

Read the original post here

Edit: I just read a new post from the SDS team were they answered a few questions from developers.

This is what I asked them and what they answered:

You say, you will no longer support the ACE model since Windows Azure has the same data model. If I’m going to put my application in Windows Azure (as I did) my best option for data is SDS, right? As I understood, Microsoft’s approach for cloud computing was Windows Azure as the platform for developers and SDS to store the data. And now you say I can use Windows Azure storage… what’s the difference? What’s the path to follow?

The best storage option for an Azure Services Platform application depends on your application. At a very high level, if you require the features of a relational database, use SDS. If you require basic blob or “schemaless” storage, then Windows Azure Storage is for you. Both will be key capabilities available to developers in the overall Azure Services platform.

Read the whole Q&A session here.

Read Full Post

Thursday, January 15, 2009

Writing data to the cloud (SQL Data Services)

In a previous post I talked about setting up the environment for SQL Data Services. Now I’ll show you something I’ve done with it and hopefully it will help somebody thru.

I’ll use my Goomez project cause that’s like my sand box and also, and since it’s available online, you could download it and also play with it. I used the SQL Data Service to store and query the information, so instead of using Lucene.net I used SDS for this implementation, which I believe it’s a good scenario for SDS. That said, the changes you’ll see here were not committed to the svn repository.

But let’s get down to business. SDS has two interfaces, one is through web services, which implies importing the wsdl like any other web service which, if you do it with Visual Studio, it will create all the necessary proxy classes. The other way is REST and since I hadn’t tried anything with it before I thought it’d be a good idea to give that a try too (I must say it’s not a recommended practice, since if you crewed up, it’d be harder to know where).

One thing that I found missing is a good old REST API for .net. I don’t know if this is planed to stay like this, but it’s pretty crapy. You have to create a HttpWebRequest, HttpWebResponse and so forth… not something I enjoy doing. It was fun though (just for this time).

So, here’s the code of the function that actually saves the info of one of the indexed files (FileInfo) to the cloud.

Firts of all, create the request and response objects and set a few properties to the request

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(m_url);
HttpWebResponse response = null;
MemoryStream stm = null;

request.Credentials = new NetworkCredential("<YourSolution>", "<Password>");
request.Method = "POST";
request.ContentType = "application/x-ssds+xml";


In my example, m_url has the value https://goomez.data.database.windows.net/v1/goomezindex because goomez is the authority I created and goomezindex is the container. So now, the entities.



StringBuilder builder = new StringBuilder("<File xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:x=\"http://www.w3.org/2001/XMLSchema\" xmlns:s=\"http://schemas.microsoft.com/sitka/2008/03/\">");
builder.AppendFormat("<s:Id>{0}</s:Id>", Guid.NewGuid());
builder.AppendFormat("<file xsi:type=\"x:string\">{0}</file>", file.Name);
builder.AppendFormat("<folder xsi:type=\"x:string\">{0}</folder>", file.Directory.FullName);
builder.AppendFormat("<extension xsi:type=\"x:string\">{0}</extension>", file.Extension.Replace(".", string.Empty));
builder.AppendFormat("<size xsi:type=\"x:decimal\">{0}</size>", file.Length.ToString());
builder.AppendFormat("<content xsi:type=\"x:string\">{0}</content>", GoomezSearchHelper.Tokenizer.TokenizeToIndex(file.FullName));
builder.Append("</File>");


Here I’m writing the xml which represents an entity, in my case, called File. The file variable you see here is the FileInfo I passed as a parameter to this function.



Now the ‘magic’:



XElement entity = XElement.Parse(builder.ToString(), LoadOptions.SetLineInfo);

stm = new MemoryStream();
entity.Save(stm);
request.ContentLength = stm.Length;
using (Stream stream2 = request.GetRequestStream())
{
stream2.Write(stm.GetBuffer(), 0, (int)stm.Length);
}

response = (HttpWebResponse)request.GetResponse();
if (response.StatusCode != HttpStatusCode.Created)
{
throw new WebException(string.Format(CultureInfo.InvariantCulture, "Unexpected status code returned: {0}", new object[] { response.StatusCode }));
}


Create the entity element, save it at a MemoryStream and get the response.



So, what was that? what did that do? if you go to the SDS Explorer and query the index you’ll see the file you just ‘uploaded’.



SDS Explorer

Read Full Post

Friday, January 09, 2009

My first Parallel Computing programming experience

For some reason I have not researched on yet, processors aren’t evolving as fast as they did in the past. We don’t double the processor speed every 6 months like it used to be, so manufacturers are adding more processors to computers in order to gain a ‘little’ extra speed.

But what happens with your programs? will they take the advantage of more than one processor in your machine. The answer I would guess is “no, they don’t”, and if you’re working with the .net framework as I am, the answer is definitely NO. So if you want your programs to run smoother and take advantage of your computer’s processing power you’ll have to either learn a new parallel computing language or start playing around with the Parallel Computing extension for the .net Framework (like I did).

First let me tell you that if you’re used to work with threads (System.Threading) you’ll have no problem understanding the new parallel paradigm. When working with thread you would create one to say, calling a web service and not freezing the UI while doing it, right? well it’s the same thing here, instead of creating a new Thread you’ll create a new Task.

But this .net extension has another cool feature called PLINQ (Google it, I couldn’t find and official updated resource) which pretty much ease things for you. I’ll show you an example of this with something I did in my Goomez indexer.

So I had a function called IndexFiles that looked like this:

        private static void IndexFiles()
{
try
{
List<string> servers = GetConfigList(K_SERVERS);

foreach (string server in servers)
{
foreach (string folder in GetShares(server))
{
if (folder.EndsWith("$"))
continue;

string folderFullPath = @"\\" + server + @"\" + folder;

try
{
IndexFolder(folderFullPath);



and I wanted to change the outter foreach, which BTW that’s one of the team’s recommendations, so I switched to the following:



        private static void ParallelIndexFiles()
{
try
{
Parallel.ForEach<string>(GetConfigList(K_SERVERS), server =>
{
foreach (string folder in GetShares(server))
{
if (folder.EndsWith("$"))
continue;

string folderFullPath = @"\\" + server + @"\" + folder;

try
{
ParallelIndexFolder(folderFullPath);



see how my foreach is different now? what that change in my code does, is that for each server in my list the code executed inside the lamda expression is processed by the first available processor… pretty cool uh?!



To try this stuff you can either download the CTP of Visual Studio 2010 and the .net Framework 4.0 or the Parallel Extension to the .net framework 3.5 June 2008 CTP.



Quick note: if you don’t have two (or more) processors you would end up slowing your program a little bit because there’s a little overhead which they say will be eliminated in next versions.

Read Full Post

Friday, December 12, 2008

Starting up with SQL Data Services (SDS)

SDS A few days ago I got my invitation code to the SQL Data Services CTP and last week I decided to take a peek of the ‘new technology’. Since I could not find a straight forward example of what to do when you want to test the SQL Data Services (FKA: SQL Server Data Services), I decided to post here a short version of what I did and hopefully someone will find here what I found in many places.

So, first of all I assume you already signed up for a SDS account at Microsoft Connect. They’ll send you two emails. The first one tells you your code to sign in but it also says the service is not available yet. And then, you get another email saying that the service in now available for you and that you need to sign in with the code they’d sent in the previous mail. Why don’t they send you just one mail when everything is ready? beats me!

And then what? well, is not easy… as I mentioned before, the site sucks big time. You need to go to the Azure site and click on the Sign In button at the top right corner. You might think you we’ll be prompted for user credentials, but no. Just click on Microsoft .Net Services & Microsoft SQL Data Services (or click my link). Now here you’ll have to sign in. Type your invitation code, the one they sent you in the first mail, here and click on Sign Up. Then you need to create a solution (remember this solution name for further reference). They also assign you a password (which you can change).

After that, click on the SDK link and download the Microsoft SQL Services SDK. After installing the so called ‘SDK’' open the SSDS Explorer. Read the doc to create and Authority, Containers and Entities (ACE is a mnemonic you might want to remember). I suggest you play around for a while before trying to write some code. Create Containers, and Entities. Create entities whit a different name (other than Entity) and same thing for the entity properties… notice you can write what ever you want there. Try some LinQ to query your entities.

In order to keep the post short I’ll show you some code in my next post.

Edit: I forgot to mention that the credentials asked by the SSDS Explorer are the name of the solution (the one you created before), and the password they gave (which hopefully you changed it)

Read Full Post

Wednesday, December 03, 2008

Windows Live is changing… and not in a good way

Live I was uploading a few files to my SkyDrive when I noticed they changed the look and feel. It felt good. Of course, as usual, I couldn’t find what I was looking for right away but you can get used to it easily.

But today I noticed that something else changed from the Windows Live site. I got an email with some promotions (spam). It had the good old disclaimer saying “this is not spam cause you can unsubscribe”… so I did, I clicked on the link and got into a page where I could unsubscribe from their advertisements. Lucky for them, they were having some kind of problem, (probably everybody doing the same) which would allow them to “process my request”. So I’m still down for that junk.

And now, I just got an email from a “hot chick” saying she wanted to get in touch with me. The mail also had another disclaimer which lead me to a page where I could set who could reach me. And I got a big unpleasant surprise when I got there…

This were my settings:
Who can invite you to their network? Anyone
Who can ask to view your space? Anyone
Who can send you private messages? Anyone
Plus a few checkboxes allowing them to send me emails for almost every possible reason.

Who the hell thought these are the right default values for the new preferences?

Read Full Post

Monday, August 25, 2008

Jerry Seinfeld joins Microsoft

helloimapc Almost two years ago I posted about a few funny commercials Seinfeld did for American Express. And now Jerry gives me a little more to talk about him as he joins a $300: Microsoft campaign to combat Apple. For those of you who don’t know Seinfeld (shame on you) he’s one of the greatest comedians of all times, and he’s pretty rich too… his deal with Microsoft is for $10:

But about that campaign, how expensive could it be to make Microsoft Windows a flawless system with enhanced usability features? I guess more than $300.000.000 :)

There are tons of Seinfeld’s videos online but I wanted to share one which is one of my favorites: Jerry Seinfeld on Larry King’s CNN show

(the poor old timer)

Read Full Post

Sunday, August 03, 2008

Next stop: Florida!

dklogo

I didn’t want to say anything but a few days ago Milano mentioned it in a post in our forum so I guess that gave me the green flag :)

We are now working on the next version of DeKlarit code-named “florida”. We want to add a lot of new stuff but I think one of the most important features will be the Silverlight addin which will let you create web applications with Silverlight controls. We are still in the process of making a few decisions like, will it be a full Silverlight app or will it have aspx pages as containers for the Silverlight controls? We believe the second is the best choice right now since we have two excellent web addins and we can use the navigation logic we already have in those. That means it will be pretty easy for you to migrate your current WebGenerator generated app to a brand new Silverlight app. Cool uh?

Also, we’re thinking on REST support for our WCF addin, WPF for a fully funtional WinGenerator addin independent of third party controls, something you guys’ve been asking for, and full text search in generated applications among others. Also, I have to work on our security features for the generated apps and add a few features like allowing a user to change his password, sending conformation emails and more.

So if you have any suggestions, now is the time. I can’t assure you we’ll implement them all but we’ll surely keep’em under the radar.

 

Read the full thread of the “announcement” here.

Read Full Post

Friday, August 01, 2008

Visual Studio 2005 Extensions for WCF and WPF not available after installing Visual Studio 2008

WCF It’s a fact, Microsoft wants you to use the 2008 version of Visual Studio rather than 2005. But what if you are in a big project, not ready to change the IDE, yet, and you want to install VS2008 to test the new features? They say everything works fine but the true is you loose an important extension: Visual Studio 2005 extensions for .NET Framework 3.0 (WCF & WPF).

The problem is that you can’t install them because you have .net 3.5 installed so googling around I found a pretty useful post from Timur.

Just locate the installer with your Visual Studio 2005 command line and execute the following command:
msiexec /i vsextwfx.msi WRC_INSTALLED_OVERRIDE=1

I don’t know what’s going on with that package cause the site where it used to be available to download from is no longer available, so if you need it I uploaded to my SkyDrive account. Download it from here.

Edit: I also found it here, as I mentioned in my comment below.

Read Full Post

Saturday, June 21, 2008

Is Apple doing it again?

Apple-logo In a way, we’re getting used to be amazed by Apple news. The iPod, the iPod shuffle, the iPod Nano, the iPhone, the iPod touch, the MacBook Air and so on. The have also been showing some huge improvements in the software division, iTunes, Time Machine (my favorite) and more. Today I read an article about Apple’s newest file system called ZFS to be released on Snow Leopard.

I didn’t realize that NTFS is 20 years old already, and if you think about it, what are you using today from 1988?. Anyway, I like the comparison Harris does with Microsoft and GM.

I said it before… I was happily surprised by Microsoft Live Mesh, but let’s be honest, it’s not even close to releasing a brand new top of the line FS :(

What’s Microsoft doing about it?

http://blogs.zdnet.com/storage/?p=335

Read Full Post

Tuesday, May 27, 2008

Microsoft Live Mesh: WOW!

mesh I don't know when was the last time a Microsoft product made such an impression on me. Microsoft Live Mesh surely did it.

About a week ago Ignacio send me an invitation to take a look at Mesh sharing one of his folder with me. I started up installing the small (1.57 MB) client app in my notebook computer. After doing that a shortcut appeared in my desktop to the folder Ignacio shared with me. I double clicked it and a light winform asked me where I wanted that folder.

Now that folder is synchronized all the time and we can add, remove or modify files and the client will sync those files up. Even when we modified the same word doc at the same time, the client told us there was a conflict and let us view both version of the file and pick the one we wanted to keep as final version (no merging yet).

Another cool feature is that I don't need the client to access the files. I can go online to mesh.com and go to my Live Desktop where I can see al my folders and files, work with them and upload them back up to keep them synchronized with all my computers.

Also, you can connect via Remote Desktop to any of your devices and work as if you were sitting in front of them. Better yet than regular Remote Desktop, since, when you're working somebody can be watching what you're doing. Let's say my wife's at home having some kind of problem and calls me for help (she does that). I can connect to my home computer (DSL connection) and show her how to do what she needs to do.

And one more feature I haven't been able to test is the ability to extend your desktop to one of your devices. The client installs a video controller which I assume will be used for that kind of stuff.

Live Mesh is a tech preview (not even in beta yet) but if you ask me, It's already a great product!

Note: I always mentioned devices because now you can only add computers but mobile devices and mac computers will also be available for synchronization.

Read Full Post

Saturday, March 15, 2008

Popfly Blocks

I've been playing around with Popfly for a while now, so I thought I'll post something about it.

Popfly is one of Microsoft 'newest' online toys that allows you to create mashups and blocks. Mashups are pieces of code which using Silverlight will display something nice to show in your web site, Facebook profile, Live Space, etc.

But, to show what?!... well pretty much everything that's available on the internet. To create a mashup you don't need any programming skills cause it's pretty much dragging, dropping and linking blocks. To build blocks you must have at least some programming knowledge cause you'll need to write some javascript and a config file with xml.

You can build your block from the online editor (not too nice) or you can download the VS2008 Popfly Explorer and build your blocks from VS2008, where you can debug your code.

I created a few mashups and two blocks. One of them is called Picasa Web Block and takes two parameters, username and albumname. After filling those up you'll get a collection with all the pictures from that album and you can display those pics with any of the display blocks available.
The other block was a little trickier, it takes a US zip code or a location code and the temperature unit (c or f) and it'll return the "current" weather conditions from the given location. The weather forecast is provided by Yahoo! Weather which takes the data from Weather.com.

In my spanish blog (scroll down all the way) I have a mashup I created with my Yahoo Weather block and the Live Earth block from Microsoft. Here's a picture of what it looks like.

weather

Mahalo to my visitor from Hawaii :)

Read Full Post

Tuesday, March 04, 2008

Assembla: What a tool!

I was getting tired of VSS, don't ask me why, I just wasn't happy about the different VSS databases. Also, at DeKlarit we're using SVN with TortoiseSVN which has a great integration with Windows Explorer. So I started to look for some free SVN server... I didn't try too hard, cause I just loved the first one I found.

It's called Assembla and it has many cool features. Here's just a list of what you get with a free account:

  • Unlimited team size
  • Public or Private (invited members only)
  • Subversion (this is what I was looking for)
  • Trac - development tickets and timeline
  • Integrated Ticket tool
  • Wiki
  • Milestones, Tasks, and Discussions
  • Alerts: Real-time email, batch email, or RSS (one of the simplest and coolest features)
  • File attachments
  • Chat
  • "Stand-up" or "Scrum" team member reports
  • Image Annotation
  • Time tracking and reporting
  • Staffing workbench

You get all that with a free 500 MB account, which is pretty decent for just source code and some wiki pages. Right now I'm hosting three projects there and I'm really happy about it.

One feature I particularly "enjoy" is being able of open tickes (like, issues, bugs, improvements) and then close them from tortoise while committing the changes. All you have to do is writing 'fix #2' as as comment to the commit you're doing if that action closes your ticket #2.

Read Full Post

Saturday, February 16, 2008

Cool VB 9 stuff

Beautiful day outside to go to the beach, but I'm recovering from the flu, so I stayed in and thought give some of the "new" VB9 (aka VB 2008) features a try. I must say I got into the .net world thru VB.Net but for one of my projects I decided to switch to C# (also to learn it) and never looked back.

But today I found some amazing new features in VB9 and I wanted to share them. Actually one of them is plain LinQ and we covered that before but I want to comment on VB9's integrated support for XML, and probably the best way to explain it is by showing an example... take a look at the following sub

Dim orders As New OrdersCollection
orders.Fill()

Dim elems = From order As Orders In orders Where order.ShipCountry = "Brazil" _
Select <order><id><%= order.OrderID %></id><customer><%= order.CustomersCompanyName %></customer></order>

Dim doc = <?xml version="1.0" encoding="UTF-8"?><orders></orders>
doc.Root.Add(elems)

Console.WriteLine(doc.ToString())

Keep in mind that OrdersCollection is the collection generated by DeKlarit's BusinessObject Addin. Do you have any idea what this writes to the console? well... take a look at it...


Console


First of all, have you ever seen xml displayed like that in the console? not me. And in case you missed it, let me go thru the code. First, I created the collection and filled it. Then I used LinQ to query the orders shipped to Brazil and selected <order> XElements with an id tag and a customer tag, both of them filled with data. Then I created an XDocument just writing the tags, and then just added my previous collection of XElements (elems) to the document and voilá!, to ToString method of the XDocument prints out what you see in the console pic. Ain't that cool or what?!


Others things you can do with your XDocument (doc)

Console.WriteLine(doc...<order>.Count())
Console.WriteLine(doc...<order>(0)...<customer>(0).Value)

 


The first line writes how many orders are in the xml document, while the second line writes the value of the (first) customer of the the first order.

Read Full Post