Sunday, December 23, 2012

Creating the .NET Solution Part 5

Email

Sending emails is one task that every website has to be capable of. How many emails you plan to send should certainly determine how you go about sending that email. As we do not yet know how many emails we plan to send, we will initially rely upon the tools that are provided in the .NET framework to send our email. For brevity, we will look at the specific methods from this class here.
As with all our objects, we will have the MEF Export attribute in place that makes this a Pluggable class. The class itself inherits from our IEmail interface. We will have a couple of constants declared—one for the website's receiving the email account and another for the website's sending the email account. (We could have used one variable for both, but a little flexibility never hurt anyone!)

Creating the .NET Solution Part 4

Redirection

From an OOP point of view, Response.Redirect is about as useful as the session object is (we're starting to see a trend here). It simply provides a way of sending you from one place to another. It would be nice if we could work with it using methods. It would be even better if we could hide some logic in those methods if need be. Our initial implementation is very easy.

ASP.NET Interview Question Part 3

Q21. What is Query String? What are its advantages and limitations?

The Query String helps in sending the page information to the server.The Query String has the following advantages:

Saturday, December 22, 2012

ASP.NET Interview Question Part 2

Q11. What is the behavior of a Web browser when it receives an invalid element?

The behavior of a Web browser when it receives an invalid element depends on the browser that you use to browse your application. Most of the browsers ignore the invalid element; whereas, some of them display the invalid elements on the page.

ASP.NET Interview Question Part 1

Q1. What is ASP?

Active Server Pages (ASP), also known as Classic ASP, is a Microsoft's server-side technology, which helps in creating dynamic and user-friendly Web pages.

Friday, December 21, 2012

Creating the .NET Solution Part 3

Session

The session object is another item that is frequently used in most web applications. That being said, it is also something that we can squeeze performance out of down the road. Even if performance wasn't an issue, the session object by itself does not really conform to the most basic of OOP principles. Rather than trying to cast an item out of thin air or the HttpContext.Current.Session, it would be much better if we could call an object that returned the appropriate object for us. Here is the basic implementation:

Wednesday, December 19, 2012

Creating the .NET Solution Part 2


Cache

Continuing on the principles of extensibility, we will build a cache object implementing ICache interface. Our cache implementation will wrap the HttpContext.Current.Cache object from System.Web.Caching. Tomorrow if need be, we can replace this implementation with say MemCached or AppFabric.

Creating the .NET Solution Part 1


Let's now start with implementation and for that let's create an empty .NET solution called Fishbook under which we can start creating various layers designed in the form of .NET projects.

Tuesday, December 18, 2012

Model View Presenter(MVP) Pattern

Model

The model is a direct reference to your domain logic—the business logic layer so to speak. This provides access to the back-end data (from the database) and implements additional business logic on it. As when we do authentication for a user, we need to manage encryption and decryption of the password. Such things will be managed by model.

Sunday, December 16, 2012

Layered Architecture for Social Network Web Site


Knowing that social network application is going to be a large undertaking that should last for some time, we need to design something that can be easily extended as the need arises. For that we will try to design this application with extensibility in mind. The easiest way to do that is to follow the general rule of maintaining "separation of concerns (SoC)".

Friday, December 14, 2012

Tuesday, December 11, 2012

My Own Social Network


Everyone wants to build one of their own and think they have a better idea and can do a better job than the next guy. Listed below are some of the key considerations for any social network site that often get missed out.

Social Networking


Given the boom in the Internet and mobile devices industry, people across the world are more connected than ever before. Social networking is the in thing.

Announcements

Most chat applications notify you when other users sign in. This application can discover other users but it would be better if we were notified when other users sign in. Discovery supports this feature with announcements

Tuesday, December 4, 2012

Metadata Extensions

From last article Ad hoc Discovery . When YallaTech discovered other chat instances all we knew about them was the Uri of the service endpoint. So her chat window shows a chat with the host machine name. besho, on the other hand, knew that the chat message came from YallaTech because the chat message included her name. In this article we will learn how we can extend the metadata used in WS-Discovery to supply additional information (such as the username used for the chat session).

Friday, November 30, 2012

Interview Question .NET Terminology Part 2

Q1. What is the CLI? Is it the same as the CLR?

The CLI (Common Language Infrastructure) is the definition of the fundamentals of the .NET framework - the Common Type System (CTS), metadata, the Virtual Execution Environment (VES) and its use of intermediate language (IL), and the support of multiple programming languages via the Common Language Specification (CLS). The CLI is documented through ECMA - see http://msdn.microsoft.com/en-us/vstudio/aa569283.aspx for more details.

Vacancy Interview Question

Q1. ‘Tell me what you know about this organisation.’

There is no excuse for not having a response to this question as it often comes up. Whatever the particular job that you are applying for, the interviewer will expect you to have some knowledge of the organisation, and the more the better.

Saturday, November 24, 2012

Ad hoc Discovery

In this article we will add an ad hoc discovery mechanism to the DiscoveryChat program using System.ServiceModel.Discovery, an implementation of the WS-Discovery protocol.  In order for a service to be discoverable in an ad hoc manner it needs to respond to incoming probe messages. Ad hoc discovery implies that these probe messages come in through a well known port over UDP multicast.

Friday, November 23, 2012

Interview Question .NET Frame Work Part 1

Q1. What is .NET?

.NET is a general-purpose software development platform, similar to Java. At its core is a virtual machine that turns intermediate language (IL) into machine code. High-level language compilers for C#, VB.NET and C++ are provided to turn source code into IL.

Thursday, November 22, 2012

Hosted Designer


What if we wanted to create a custom activity like the PrePostSequence and have someone else who does not have Visual Studio use it? Many products allow end users to customize workflows. Windows Workflow Foundation 4 allows us to host the designer in an application quite easily. In this article, we will host the designer and use your custom activity.

Tuesday, November 20, 2012

General Interview Question Part 2

Q9. ‘What other careers are you interested in?’

If you are applying for a computer operator’s job in order to pay the rent and secretly want to be a police officer or a ballet dancer, keep that to yourself. Again, think – why is the employer interested in this question? He or she will be most impressed by the candidate who seems serious about the job on offer and about making a career in this line of work. Talk more about your interest in this work. What attracted you to
apply and why do you think you are suitable for it? Imply that your career ambitions are in this exact field. You could add that in the future you would be interested in working your way up to a position with more responsibility, or perhaps specializing in a particular area of the work.

Thursday, November 15, 2012

Activity Designers

As We have already seen Windows Workflow allows us to build custom activities in code.  There are several types of custom activities we can build depending on the base class.

Sunday, November 11, 2012

General Interview Question Part 1


Q1. ‘What hobbies or interests do you have?’

Why should employers be interested in the answer to this question? Is it pure nosiness? Everything you say about yourself contributes to the general impression gained about you. If I tell you that my hobbies are knitting, cookery, needlework, decorating cakes and bird-watching, you have an idea of the sort of person I am. If, however, I tell you that my hobbies include karate, African music, organising a community group, gardening and swimming, the picture is quite different.

Friday, November 9, 2012

Error Handling

In the previous post Adding If / Else Logic We may have noticed a potential bug in our simple application. What happens if we don't pass a UserName to the workflow? In this article, we will add some error handling capabilities to our workflow by using the Try/Catch, Catch<T> and Throw built-in activities.

Tuesday, November 6, 2012

Adding If / Else Logic

In the previous post Workflow Application part2 we created an enhanced Hello Workflow application with a custom hello message. In this post, we will add If/Else logic to the workflow to display a different Hello message depending on a custom condition.

Saturday, November 3, 2012

Employment History Interview Question Part 1

Q1. ‘Have you had any work experience?’

This question is often asked of younger people who have just left full-time education. No employer wants to hear that you are completely inexperienced, even if you only left college a week ago. If you took part in any practical placements at college, talk about them here. You will need to come up with some kind of answer in order to reassure the interviewer that you are used to the routine of work, that you can hold down a position and that someone else has wanted to employ you in the past. Perhaps you have done a paper round; worked on voluntary projects while at school; had holiday or vacation jobs or participated in a work experience program at school or college.

Friday, November 2, 2012

Employment History Interview Question Part 2

Q8. ‘What will your last employer say about you if we ask for a reference?’

You may get asked this question even if your last employer has already filled in a reference. The interviewer wants to know about two things: first how well you got on in the last job and second, how you think other people see you. Talk up about your strong points in your answer, particularly those that will be useful in the job for which you are being interviewed. You can include negative points as long as they don’t detract from the overall positive image you are trying to create. You could say that your old boss might think that you
could be quite direct in your opinions sometimes but that you know he always valued your honest feedback. Or that your old supervisor might describe you as being the life and soul of the work team but that when there was a crisis you would be the first to volunteer to help out.

Thursday, November 1, 2012

Workflow Application part2

Our project is good but it has one weakness. It verifies that the WorkflowThread returned is non-zero but it does not verify that it returns the actual managed thread ID that the workflow ran on. Our project would pass if the workflow always returned 1.

Sunday, October 28, 2012

Workflow Application part1


To this point we have focused on creating an activity and invoking it in the simplest way possible with the WorkflowInvoker class. The WorkflowInvoker.Invoke method is simple because it is synchronous and invokes the workflow on the same thread as the caller.

Saturday, October 27, 2012

Education and Training Interview Question


Q1. ‘Why did you decide to go to college?’
This requires a full answer, and you need to go back to when you left school in order to be able to answer it. What were your long-term ambitions at the time? Were there certain subjects you particularly enjoyed at school and wished to continue to study? How and why did you choose your particular course and your specialist subjects?

Friday, October 26, 2012

Testing Workflows

Up to this point the application is not very interesting. It is only working in a console and does not receive any input arguments. Most applications that do meaningful work will have to deal with input and output arguments. Additionally, the application is not easily tested in its current form.

Wednesday, October 24, 2012

Interview Questions


Question No. 1: "Tell me about yourself."
This is usually the opening Question in an interview and it's the perfect moment for you to toot your own horn -- not to tell your life history. Your answers should be a quick rundown of your qualifications and experience. Talk about your education, work history, recent career experience and future goals.

Tuesday, October 23, 2012

Dynamic Workflows with XAML

Up to this point we have been authoring workflows in .xaml, .cs or .vb files. These files then get compiled into types that are included in the assembly of the project and run by the workflow runtime. 

Monday, October 22, 2012

The CodeActivity

We have open project from last post Refactoring Workflows as we seen on it, WF4 consists of a designer that edits .xaml files and a runtime that invokes activities. When we author a workflow, we are creating a new kind of activity and because activities are just classes that inherit from System.Activities.Activity or one of its subclasses, we can declare workflows using C#, VB or XAML. In this post, we will implement our “greeting” business process by creating an activity in C# or VB.

Sunday, October 21, 2012

Refactoring Workflows

We will refactor the solution created in last post Hello Workflow . Even though we have a working application, we might want to make a few improvements. In this post, as Workflow1 is not a very descriptive name, you will change it to SayHello.

Hello Workflow

Creating a Simple Hello Workflow Application

We will create a very simple workflow that will be the equivalent to this code:

YallaTech Facebook page