As you all know, Windows 8 gives a lot of advantages for the developers, specially entrepreneurship a good platform to compete with grand scale products. It was Apple who introduced it and Google who ruined it with rubbish apps and now its Microsoft who comes with certain quality requirements and specifications that an app must fulfill to be featured in the Windows  store. As same as in all other platforms, there are few key areas that you need to concentrate on if you need a killer app to be put in.

  • Value – Which segment of people will be befitted with the app
  • User Experience - It is not only about the user interface with attractive colors and tiles, but the navigation, placements and many things come into account when consider the user experience.
  • Functionality – Might be the most important as it need to be rock solid.

Some said, Imagine Cup Sri Lanka deserves to be in the IT Faculty. Some said this time it’s IIT going to win as they got 16 teams out of the 32 or 33 local finalists. Some gave “Pora talks” saying with a gadget on the arm, they can save the lives of blind. Some asked how a team of 3 with one being suspended can win over with such a morale. Things went upside down sometimes when felt the danger of being disqualified at a point. We had enough stuffs to laugh at with some advises by genius on sho

wing impressions on Facebook. Missing a member who cared that time as a brother was another. But we had a cool captain who did not give a damn about odds against us and a designer who was hardworking. With a mentor who was not only a mentor at sometimes, we came to the local finals.

Read the rest of this entry

It’s been a while me started using a Windows Phone as I got one at Imagine Cup 2012 Worldwide Finals held at Sydney. Since then the first day I came to SL, I went to Dialog and replaced my SIM card with a super sim. It was a time where not the best devices came out for Windows Phone but Nokia Lumia 800 I got was way far sexy. The strong front Gorilla glass has been used for past 7 months without a fraction on it. ( I did not try putting it down.)

Read the rest of this entry

, ,

It’s being a long time I was unable to add new post to my blog as I was busy. As usual exam times came and that busyness vanishes for me while everyone else stick their eyes on any related printed material. In a way writing down 5 exams is way far easier compared to 11 subjects had in last year.

People run for GPA by writing down exact same thing written in tutorials. Have to complete about 50 subjects for 4 years and I do not know how a person could remember all these when he gets graduated. Luckily my memory has a flush button which erase everything after the end of respective subject’s exam.

Read the rest of this entry

The user data are not shared among any outer sources and will be used only for the use of advertisements appear in.

Initially, this looked wired to me. What is the need of such tool/framework…? After reading some articles and watching some cool videos I understood the power that it brings is pretty much to the .NET Applications including SharePoint. In simple terms, it is a technology that provides an API, an in-process workflow engine and a rehostable designer to implement log-running processes as workflows within .NET Applications(via wikipedia).

Read the rest of this entry

,

As you know, Windows 8 is going to be a killer as a next generation application. Being to metro gives that ability to implement it along with the Windows Phone 8 as well. This may make a quite revolutionary impact on the user experience. Some may say it is something new that they need to adopt for metro app development. Actually, there is no rocket science in it. All you need is to be capable of adopting for that.

Read the rest of this entry

, ,

There are many types of validations that do allow in MVC Models such like Required Field Validator, Data Type Validator, Range Validator and etc… But there is a way that the developer can write his own Validation Rules and work with them as a normal validator that comes built-in. This is way far easier in MVC.

First Create a New MVC 3 Application. Create a new class in the Model or can use the existing one as well. Add a reference to System.ComponentModel.DataAnnotations.

using System.ComponentModel.DataAnnotations;

In this case, I am going to use as sample model named User for the validation.

public class User
    {
        public int UserID;
        public string Gender;
        public string Salution;
        public string UserName;
        public string FirstName;
        public string LastName;
        public DateTime RegistrationTime;
    }

I do need to validate the inputs{“Male” or “Female”} for Gender of the User and I would like to name that controller as GenderValidation.

Here comes the action.

Define a class named GenderValidationAttribute that inherits from ValidationAttribute. Then override the method IsValid from the Base class.

