Normally user interface designs come from layout artists, but there are times that the developer and the layout artist are one and the same. However, not every developer is gifted with an eye for design, so this task is a bit of a challenge. Here are some tips and tricks to consider when you wish to create pages that are easy on the eyes:
1- Determine the purpose of the website
First of all, you need to think of what the website is all about and what it is for. Use simple color combinations, preferably including white for the main body of information-heavy web pages such as online encyclopedias, wikis, school websites, and online libraries. Who is the target audience/users of the site? If, for example, the audience is mostly students, you can provide them with an advanced search column. Organize the buttons and links in a way that are easily accessible and understandable without diverting attention from the main content of the page by placing advertisements or flash animations a considerable distance from them.
2- Try a simple 3-Column navigation layout
For pages that contain a lot of modules and information categories, you might want a layout that has a simple banner at the top, a navigation bar for the different modules of the website. After this, your page body can have 3 columns:
Links to specific module detail pages Main body Extra links column, with a search bar (to related modules or external pages)
In bootstrap, all you need is to utilize the framework’s grid system. Choose light color combinations as the visitors of pages like this are there for information rather than entertainment.
3- Square Grid Layouts
This can be used mostly on business type websites because they usually have lots of content that they want to show right on the home page. The grids contain snippets and thumbnails of content that can be found in the other pages. You can have a slightly larger banner for this one with images of your establishment or promotions.
To achieve this, you can also simply make use of the bootstraps grid and column system. Here’s a code snippet to create columns within a grid container:
/* Content */
When we say business type website, we are referring to company pages or corporate websites. Sites that are for online shopping are more suited to the 3-column navigation style.
4- Use images with appropriate sizes
Consider the images and animations that you’ll be using. Make sure that the sizes of the images you’ll be using match the size of the containers where you’ll be putting them in. This is to avoid stretched or pixilated images. Also, avoid showing pictures that are too large right away because these are primary causes of slow loading time. If there is a need to show them in their full glory, you can just have thumbnails and link them to the full-sized pictures.
5- Use appropriate font families and color combinations
Limit the fonts that you use to ones that are easy to read no matter what the screen size is, like a Serif for headers and Sans Serif for the body. Also, make sure that you use only one or two varieties per page because this also contributes to loading time. Here’s a CSS snippet for setting fonts:
font-family: ‘MS Sans Serif’;
Designing your website doesn’t need to be a gruesome task. As long as you are able to present your data neatly and efficiently, your visitors will be pleased. Try these tips and mix and match some of the ideas to fit your needs.
Dynamics in C#
“Dynamic” is a keyword introduced in Microsoft .NET framework 4.0 and C# 4. In order to understand why this keyword has been introduced in C# and what its functionality is, the difference between the statically and dynamically typed languages needs to be explained.
Statically vs. Dynamically Typed Languages
Programming languages are broadly categorized into statically and dynamically typed languages. Statically typed languages are those in which the object type is checked at compile-time, and the compiler generates errors in cases of an object type mismatch. C# and Java are typical examples of statically typed languages. If an integer type variable is assigned a string type value, the compiler will generate an error and the code will not compile.
Why Dynamic Type Was Introduced?
C# lacked dynamic feature before .NET Framework 4.0, which restricted C# to interoperating with other dynamic languages and frameworks. This was a considered a major limitation since, without dynamic features, it was extremely difficult to talk to DLR, COM, and other dynamic frameworks.
How Dynamic is Implemented?
Keeping in view the above-mentioned issues, developers started working on a feature that could maintain the statically typed nature of C# while also interoperating with dynamic frameworks. Therefore, the Dynamic keyword was introduced, and is used statically like any other type; however, its type is identified at runtime, fostering dynamism.
dynamic name = “jones”;
When the above code is compiled, the compiler does not know about the type of the dynamic variable name until the run time. This variable is dynamic. At run time, CLR identifies the type of the name variable (which is String), thus allowing all the string functionalities on “name” variable.
To make things more interesting, let’s call a function that is not present in the String class. You will see that the code will still compile. For instance, add another line of code to the code above snippet:
Now, a function called GetWater has been called on the name variable. The name variable contains a string and string class has no GetWater function. Yet the code compiles. This is due to the reason that the name variable is dynamic and the compiler has no idea what this variable contains object type. Since the object type is unknown, it has no idea about the functions being called on that object type. Therefore, when it comes across the GetWater function, it doesn’t generate any compiler time error and shifts the type identification responsibility to the CLR.
When CLR encounters this line of code, it seems that this variable is declared dynamic, so it’s its duty to identify the type. CLR identifies the name variable as a String, therefore generating RuntimeBinderException as String doesn’t contain any method called “GetWater ()”.
The output of the code snippet is as follows: