Data Access Methods Comparison

by Admin 6. september 2013 09:56

Are you always convincing collegues, managers, friends which is the best data access method for your applicaton. Well these 2 articles found on the codeproject can help you started to build background information.


http://www.codeproject.com/Articles/568108/A-Comparison-of-Data-Access-Methods-Part-2

Tags:

.NET

Can't find windows 8 metro apps

by Admin 24. november 2012 15:15

I recently installed windows 8 and i wasn't able to find apps in the store. Even something popular like twitter gave no results. This is because a setting of the store, so go into to settings, and set it like in the next screenshot:

When you search for twitter now, you will have a lot more apps found

And then a lot more apps are found :-)

Tags:

windows

Scrum excel and converting the items to word files

by Admin 18. augustus 2012 17:15

As scrum master, we all start off by defining all the user stories globally in an excel file aka THE BACKLOG. From there me mostly start to write out stories. Now i recently had an excel with 25 or so items, where i had to write the user stories in detail, and I was looking for a way to generate 25 doc files. For my scrum papers on the kanban board, I've used mail merge from MS-word a lot, but it generates 1 large document that can be printend, and then using a scissor I usely cut up this print.

But in this case i had to make detailed user stories in seperate MS word files. After looking the internet for a while I found this add-in for word: http://www.gmayor.com/individual_merge_letters.htm

When in the mail merge, you get a new button, that generates seperated word files, with the filename, specified in one of the source columns:

Now in the hyperlink, you find the detailed explanation on how to use the add-in....

 

This is how my little BACKLOG looks in excel

Then in word after the mail merge, these documents get generated, and I can get started on detailing every story.

 

Tags:

scrum

Natural sort comparer

by Admin 18. augustus 2012 16:53

Recently i was in need of sorting an image list in a program of mine. And like so often, these images were called "image1.jpg", "image2.jpg", "image10.jpg", "image100.jpg". Without thinking we mostly do a sort and than get the output like this:

 So If we look at this code, but drilled down in a sample, it looks like this:

 

Having an output that looks like:

Now we all don't want this kind of output, so after looking on the internet, i found a nifty algorthim, called "NaturalSortComparer". So I implemented the algorithm, and than the code snippet looks like:

 

You see I added the line of code in the red rectange, and the output became:

And that of course is how we need our output to be.