public class GenderValidationAttribute : ValidationAttribute
    {

          protected override ValidationResult  IsValid(object value,
 ValidationContext validationContext)
        {
            string gender = value.ToString();

            if (!(value.Equals("Male") | value.Equals("Female")))
            {
                return new ValidationResult("Invalid Input for Gender.");
            }
            return ValidationResult.Success;
        }

    }

Now this can be used as normal as a general Validation Attribute. Change the User Model like below.

public class User
    {
        public int UserID;
        [GenderValidation]
        public string Gender;
        public string Salution;
        public string UserName;
        public string FirstName;
        public string LastName;
        public DateTime RegistrationTime;
    }
, , ,

Well, this looks much same as you see. In English, Website is a sort of a Web Application. But from the developer’s perspective, the Web Application project type and the Website Project Type have many differences. If you are a Visual Studio 2005 user, You will not get Web Application Project type if you have not installed Service Pack 1.

There are four major differences of each as they are highlighted.

1) Visual Studio Project File

A Web Application stores information about the project such like the list of files available and the references that the project has included. This is under the extension of .csproj or .vbproj depending on the language used for coding. A Website does not contain such information file and it just list all the files in the folder structure into a site.

It is easy to temporarily remove files from the site but still make sure that you do not lose track of them, because they remain in the folder structure. For example, if a page is not ready to be deployed, you can temporarily exclude it from the build without deleting it from the folder structure. You can deploy the compiled assembly, and then include the file in the project again. This is especially important if you are working with a source control repository. Therefore the Web Applications does suppose to be better than the website at this point as the only difference is availability to copy and paste without compiling in websites. Compiling does not take that much of a time. So Web Applications ROX…

2) Point of Compilation

A Website has its code in a special App_Code directory and it’s compiled into several assemblies(DLL) at run-time. A Web Application is pre-compiled into one single Assembly.

Compiling in advance makes sure that users do not have to wait while the site compiles on the production server. (If the site is very large, dynamic compilation of a Web site project might take a noticeable amount of time. Dynamic compilation occurs when a request for a site resource is received after an update to the site, and the request that triggers compilation might be delayed while the required resources are compiled.

In other ways, Website makes the ease of testing without waiting for the changes of the dependent files. Therefore, I would prefer websites for a small scale application and if needed to be changed the source frequently as you cannot change the entire source at once and test. If it is a website, small parts of the website can be changed easily. So, there are still advantages using websites.

3) Explicit Namespaces

In a Web Application, explicit namespaces are added to pages, controls, and classes by default. But in a website you need to add them manually.

4) Deployment on Server

A Website can be either copied directly or pre-compile and put the set of files into the destination. In Web Applications, you will have to compile and publish the application assemblies that will be running on the IIS server. There is a rich support for compilation of Web Applications in Visual Studio but less likely to be for Websites.

Here we have the security conformance. If you are using a web application, it is 100% sure that your source code is not exploited to who ever the person do even hack the server. Form developer’s perspective, you can demand the source code for a higher amount as you still provide the functionality without it.

,

A meta data class is a class that defines something that could not be done in the class in the higher level. One of the key reasons that you would need meta classes is when you are using the Entity Framework. It is useless that you modify the validation controls in the Entity Model as it will be rebuilt when you build or debug the application. So the code that you added later to validate will not be there for any more.

In such cases, Meta classes will be useful. It’s just a matter of creating a new class and adding a sort of a reference to it in the entity class generated by the Entity Framework. This is quite simple.

For example, I am going to use a sample class named Customer in order to validate it from outside.

public class CustomerMeta
{
    [Required()]
    public string Name;
    //More code goes here
}

Now add the MetadataType attribute to the class located in Entity Framework. This will not be removed per each rebuild of the application.

[MetadataType(typeof (CustomerMetaData))]
public partial class Customer
{
    public string Name;
   //Variable and method declarations
}

At last, you will have to gets two using statements for both the classes. I will let you know what they are.

, , ,