Tag Archives: Dummy data for PCL

Wanna easily create an awesome dummy data set ? ;)

So probably you are one of those developers who is looking for a dummy or fake data set for you application development, testing or populate a set of good-looking screenshots for your application ? Yep ! I have been there… 😉

This is something almost every developer had gone through in their lifetime, and most of the time they end up going through the burden of writing a whole bunch of scripts from scratch to populate the data set and so on…

Well, my story…

Sometime back I had the same exact requirement, where I wanted to populated a bunch of fake data for testing out one of my C# dot net applications, not just a few amount, but in big chunks, a whole bunch of dummy emails, address, names and so on. I was actually going to write a bunch of scripts to populate those data by myself, but I got lucky 😉

Behold…

Yes lucky enough I came across this awesome tiny library called Faker.NET Portable Edition ! 😀 So I thought of sharing about it and give it a shout out as it’s a truly great library for easily populating dummy data sets.

capture17

And you can check it out on nuget right here –
https://www.nuget.org/packages/Faker.Net.Portable

Faker.Net.Portable

This is by far one of the easiest and lightest libraries I have used for populating dummy data. This is actually based on the Ruby Faker gem (http://faker.rubyforge.org/) library according to their documentation. It fully supports the below versions of dot net, thereby goes on saying yes you could obviously use this for your Xamarin Forms projects just like I used to.

  • .NET framework 4.0,
  • Silverlight 5.0,
  • Windows 8,
  • Windows Phone 8.1,
  • Windows Phone Silverlight 8,
  • Xamarin.Android,
  • Xamarin.iOS,
  • Xamarin.iOS (Classic),
  • Mono 3.2.8

It’s very much lightweight as well so it wouldn’t be any burden for your application’s compilation size and also it’s pretty fast. 😉

You could check out their documentation and github repo right here –
https://github.com/AdmiringWorm/Faker.NET.Portable

capture19

And trust me it’s super easy to implement, simply add it from nuget or through DLLs to your project and start calling the methods right away… 😀 Some of its awesome uses are as follows,

Names – Create dummy names, not just names with random letters but actual real-human-readable names. You could even separate First Names, Last Names, Middles Names and so on.
https://github.com/AdmiringWorm/Faker.NET.Portable#names

Address– Yep, same goes for addresses as well, streets, cities, states, Zip codes, and even Latitudes and Longitudes… 🙂
https://github.com/AdmiringWorm/Faker.NET.Portable#addresses

Phone numbers – Not just some random numbers, but actual real-like phone numbers with actual area codes and so on.
https://github.com/AdmiringWorm/Faker.NET.Portable#phone-numbers

Company – Let’s you create Company names, Suffixes, Logos (yep with actual images), even fake motos with real words…
https://github.com/AdmiringWorm/Faker.NET.Portable#company

Avatar – Yes that is right actual dummy images, with defined sizes, and image formats of your choice… 😉 A very useful option for displaying profiles, contact lists and so on.
https://github.com/AdmiringWorm/Faker.NET.Portable#avatar

Business – Need to populate Business related data ? Credit card numbers ? expire dates ? You got it !
https://github.com/AdmiringWorm/Faker.NET.Portable#business

Internet – Let’s you easily populate almost all the internet related data such as, domain names, emails, MAC addresses, IPV4 IPV6 Addresses…
https://github.com/AdmiringWorm/Faker.NET.Portable#internet

Lorem Ipsum – Oh yeah, you are going to love this, no need to worry about populating large paragraphs with random words, you could do it very much easily with this library
https://github.com/AdmiringWorm/Faker.NET.Portable#lorem-ipsum

App – Need any dummy App Names ? Authors ? Version numbers to be generated ? Oh well not worry… A simple one method call away!
https://github.com/AdmiringWorm/Faker.NET.Portable#lorem-ipsum

So that’s it fellas, and I wanted to show you some insight to it from the VS Object Browser, and see how impressive it is from down below… 🙂

capture18

Almost all the types of dummy data you need to populate, right here, and not just random ones that doesn’t make any sense, but absolutely real-like dummy content for your applications.. 😀

I felt like this library hasn’t gotten enough coverage, therefore I thought of writing a small blog post giving credits for this and the developers of it. And most of all let this heard for the fellow developers out there, for I hope I may have saved your burden of populating dummy data for your awesome applications… 😉

Cheers folks ! Stay Awesome ! 😀