public class NaturalSortComparer<T> : IComparer<string>, IDisposable
    {
        private bool isAscending;

        public NaturalSortComparer(bool inAscendingOrder = true)
        {
            this.isAscending = inAscendingOrder;
        }

        #region IComparer<string> Members

        public int Compare(string x, string y)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IComparer<string> Members

        int IComparer<string>.Compare(string x, string y)
        {
            if (x == y)
                return 0;

            string[] x1, y1;

            if (!table.TryGetValue(x, out x1))
            {
                x1 = Regex.Split(x.Replace(" ", ""), "([0-9]+)");
                table.Add(x, x1);
            }

            if (!table.TryGetValue(y, out y1))
            {
                y1 = Regex.Split(y.Replace(" ", ""), "([0-9]+)");
                table.Add(y, y1);
            }

            int returnVal;

            for (int i = 0; i < x1.Length && i < y1.Length; i++)
            {
                if (x1[i] != y1[i])
                {
                    returnVal = PartCompare(x1[i], y1[i]);
                    return isAscending ? returnVal : -returnVal;
                }
            }

            if (y1.Length > x1.Length)
            {
                returnVal = 1;
            }
            else if (x1.Length > y1.Length)
            {
                returnVal = -1;
            }
            else
            {
                returnVal = 0;
            }

            return isAscending ? returnVal : -returnVal;
        }

        private static int PartCompare(string left, string right)
        {
            int x, y;
            if (!int.TryParse(left, out x))
                return left.CompareTo(right);

            if (!int.TryParse(right, out y))
                return left.CompareTo(right);

            return x.CompareTo(y);
        }

        #endregion

        private Dictionary<string, string[]> table = new Dictionary<string, string[]>();

        public void Dispose()
        {
            table.Clear();
            table = null;
        }

No you can just copy this class and use it in a sort expression on a IList<T>, or you can even use it in a .Order() clause of a linq statement.

All the credit goes out to the article I found on http://zootfroot.blogspot.be/2009/09/natural-sort-compare-with-linq-orderby.html?showComment=1258020708758#c5034722582649839449.
I found it so interesting, I had to share it on my blog. It has been a while since my last post, but I will keep trying to put some interesting stuff on my blog more and more

Tags:

.NET | code sample

.NET CMS

by Admin 29. november 2011 16:10

As a freelance consultant, you got to have a website, and since I am a .NET developer for 10 years, I've been trying to set up a .NET CMS on my webserver. This is a webserver hosted by combel, .NET 4.0, and a SQL database 10 of 10MB. And here are some of the advantages/disadvantages I've ran in to the last past days. I know that on a company application architecture, some of these issue's will easy be overcome. But on a small budget ...

Dotnetnuke (the one I started with)

  • I love it, out of the box, very usable, easy to make new modules, skins ...
  • BUT the mayor drawback, you need a sql database of at least 50MB, so in my case I can't use it
  • so I really can't use it in my case, which I very hard, because I use it at my day job, and it would be so easy to use it for this site also


Umbraco (the promesing one)

  • I is called umbraco, like they say: It run's some of the biggest sites on the web
  • And it offer a SQL CE database, which means, I dont't need SQL Server space (which in my case is expensive)
  • So I gave this a go, after 3 days, actually a go or 10
  • Nice looking wizard, that installs your site, then you want to install a starter kit, you get a .NET error
  • Like al good developers do, take the error into google, result 7 hits or so (very strange for a CMS that runs some of the biggest sites)
  • More tries, and failures are done
  • And while doing this, It feels not so intuitive, not like say a dotnetnuke
  • Today I made up my mind, and skipped Umbraco, maybe for large firms it is something, but for a small site, get up quickly, it is not that evident

Orchard (the new one on the block)

  • Also supports SQL CE, the embedded database
  • Looks promising
  • More details in a few days

So that is where I am now, I hope that Orcard is as easy as this blogengine, because I really enjoy it. Simple in setup, simple to use, and a nice result without having to break to much sweat, but aren't we all lazy developers :-)

More on the Orchard CMS later this week ...

Anyone who has other thoughts or suggestions on this subject feel free to leave me a mail/reply ... this article i purely about my experiences with these CMS systems

 

Tags:

.NET | website

RSS Grafitti ... social media sharing

by Admin 19. november 2011 08:45

In a previous post http://www.bc3.eu/blog/post/2011/10/10/Technology-Combo.aspx I was very exited about google reader, and a widget that I found to get my starred reads to my blog. But then I found a great site that get's much further than this, namely RSS Graffiti.This is a site that allows you to share RSS feeds to your social media. That made me think. I read a lot of rss feeds, and when I read an interesting article, I would like to share this to social media like facebook, twitter etc...

So i created an account on rss grafiti, and then using a very intuitive user interrface i made it possible to share my blog items via RSS to my company's facebook page. I did the same thing for my google starred items. So if now I am reading something, and I would like to share this, al I have to do is mark it as starred in google reader and minutes later it gets posted on my facebook page. Talk about automation ...

So keep reading my blog, I try my hard to supply you readers with information grabbed from the real life. If you want some detailed information, or you want to setup something for your information sharing, just send me an email and I am gladly to help you.

To get you started, here is the link to RSS Grafitti

Tags:

google | website

Facebook .NET

by Admin 24. oktober 2011 15:50

My first Hello World app for facebook was merely some javascript call. Now after some research I've found a .NET solution to building facebook apps. But before I Got there I struggled in finding the correct API, after reading some books and blog posts, I've found that the most up to date version for facebook is called "Facebook C# SDK", and even has some nice samples, including some in ASP.NET MVC 3. Here is the lists of API I went through...

Facebook.NET SDK Where Last Date  Hyperlink
Facebook C# SDK codeplex 23/08/2011 http://facebooksdk.codeplex.com/
Facebook developer toolkit codeplex 31/01/2010 http://facebooktoolkit.codeplex.com/
Facebook.NET Blog article 18/07/2007 http://www.nikhilk.net/facebooknet.aspx
Facebook.NET codeplex 13/01/2008 http://facebooknet.codeplex.com/
.NET Facebook API Client codeplex no release http://facebook.codeplex.com/
Facebook API for c# developers codeplex no release http://facebookapi.codeplex.com/
Facebook for ASP.NET codeplex 16/06/2010 http://fbconnectauth.codeplex.com/
Facebook Login codeplex no release http://facebooklogin.codeplex.com/

and this list goed on and on, so for me the first one in the row is the most current (and with current I mean Fall 2011), because both Facebook & .NET evolve so quickly, this information can be outdated in a couple of months, but I'll try and keep it up. If you are using another API and find it better than the one I was using, just let me know

if you are interest in the official Microsoft link, here you go: http://msdn.microsoft.com/en-us/windows/ee388574.aspx

and then the million dollar question, why don't you use PHP like all the rest ?

  • first, I am a .NET developer, so I only need to learn the facebook API
  • second, and very simple, my hosting is on a .NET server, so for now .NET will do
  • butt in the future, might this project get very big, I'm considiring of following the light and go with the LAMP path

Tags:

.NET | Facebook

Facebook Hello World

by Admin 16. oktober 2011 12:03

I am starting to learn to develop a facebook application, and I thought it would be wise, to blog about all the little things I came round for setting this up.

First big issue, HTTPS, since october 1st, 2011, Facebook required you to have a https hosted page. So setting this up was a hassle. You can find it cheap and free on the internet, but I went for the decent solution, and got HTTPS access from my hosting. Once this was setup, I could start writing an Hello World app.

Facebook apps can be set up in 2 ways:

  • one is making a website, and integrating with several facebook api's, like users, feeds, like buttons, ...
  • the second one, and the one that I choose, is that you write a website, and it get's "hosted" inside and iFrame (The Canvas) on the facebook page.

This methode is very nice, you can find recources on the internet about it.

So if you are on this site, I assume you have some knowledge about how to setup a website and hosting. So I am going to skip over that and, get into the "Hello World" sample. And here it is

<html>
<head>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js" charset="utf=8"></script>
<script>
	FB.init({appId: 254826021222861,status:true, cookie:true, xfbml: true});
</script>
<h1>My Social Club</h1>
<div id="quote">
	<span id="facebook_stuff">
		<div id="profile_pic">
			<fb:profile-pic uid="1289340415">
			</fb:profile-pic>
		</div>
		<div id="profile_name">
			<fb:name uid="1289340415" useyou="false">
			</fb:name>
		</div>
	</span>
	Hello and welcome ...
</div>
</body>
</html>

As you can see, a simple http page.

  • On top is reference to the facebook API.
  • Than an initialisation routine (appid, you get this when configuring your facebook app). As you can see we set the parameter "fxbml: true", than you can use the facebook markup language, like
    • fb:profile-pic
    • fb:name
    • ...
  • to find out your profile id, you can use this app: http://apps.facebook.com/what-is-my-user-id
  • so than is your profile picture, using the xfbml markup (full reference: http://fbdevwiki.com/wiki/Category:FBML
  • than it is your name
  • some random text

So that is all to it, do this and you've got an app on facebook, displaying your profile picture and name and Hello World...

Here is the official facebook developers page : http://developers.facebook.com/

Tags:

Facebook

iCloud

by Admin 13. oktober 2011 03:10

For all the people who haven't got into installing iOS 5 on their device, but are interested in how iCloud looks like. Here are some first-hand screenschots of iCloud. It al looks very nice, I hope I will come to write an in depth review soon.

But for everyone who is curious:

Tags:

Technology Combo

by Admin 10. oktober 2011 14:22

Here is yet another article about a technology combo, here by I mean, the use off different suppliers, platforms and formats to collaborate information. We all know RSS feeds, some of us use them often, some of us them sometimes. Well I am huge a fan of rss feeds, but I never got into reading / keep track of my reads in one place, I use to have some feeds displayed on my google IG page, some in outlook, some in firefox, but it never satisfied my needs. Until I've recently discovered Google reader.

Now I've collected all my rss feeds into Google Reader , linked them onto my gmail account. Than I can start and read them in one place, and keep track of my reads. You can even add your latest  delicious  links to google reader. Futhermore you can sort your feeds info folders, start tagging them, and much more

But there is more....

On my Ipad/Iphone, I've discoverd Feedler, a very nice RSS reader, where I can plugin my gmail account, and whoppa, all my rss feeds are available on this device. And the nice thing of all, if you mark some articles as reeds, they are read onto your google account. So you can keep track of your feeds. And you can mark a whole feed as read with one button click, this is very useful when you want to keep up.

But, there is even more ...

I love sharing information to everyone, when i give an article a "star", in either google/feedler. I made my "starred items" public, so google generates a atom feed, that contains my starred items. And with a widget I've found for my blog, I am now able to display those starred items onto my blog. How nice is that.

So now if i'm at work, at home, on the road, or even in bed, I can do some reading and all is kept in sync on my google account :-)

 

Tags:

google | website

Widget Google Reader Faves not found.

The 'link' start tag on line 20 position 6 does not match the end tag of 'head'. Line 21, position 5.X

Month List