Skip to main content

Posts

Windows Phone App Design Principles

Hope most of you might have heard DOUGLAS MARTIN's quote:           "Questions about whether design is  necessary or affordable are quite beside the point: Design is inevitable. The alternative to good design is bad design, not no design at all." And    VICTOR PAPANEK says:          "Design is the conscious effort to impose meaningful order" So, if designing is that much important then one has to be very much stern about it. Going forward, today I am pointing out some design principles for  Windows Phone App. So, let's gear up. Clutter free UI - Information should be well organized and user should not get congestion like feel. Make best use of typography Focus should be on content and it should be in a way that it attracts the user's attention from the beginning itself Try to keep only the most pertinent content on the screen because when it comes to WP design, content matters more than a chrome Try to provide seamless UX from dedicated devi

Windows Phone App' s Tip - Image consideration

Images play a very significant role in any Windows Phone application. So, one should be very careful while dealing with images. As of now, Windows Phone supports only two image formats named JPG/JPEG and PNG. Now before concluding on which image format to choose, let's get into bit more depth of it. PNG format images are non-lossy and need very little CPU effort to display because those are pixel perfect. But at the same time, huge PNG images take too much longer to read from storage and ultimately lead to slower display. On the other hand, JPEG format images are lossy, smaller to store  and based on the compression level much more complicated decoding algorithm is required to display them. Another point regarding image is about opacity and transparency -  All the images that use transparency should be stored as PNG format because JPEG doesn’t support transparency and JPEG format should be used for all the images that are fully opaque. Now when coming to Windows Ph

Silly but useful stuff - Part 3 (UI)

Importance of UI in performance Simple UI tricks, such as progress bars, redirecting user's attention using animation, or placing slower loading sections at the bottom of a page or off-screen, can often ‘fix’ a performance problem without the need to tune the underlying code. These UI tricks are an important tool to have in your performance tuning toolbox and can be much quicker and easier than addressing the underlying issue. They can act as a holdover until you have the time to devote to the core problem. So, one should never underestimate the UI while tackling performance issues. Isn't it interesting :)

StringBuilder is NOT the answer for all string concatenation scenarios; String.Join could be

Yes, if you are in a loop and adding to a string, then a StringBuilder *could* be most appropriate. However, the overhead of spinning up a StringBuilder instance makes the following pretty dumb:      var sb = new StringBuilder();  sb.Append("This is "); sb.Append("not more efficient"); sb.Append(" solution."); var str= sb.ToString();   Instead, use String.Join , which is typically more performant than spinning up a StringBuilder instance for a limited number of strings. It’s my go-to concat option:             string myString = String.Join(" ", new String[] { "This", "is", "a", "much", "better", solution, "."});   The first variable of " " can just be set to "" when you don’t want a delimiter. For loops that do a lot of looping, sure, use a StringBuilder. But just don’t assume it’s the de facto solution in all, or even the majority of cases. My rule of thumb

Starting with Prism - Part 3 of n

Introduction  Continuing to my   Prism 2 of n series , in this article I am going to talk about how a communication happens between various application components, following Prism framework. Background  In earlier articles of this series, I already mentioned that Prism is all about loose coupling and modularity. So, in order to achieve both these aspects we divide our application into multiple modules. Now, when we are talking about modularity, first thing which strikes to our mind is communication. How will these module going to talk with each other, how they are going to communicate with each other, etc, etc. So, when we have a need of communication between modules, there are couple of approaches which we can take like Commanding, Event Aggregation, Shared Services, Region Context and probably there are many more. In this article, mainly I'll be taking these four concepts:    Commanding   Event Aggregation   Region Context  Shared Services      Now let's take

Const and Readonly keyword

Both these words play a very important role in defining constants in an application (C#). At one sight, it seems like, both are same but exactly it is not he case. Let's understand one by one to get the clear picture. The word const itself means, it will never change. If you are specifying any variable as a  const t hat means the value of the variable is never going to change inside the application. How we declare a constant is, by using a  const  keyword. Basically, one can define  const  only on the primitive types, like int, double, etc. One should make sure that the value should be assigned at the time of declaration itself and another important thing is whatever value is set for  const  variable, that value will be set at the compile time itself and this value will get stored inside a .dll or an .exe. In later part, I'll show u on how we can see this value inside a dll or an exe using an Ildasm. Sample code to define  const   variable is as: Another key

Silly but useful stuff - Part 2 (ASP.Net)

Using StartMode Attribute Every time we update our site, IIS must recompile it during the first request, so the initial request takes significantly longer than subsequent ones. An easy solution for this is to tell IIS to automatically recompile our site as part of the update process. And this can be achieved using the startMode attribute in the ApplicationHost.config file. In essence, we can say, by using startMode attribe, one can reduce the initial load time of an ASP.Net site. Hope it helps :)