Sunday, December 26, 2010

VB.NET Lecture # 1

Technology Trend: A brief review
Some time back companies acquired software to automate and speedup individual activities. For example a company bought an attendance system to improve timings, attendance and related activities. Similarly some companies bought “General Ledger” whereas others bought “Inventory Control Systems”.
Later people started to realize that greater benefits could be achieved if the data stored in one application is shared by others or if the applications integrated with each other. This lead to the introduction of Enterprise Software Solutions which consist of a number of modules supporting various activities of business. These modules are integrated with each other so that a holistic view of information is made available to stakeholders. These modules are often loosely coupled distributed applications that involve integration of components developed in different technologies.
The conclusion of the above discussion is that, these days it is important that the technology used by developers support integration of your product with others developed using heterogeneous platforms.

What is Microsoft .NET?
It is a set of software technologies for connecting information, people, systems, and devices. It enables a high level of software integration through the use of Web services that are small, discrete, building-block applications that connect to each other as well as to other, larger applications over the Internet.
What is a Framework?
It is a set of assumptions, concepts, values, and practices that constitutes a way of viewing reality. An example of framework is “The Primary Framework for literacy and mathematics” developed by the “Department of Children, Schools and Families, UK”. This framework has been designed to support teachers and schools to deliver high quality learning and teaching for all children. It contains detailed guidance and materials including concepts, values and practices to support literacy and mathematics in primary schools and settings.
Similarly in the local educational institutions you will find all teachers following certain guidelines and readymade documents. For example, similar attendance sheet is used by all and same marks distribution is followed. This is also an example of framework.

What are Software Frameworks? They support the development of software by providing collection of items which are reusable as a group. They have carefully designed plug–points into which the user inserts code to customize or extend the framework.
Horizontal Frameworks: Are generic and can be used to develop products for any business domain.
Vertical Frameworks: Are specialized and can be used to develop products for a specific domain.

What is .NET Framework? The .NET framework thus is a set of concepts, values, practices and items that can be used to develop next generation of applications. The .NET framework being a software framework has plug-In points defined that allow users to write code in order to develop customized applications. The .NET framework has two main components that are CLR (Common Language Runtime) and .NET Class Library. The details of these components will be discussed later in the text.

Objectives of the .NET framework:
The .NET framework is designed to achieve the following objectives,
• To provide a consisted programming environment whether a person is developing a window-based, web or other type of applications.
• To ensure that the code written in .NET can integrate with any other code. This has been done by making use of communication means that are industry standards rather than propriety ones
• To facilitate programmers by providing a consistent object oriented programming environment irrespective of whether the code is stored/executed locally, remotely or involves internet.
• To provide an environment that minimizes software deployment and versioning conflicts.
• Enable safe execution of code, including code created by unknown semi-trusted third party
• To improve performance that were there in previous scripted or interpreted environments

Components of .NET framework:
• Class Library: As mentioned that each framework has a collection of reusable items. The collection of reusable items, which is object oriented, is known as Class Library in Microsoft.NET
• Common Language Runtime: Like the runtime of any other language, CLR has the responsibility of executing the code of that language. However in .NET, CLR has additional responsibility of converting the code into native platform code. In other words, the responsibility of CLR is to translate code into platform understandable form, manage code at execution time, provide core services such as memory management, thread management, and remoting, while also enforcing strict type safety and other forms of code accuracy that promote security and robustness

Other important concepts:
Compiler: The responsibility of compiler in the environment of Microsoft.NET is to identify any syntactical errors in the code. If there are not any, then it converts the code into intermediate form
MSIL (Microsoft Intermediate Language): The compiled code in .NET takes the form of MSIL. Every language in .NET is converted into MSIL after compilation which is then converted into native form on execution by the CLR.
Assembly: The .exe or .dll file which is generated after compilation is referred to as Assembly. This assembly has two major ingredients, MSIL code and Metadata.
Metadata: Metadata means data about data. Metadata describes the types, members and references in code. This metadata is used by Runtime to locate and load classes. In addition it is also used for laying out instances in memory, to resolve method invocations, generate native code, enforce security and set run-time context boundaries

Monday, December 13, 2010

Hard Disk Getting Filled In Windows 7

While working in office I noticed the Low Disk Space message on my Windows 7 machine. I calculated the total amount of memory consumed and it summed up to just 21 GB whereas the primary partition that was filled up had 30 GB of space.
Although the problem is not solved yet, but still I accumulated a lot of interesting bits of information.
First one is a tool named “TreeSize”.
TreeSize is a free tool that examines folders or hard drives to indicate the information consumed by items. It shows a lot of info that windows explorer does not show.
For example, through TreeSize I found that there is a file named “hiberfil.sys” which is consuming 1.5 GB of my Hard disk space and an MSOCache Folder which is consuming upto 2 GB of space.


Then I went on to search how to remove and get back the 1.5 GB space. Through this I determined that if hibernation is disabled then this file gets deleted automatically.
I found a very good article to do that and I am including its link below.
http://www.howtogeek.com/howto/15140/what-is-hiberfil.sys-and-how-do-i-delete-it/

Another folder that was eating a lot of space was MSOCache. On research it was discovered that this folder is related to MSOffice and is never recommended to delete it with windows explorer. The right way to clean this is to use Windows Cleanup Wizard

One last bit of information that was related to all this was using the "%temp%" command which should be typed in Run text box. This box is either displayed by clicking the start button or press Windows Button on Keyboard in combination with letter R . Novice users should just keep in mind that it displays a list of temporary files that you can delete without any fear or danger. In case, While deleting these files you encounter a warning that a particular file should not be deleted then you should not delete that file. Deleting these temporary will also make a lot of space available

The sad part of this story is that within 2 minutes of freeing up 1.5 GB my hard disk got filled again