Wednesday, 8 February 2012

Assemblies in .NET

Assemblies are the fundamental building blocks of a .NET Framework application. They contain the types and resources that make up an application and describe those contained types to the common language runtime. Assemblies enable code reuse, version control, security, and deployment.

Put simply, an assembly is a project that compiles to an EXE or a DLL file. Although .NET EXE and DLL files resemble their predecessors externally, the internal structure of an assembly is quite different from that of an EXE or DLL created with earlier development tools. An assembly consists of four internal parts:

The assembly manifest, or metadata. This contains information about the assembly that the common language runtime uses to obtain information about the assembly. The type metadata, which exposes information about the types contained within the assembly.

The intermediate language code for your assembly.

Resource files, which are non-executable bits of data, such as strings or images for a specific culture. The assembly manifest contains the metadata that describes the assembly to the common language runtime. The common language runtime then uses the information in the assembly manifest to make decisions about the assembly's execution. An assembly manifest contains the following information: Identity.

It contains the name and version number of the assembly, and can contain optional information such as locale and signature information. Types and resources. It contains a list of all the types that will be exposed to the common language runtime as well as information about how those types can be accessed. Files: It contains a list of all files in the assembly as well as dependency information for those files. Security permissions

The manifest describes the security permissions required by the assembly. If the permissions required conflict with the local security policy, the assembly will fail to execute. For the most part, the developer does not have to be concerned with the contents of the assembly manifest. It is compiled and presented to the common language runtime automatically. The developer does, however, need to explicitly set the metadata that describes the identity of the assembly. The identity of the assembly is contained in the AssemblyInfo.vb or .cs file for your project. You can set identity information for your assembly by right-clicking the AssemblyInfo icon and choosing View Code from the drop-down menu. The code window will open to the AssemblyInfo code page, which contains default null values for several assembly identity attributes. The following code example shows an excerpt from the AssemblyInfo file.

Creating Class Library Assemblies

You will frequently want to create class library assemblies. These represent sets of types that can be referenced and used in other assemblies. For example, you might have a custom control that you want to use in several applications or a component that exposes higher math functions. Such an assembly is not executable itself, but rather must be referenced by an executable application to be used. You can create class library assemblies and control library assemblies by using the templates provided by Microsoft Visual Studio .NET.

The class library template is designed to help you create an assembly of types that can be exposed to other applications, and the Microsoft Windows control library template is provided to assist you in building assemblies of custom controls.

Creating Resource Files

The .NET Framework includes a sample application called ResEditor that can be used for creating text and image resource files. The ResEditor application is not integrated with Visual Studio .NET-it must be run separately. In fact, it is supplied as source code files and must be compiled before it can be used.

The ResEditor source files are located in the FrameworkSDKSamplesTutorialsresourcesandlocalizationreseditor folder, which is in the folder that Visual Studio .NET is installed in. You can build the application using either the batch file supplied in that folder or by adding the source files to an empty Visual Studio project, configuring, and then building them.

Embedding Resources

Once you have created resource files, you can embed them in your assembly. This allows you to package resources into the same assembly as the code files, thus increasing the portability of your code and reducing its dependence on additional files. To embed an externally created resource into your assembly, all you have to do is add the file to your project. When the project is built, the resource file will be compiled into the assembly.

Creating Resource Assemblies

You can create assemblies that only contain resources. You might find this useful in situations where you expect to have to update the data contained in resource files, but do not want to have to recompile your application to update it.

Creating Satellite Assemblies

When creating international applications, you might want to provide different sets of resources for different cultures. Satellite assemblies allow different sets of resources to automatically be loaded based on the CurrentUICulture setting of the thread. You learned how to automatically generate applications for localization in Chapter 8. In this section, you will learn how to create additional satellite assemblies and incorporate them into your application.

Visual Studio .NET allows you to effortlessly create satellite assemblies. All you need to do to create a satellite assembly is to incorporate alternate sets of resource files that are appropriately named into your application. Visual Studio .NET does the rest upon compilation.

To be incorporated into a satellite assembly, your resource file must follow a specific naming scheme based on the culture it is designed for. The name of a resource file for a specific culture is the same as the name of the resource file for the invariant culture, and the culture code is inserted between the base name and the extension. Thus, if we had a resource file named MyResources.resx, a resource file containing alternate resources for neutral German UIs would be named MyResources.de.resx. And a version of the file containing German resources specific for Luxembourg would be named MyResources.de-LU.resx.

Once these alternate versions of the file are added to your solution, they will automatically be compiled by Visual Studio .NET into satellite assemblies, and a directory structure for them will be created. At run time, the culture-specific resources contained in these files will automatically be located by the common language runtime.

Retrieving Resources at Run Time

