Skip to main content

Posts

Health Framework - Apple vs Android

In the past few years we have seen mobile and its apps rise and shine transforming many industries in its wake. However, the growth in health and fitness category has been less spectacular at 49% compared to overall mobile app industry which grew at 115% in the year 2013 (source Flurry Analytics). A few years ago Microsoft and Google attempted to make inroads into the health and fitness sector by bringing web based products to store and maintain health and fitness information like MS HealthVault and Google Health with not so spectacular results. Next came innovations by Fitbit in the wearables sector for activity tracking, in 2011 and 2012 they introduced first wireless activity trackers to sync using Bluetooth. This was followed by the entry of Jawbone into health sector with its announcements of Up wristband and accompanying app. These have had better success resulting in many startups joining the wearables product bandwagon.  Late to the stage almos...
Recent posts

Quick notes on Git

  I have been away from writing anything for a long time and instead have been fooling around with other stuffs like just plain reading, growing mustache, trying to learn swimming, trying to learn to play acoustic guitar and trying my hands at photography. To be honest I have not given up on them yet but neither have I been able to hang on to them in a disciplined manner. So here I am back to my writing after a long gap. This time its going to be quick notes on Git . Git is a file repository. As opposed to other repositories like SVN Git thinks of its data more like a snapshot of a mini filesystem. All operations in Git are local. (Entire history of the project is stored locally in your working directory) Browsing project history. Viewing all changes to a file. Git uses Checksum to track repository items Everything in Git is check-summed It uses SHA-1 hash for generating check sum values All a...

My Notes on Cloud

  I have been asked to meet up with someone who is looking for cloud based solutions. So before I head to meet them I decided to brush up a bit on Cloud stuff and also decided to write up my little notes on Cloud. Defining Cloud – The association of retail technology standards (ARTS) defined cloud as “Cloud computing is an emerging computing model by which massively scalable IT-enabled computing capabilities and resources (servers, storage, networks, applications and services) are delivered as service to external consumers using Internet Technologies. The Microsoft perspective of the Cloud – On-demand – Resources are virtualized and made available as and when you need them. Broad Network access – Resources are available anytime, anywhere via internet. Resource Pooling – Most of the resources are shared. Rapid elasticity – demand driven consumption and provisioning of resources based o...

Notes on Castle MonoRail

  Sometime back I was doing a small POC on Castle MonoRail. So here are my quick notes on this. MonoRail is an MVC Framework from Castle inspired by ActionPack. MonoRail enforces separation of concerns with Controller handling application flow, models representing data and View taking care of the presentation logic. To work with MonoRail you need Castle Assemblies. It also utilizes nHibernate You can use Castle MonoRail Project Wizard or create the project manually. Project structure – Content Css Images Controllers HomeController.cs Models Views Home \ index.vm Layouts \ Default.vm ...

Notes on C#–Part - I

1. Covariant and Contravariant? a. Covariant is converting from wider (double) to narrower (float) b. Contravariant is converting from narrower (float) to wider (double) c. Invariant is not able to convert. 2. Immutable Objects are objects whose state cannot be altered externally or internally. 3. In C# 4.0 you can now do the following – If Manager inherits from Employee then IEnumerable<Manager> mgrs = GetManagers(); IEnumerable<Employee> emps = mgrs; This is because CLR now supports defining IEnumerable<out T> This is called Covariance. Next in-case of IComparable IComparable<Employee> empComparer = GetEmployeeComparer(); IComparable<Manager> mgrComparer = empComparer This is because CLR now supports defining IComparable<in T> This is called Contravariant. 4. C# 4.0 now has dynamic built in type. This is not resolved by the compiler but it left for resolution until run time. So C# now supports dynamic late binding. T...

Notes on Multi-Threading

1. System.Threading namespace provides classes and interfaces that enable multithreaded programming. 2. How to initiate new Thread?     a. Create an object of a Thread class        i. Argument should not be null        ii. Should have permission to create thread.        b. Its constructor takes an instance of a ThreadStart Class     c. ThreadStart Class requires the method that needs to be run on new thread.     d. Call the Start method of the thread class to initiate execution on this new thread. 3. Important points on Threading –     a. Thread function can be static or non-static     b. You can have multiple threads with same thread function.     c. You should always assign a name to the thread using its Name property. (This was pointed out to me by Kalyan Krishna. He said it invaluable...

New Features in WCF 4

1. New features in WCF4 a. Simplified configuration b. Discovery c. Routing Service d. WCF WebHttp Services e. Workflow Services f. Advanced Features 2. WCF 3.x required at least one endpoint to be defined. WCF 4 comes with a default endpoint for each address/contract. 3. The moment you configure even a single endpoint for your service all the default endpoint will disappear. 4. You could also further add default endpoints in code after configuring your custom endpoints using AddDefaultEndpoints(). 5. To modify default behaviors simply add a behavior and do not give any name to it. 6. We no longer need .svc files and instead use the configuration as follows a. System.serviceModel/serviceHostingEnvironment/serviceActivations/Add <add relativeAddress=”Greeting.svc” Service=”GreetingService” /> 7. There are two types of Service Discovery a. Adhoc – within local subnet (LAN) using UDP b. Managed – outside but managed network us...

A few things on Session you should know

I got to read a good article explaining the nuances of cookie less sessions which prompted me to note down a few important things. Here is the link to post that started me on this. To simply enable cookie less session do this - <sessionState cookieless="true" /> What this will do is that your URL’s start looking like - http://mysite.com/ (22b5c4zyybphaw2mt3hjni2n) /Home.aspx This is obviously not secure. However what I want to note here is that even just having cookie based sessions (which is the default setting in .net web applications) is also not secure enough. So did a bit of binging and found out fairly quickly that best thing to do is obviously setup the whole web site on an SSL. (pretty obvious that one). However what if there are some pages that are outside the ssl. There is one confusing or very near and related setting in the forms element of the authentication tag that might fool someone which says setup forms element for authentication with ...

Introduction to ADO.Net Entity Framework 4

The ADO.Net Entity Framework 4 is an ORM (Object Relational Mapping) framework that allows developers to work with relational data as application specific objects, freeing us from the need to write the data access plumbing code. We us LINQ to query data and retrieve and manage data as strongly typed objects. EF also provides us with services like change tracking, lazy loading and query translation. It supports the development of data – oriented software applications. Features of Entity Framework 4 - Works with a variety of databases (SQL Server, Oracle, and DB2) Rich mapping engine to map application objects to database schema. Integrated Visual Studio tools to visually create models or to auto generate models from an existing database (EDM Generator and EDM Designer). Integrates well into any .net applications like asp.net, WPF and WCF. Programming model similar to ADO.Net since EF4 is built on top of existing ADO.Net provider model. Reduced development time. Application centric objec...

Workflow Foundation 4 - Part 3 - Data storage and management

This is my third post on WF4. First one was an introductory post on WF4 and in second one we focused on executing workflows. In the this post I am going to focus on the topic of data storage and management. Every business process or flow depends on data. When you think of data there are three elements to it as listed below - Variables - for storing data Arguments - for passing data Expressions - for manipulating data. Let us first look at the variables. Variables are storage locations for data. Variables are declared before using them just like in any other languages like C# or VB.Net. Variables are defined with a specific scope. When you create a variable in an activity the scope of the variable becomes that activity's scope. Variables can also have access modifiers like None, Mapped or ReadOnly. Let us look at an example where we will create two variables and assign a scope to them along with access modifiers. //Declare a sequence activitiy Sequence seqWf = new Sequence(); //de...