At run time, you can use the ResourceManager class to retrieve embedded resources. A ResourceManager, as the name implies, manages access and retrieval of resources embedded in assemblies. Each instance of a ResourceManager is associated with an assembly that contains resources.

You can create a ResourceManager by specifying two parameters: the base name of the embedded resource file and the assembly in which that file is found. The new ResourceManager will be dedicated to the embedded resource file that you specify. The base name of the file is the name of the namespace that contains the file and the file without any extensions.

The assembly parameter refers to the assembly that the resource file is located in. If the assembly that contains the resources is the same assembly that contains the object that is creating the ResourceManager, you can get a reference to the assembly from the type object of your object.

Understanding Private and Shared Assemblies

Most of the assemblies you create will be private assemblies. Private assemblies are the most trouble free for developers and are the kind of assembly created by default. A private assembly is an assembly that can be used by only one application. It is an integral part of the application, is packaged with the application, and is only available to that application. Because private assemblies are used by one application only, they do not have versioning or identity issues. Up to this point, you have only created private assemblies.

When you add a reference to a private assembly to your project, Visual Studio .NET creates a copy of the DLL containing that assembly and writes it to your project folder. Thus, multiple projects can reference the same DLL and use the types it contains, but each project has its own copy of the DLL and therefore has its own private assembly.

Article Source: http://EzineArticles.com/1252001

Tuesday, 7 February 2012

Most Common Traits of Good Developers

After all of the years of working together with developers across the country from companies big and small, I have gradually made a shift in the way I see my fellow developers. I did previously measure each developer by the years of experience and how well they might rattle off the answers to technological questions. Looking back now, it is amazing how much talent I was turning away when conducting interviews since they couldn't answer the questions which I thought were very basic to all C# developers. I convinced myself that a good developer should know all the particulars of the.NET platform, and should be able to answer all questions associated with the subject, but I discovered that I was wrong.

It occurred to me back in '06 when I was working on-site for a customer for around two years. Over the course of that time, I turned away about thirty interviewees for a mid level ASP.NET position and I gave the "thumbs up" for 2 which were both screened by the internal team before being hired. I believed that the ratio of two out of those thirty people that I've interviewed is a decent ratio. Within the first several months I could see trouble brewing from a mile away, however it took me a while to find out what went wrong - I was taking a look at each interview and applicant the wrong way. Long story short, they were both let go within a year and a half shortly after I left to jump onto another project.

What went wrong? What should I been looking for? I had to take a step back and check out all of the past colleagues over the course of my then eight year career. What does all of them have in common? What about the ones that I wish I didn't have to work with? When I matched all of them and compared them side by side the answer jumped out at me. The team members that I admired the most had tenacity. They had grit. They are very determined. They knew that they wouldn't fail, and couldn't fail. What else did they have in common? Those people were not the smartest people in the room. You read that right, they weren't.

Here's the moral of the story - I found out that the best team members are not the ones who hold the best college degrees or can be proficient in the most programming languages. The best team members you can find are the ones that never give up (I know that sounds cliche). They are the ones that will do whatever it takes to make a project succeed whether that means working extra hours or picking up the slack for someone that is behind. They are also the type that doesn't care about office politics, looking good to managers, promotions, etc. Their approach is that the work comes first and whatever happens after that is a result of their efforts. A simple rule, isn't it? However, that lesson took me more than 8 years to learn, and now, I'm using that lesson as my way of interviewing candidates for my project(s).

Article Source: http://EzineArticles.com/6755878

Monday, 6 February 2012

Programming Career Options

The world of programming has a multitude of specialties, giving us a wide range of areas in which to focus our careers.

The 2 main choices to make are:
* which technology to get involved in.
* which work environment would suit you best?

Let's get an overview of technologies out there.

PC Programmers
These are the guys that write your mainstream programs that are generally Windows driven, interactive and user friendly. You find them in the shops behind the counter, at the movie ticket sales, the tellers at the banks, the video store etc. They write programs that generally run on your desktop or laptop, and are built for easy interaction with the user. These programs are built to run small businesses or are combined with many other programs to help run larger businesses. Typically used languages are JAVA, C, DELPHI, .NET and Visual Basic.

Internet Programmers
Internet programmers are the guys that write the fancy stuff on the Internet. I am not talking about the fancy graphics, links and displayed information (which is built by 'web designers'). I am talking about the involved processes that go on behind the scenes like sending information from the web page to a database and back. These guys generally use .NET, ASP, PHP or Coldfusion. These guys not only have to know how to program but also how to incorporate programs into a web site - exciting stuff.

Mainframe Programmers
These guys work for the large companies like banks, insurance companies, mining houses and huge retail stores. They write programs that deal with huge amounts of data, like processing millions and millions of customer's information. This stuff needs huge computers to run, called 'mainframes'. A large proportion of programmers fall into this range. Typical languages used are COBOL, DB2 or CICS. A lot of these programs are usually 'back-end' programs that do processing behind the scenes, as opposed to 'front-end' programs that are interactive with a person behind the screen.

Database Specialists
Larger companies that have a massive database infrastructure, employ specialists to look after these databases. After all, this is where all the data is stored. The folks are called Database Administrators (DBA's), and have been trained to handle the 'ins' and 'outs' of storing and accessing data easily. They play a huge role in the organization as without the data, we can shut the systems down.

SAP Programmers
Large businesses have many different areas requiring their own processes (sales, accounts, marketing, human resources, stock). The challenge has always been getting these different processes to 'talk' to one another. SAP came along with one HUGE application, incorporating all these areas, using the same technology . The 2 main languages used to build this application are ABAP and JAVA. This is not a place to start a programming career as it requires a few years exposure to systems, but definitely where more experienced folk are aiming toward.

Article Source: http://EzineArticles.com/2944545

Sunday, 5 February 2012

The Significance of ASP.NET Development

In Today's cut-throat business competitive environment, ASP.NET Development plays a vital role in software development. Now a days, many software development companies use this technology to develop the applications because of its robustness for developing web-based solutions.

It is used by the programmers to create dynamic web applications, and web services. ASP.NET Development can be used to create anything from the small websites to large web applications.

It makes use of.NET Framework, which includes a huge library of classes that contains pre-defined functions for common programming problems. The core of.NET Framework contains the Common Language Runtime (CLR), which provides the runtime environment to execute the programs developed for the.NET framework.

The technology can make use of Visual Studio.NET to design the ASP.NET Web Forms and debug and deploy web applications.

It provides interaction between the applications working in different environments. It also provides support for ADO.NET to access various data sources, such as Microsoft SQL Server, Oracle, and DB2. In addition, it provides support for mobile devices with only one code base.

ASP.NET Developers use various ASP.NET features to develop and customize the ASP.NET applications. Various features are:

o Master page: Helps you to apply a consistent look and feel to every webpage of the web application. o AJAX controls: Provides a set of controls used to create dynamic and rich web applications. These controls insulate you from the complexities of AJAX. o Language Integrated Query (LINQ): Provides the data querying capability to C# and VB.NET, which allows you to retrieve data from databases, objects, and XML. LINQ provides support for compiler and intellisense. o Windows Presentation Foundation (WPF): Provides a unified programming model to build feature-rich application that includes user interface, media, and documents. o Windows Communication Foundation (WCF): Makes use of a service-oriented programming model to simplify the development of linked applications. o Web Service support: Provides in-built functions that help you to consume and publish the web service in an efficient manner. o Rich-Output Caching: Allows you to cache the data to avoid the recreation of information. o Themes: Allows you to customize the look and feel of the web application.

Article Source: http://EzineArticles.com/2907464

Thursday, 2 February 2012

Scripting Or Programming and the Balance of Getting Work Done

I guess it makes sense that deciding to go back into programming that I should keep up with the latest developments and benefit from what the development community has learned. I have spent a lot of my career in the scripting world, starting from turning the idea of monolithic monsters into something that was configurable and easily changed, to just scripting in applications and on pages, from printing to the web. I still feel the disappointment that floored me when I had spent months in my own time designing a working BASIC interpreter for using on the web, just when Microsoft came out with their scripting interface. This interface then went on to be ASP and now ASP.NET.

In the end though it seems that scripting or programming blends together and all scripting really meant that I was taking advantage of the configuration of something before it became bound into the final application, web pages or user experience. It only really seems a requirement if you cannot change someone else application and you need detailed configuration.

However, looking at the development world now after almost ten years brings on a down side.

Even though I am not scared by any programming language or technique I must admit that the amount of new things, the new techniques and methods of creation here are causing me to feel very uncomfortable. A concern in the back of my mind is the balance of time between learning new things and the work that needs to be done. While you are learning you are not productive. What would be the point of taking the days to create an application to do something that would only take an hour? Believe me I have been there so many times before. You can literally spend the whole of your life learning and in the end not doing anything!

The balance however is the amount you need to do. My ambitions in this area are huge, in fact well beyond what I think I am capable of at the moment and that puts the pressure on.

But what it does mean is that if I can learn the techniques to do these tasks then I will become quicker at creating them. My direction here is to reach a stage where I can create the tool to do something quicker than I would be actually doing the task. Is that possible? Let's see...

The side where my balance towards learning wins out is where I need to do something on a regular basis. Having to do something over and over again is something I abhor; I never want to do something more than once if possible - unless of course I actually enjoy the act of doing it:)

Article Source: http://EzineArticles.com/4463205

Wednesday, 1 February 2012

Most Common Traits of Good Developers

After all of the years of working together with developers across the country from companies big and small, I have gradually made a shift in the way I see my fellow developers. I did previously measure each developer by the years of experience and how well they might rattle off the answers to technological questions. Looking back now, it is amazing how much talent I was turning away when conducting interviews since they couldn't answer the questions which I thought were very basic to all C# developers. I convinced myself that a good developer should know all the particulars of the.NET platform, and should be able to answer all questions associated with the subject, but I discovered that I was wrong.

It occurred to me back in '06 when I was working on-site for a customer for around two years. Over the course of that time, I turned away about thirty interviewees for a mid level ASP.NET position and I gave the "thumbs up" for 2 which were both screened by the internal team before being hired. I believed that the ratio of two out of those thirty people that I've interviewed is a decent ratio. Within the first several months I could see trouble brewing from a mile away, however it took me a while to find out what went wrong - I was taking a look at each interview and applicant the wrong way. Long story short, they were both let go within a year and a half shortly after I left to jump onto another project.

What went wrong? What should I been looking for? I had to take a step back and check out all of the past colleagues over the course of my then eight year career. What does all of them have in common? What about the ones that I wish I didn't have to work with? When I matched all of them and compared them side by side the answer jumped out at me. The team members that I admired the most had tenacity. They had grit. They are very determined. They knew that they wouldn't fail, and couldn't fail. What else did they have in common? Those people were not the smartest people in the room. You read that right, they weren't.

Here's the moral of the story - I found out that the best team members are not the ones who hold the best college degrees or can be proficient in the most programming languages. The best team members you can find are the ones that never give up (I know that sounds cliche). They are the ones that will do whatever it takes to make a project succeed whether that means working extra hours or picking up the slack for someone that is behind. They are also the type that doesn't care about office politics, looking good to managers, promotions, etc. Their approach is that the work comes first and whatever happens after that is a result of their efforts. A simple rule, isn't it? However, that lesson took me more than 8 years to learn, and now, I'm using that lesson as my way of interviewing candidates for my project(s).

Article Source: http://EzineArticles.com/6755878

Tuesday, 31 January 2012

Microsoft CRM Implementation for Large Corporation - overview

Microsoft Business Solutions CRM is now approaching the phase of being mature product and the CRM solution you may consider for large publicly traded company. Our view point considers the fact of multiple platforms and systems coexistence and balancing: UNIX, Linux, Microsoft Windows, Java, .Net, PC, AS/400, RS6000, Microsoft Exchange, Lotus Notes Domino, etc. This increases the cost of maintenance, but decreases the risk of being trapped to one vendor/solution. So far we've seen successful implementations of Microsoft CRM in the following industries: Distribution, Logistics, Non-Profit, Chemicals, Pharmaceutical, Placement/Recruiting, Medicare/Hospitals, Retail, Wholesale, Education, Beverages, Services, Defense, Aerospace, Oil & Gas.

o In-house Implementation. This is non-expected paradox. Multiple clients, especially large companies, do it themselves. The reason is - Microsoft CRM utilizes all spectrum Microsoft Technologies: Exchange, Active Directory, .Net, Full-text search, etc. Microsoft oriented IT people understand it and like to be involved. So, you should consider self-implementation first.

o Integration. Microsoft CRM has relatively simple business logic and sits in Microsoft SQL Server, which enables customization and integration with third party systems and databases. If you have Microsoft Great Plains - you can use MBS CRM-GP integration tool, based on BizTalk. If you have UNIX-based ERP/Accounting, you can deploy MS SQL linked server to bridge MS CRM and ERP. The same would work for Oracle ERP - Oracle Financials. Navision has third party integration tool and the one from Microsoft is on the way to be released. Axapta is also candidate for the integration.

o Customization. Microsoft CRM SDK describes majority of MS CRM objects and classes and enable VB.Net or C#.Net developer to build-in custom .Net application for Microsoft CRM existing screens. And this is actually the way of the integration - you realize integration in the custom .Net application.

o Messaging. Microsoft CRM uses MS CRM-Exchange connector in its standard functionality. However if you have IBM Lotus Domino email server - you can deploy MS CRM-Lotus connector, developed and supported by Alba Spectrum Technologies.

o Data Conversion. You should use Scribe for initial data migration. However you need some programming work if you plan on bringing advanced data (email attachments from Siebel, for example)

o External consultants. You should consider customization and integration initial design as candidates for outsourcing. Then, when coding is done and implemented - you may switch to your internal developers to support custom pieces.

o Nation-wide support. Microsoft CRM is very innovative from the support side. It means that Microsoft CRM partners tend to go to the nation-wide and international market to sell, implement and support the application. Being web application - Microsoft CRM could be accessed, customized and modified from anywhere.

Article Source: http://EzineArticles.com/53111