Friday, December 14, 2012

About Development Frameworks

Knowing a programming language, and problem solving techniques is not enough to develop applications easily and quickly. To illustrate the idea let's assume that you want to develop a windows application. Windows works by passing different messages to different applications. For example when you move the mouse over a window, Windows will create a message that contains information about mouse x,y coordinates and send it to your application. Maybe another window is moving above yours, so another type of message is generated and sent to your application telling it redraw the window and so on.

Now why am i telling you this? Because if you want to do everything yourself you must create a function that listens to the messages that Windows generate, you must process every type of message that is sent to your application, and in some cases reply to. You must take care of redrawing the window itself, and so on. As you can see all of this has nothing to do with the problem you are trying to solve, for example creating a calculator app. All of the previous things I mentioned has to do with how your application interacts with the operating system and its messages. Obviously if you try to do this you will spend alot of time taking care of every little detail, which is : not easy, and time consuming.

The solution to this is using a Development Framework. A framework is like an application that is almost complete. All you need to do is plug in your code into it. This is a simplification of course. Frameworks are much more complicated than that. Going back to our Windows Application example, if you use VB.NET, you never see any thing about operating system messages, repainting the window, etc. It is all taken care of by the framework. You can see that there is a designer where you specify how the window looks, add buttons, and you can view the events. In addition you can access each button through a class. There is actually a class for each control such as buttons, lists, checkboxes, forms, dialogs, etc. Such classes are not part of the language at all. They are part of the framework that allows you to develop windows applications, and they hide all the complicated details from you allowing the developer to focus on the problem itself.

You could find many types of frameworks for a given language. Windows Forms in VB.NET is one simple example. Another one is WPF. It is another framework that allows you to develop windows applications using the same language. For web you have ASP.NET web forms, and MVC. All of these are frameworks for developing different types of applications. You have the same language syntax, but you use different libraries.

For Java you have: Swing for windows applications. You can use Struts - which I don't think anyone is using now - or JSF to develop web apps. You can also use Java to develop Android apps. Again in all these cases the language is the same (JAVA) but the libraries are different.

So why should a programmer knows about this? Well in the end a programmer is required to develop applications. Frameworks helps you developing them to a specific type of platform, or environment. If you don't know how to use a framework you won't be able to develop an application even if you know the language and understand how to solve problems.

Some might ask what kind of framework to learn? Well it depends on what kind of apps you want to develop. Interested in web development? You could choose PHP, ASP.NET web forms, MVC , JSF, etc. Interested in Mobile development? You could learn Android development, iPhone app development, J2ME, etc. Interested in Windows App Development? Choose from Swing, or Windows Forms, WPF, etc. There are lots of options for you. You might want to search the web and ask about the advantages and features of each framework before you choose to learn it.

Hope you find this useful.

Good luck learning a new framework. :)


Sunday, December 9, 2012

You must be a programmer, not a person who knows a programming language

Hi there guys...

One of the things that many doesn't realize - at least i think so - is that there is a difference between knowing a programming language and knowing how to program. I suppose many would say they are one and the same, but that isn't the case. So what's the difference you might say? Well this is how to think about them:

Think for a while you are in the kitchen. You might know how to turn the oven on, how to use the knife, how to mince meat, etc, but that does not mean you can cook. Cooking need experience and knowledge about how to use the items in the kitchen, and how to mix them using the correct tools.

Same is true for a mechanic. You can hold a screw driver, a wrench, use a jack, etc. Does that mean you can repair a machine? Well probably not unless you have some knowledge.

What I am trying to say here is: Programming Language is a tool. You might know how to write an assignment statement, a for loop, an if statement, or a function. Does that qualify you to solve a  problem? The answer is NO. You must have an idea how to use these tools (statements). Knowing how to use a programming language to solve problems is what makes you a programmer. Knowing about the language alone does not.

To be a programmer you should first learn a programming language, then you should learn how to solve problems. Later on you will find that learning other programming languages is very easy. In many cases the concepts are the same, the syntax is different. You could say that the way to solve a problem is the same, but the tool is different.

The VB.NET tutorials I posted on the site previously here, help you to learn the language. It does not help you a lot to be a programmer. I realized this issue at a late stage, and for this reason I started a series of tutorials called programming principles. Although the series is not finished it tries to explain how to solve some simple problems. These solutions could be combined later on to solve more complex problems. The set of tutorials for developing a point of sale system also shows how to solve a given problem.

So how do you become a better programmer? The answer is practice & reading. Practice to solve simple problems first, and expand the problem little by little. Many try to solve very large problems, and they get discouraged after a while because they can't get things done, so make sure your problem isn't that hard to solve. Reading is also useful. By this I mean reading about algorithms. Algorithms tell you how to solve a problem.

One last advice to make you improve is helping out. Youtube questions and community emails made me go and try to figure out solutions for different kind of problems, and this in turn improved my programming skills alot. So in a way I am thankful for everyone who sent an email asking me.

Hope this post explains the difference well, and hope you will start trying to solve problems. Let me know guys what kind of problems you are trying to find a solution for.

yours sincerely


Tuesday, November 13, 2012

Starting with blogging

Hi there everyone...

I used to make video tutorials and post it on youtube and my site. These tutorials where about Visual Basic .NET and I did enjoy making them. Answering people's questions was great, and the feeling you get when you solve a problem always felt good. The only problem I had was: making tutorials is a little bit time consuming. It requires planning the subjects that need to be covered, recording the tutorial, editing the video, rendering it and finally uploading it to the site. Usually a one hour tutorials requires about 3 to 4 hours to finish. Regardless I did enjoy it all.

However my free time went tighter and tighter over time. I had to devote more time to work and more time to study - which is not progressing well -. Since I did enjoy making tutorials, I thought maybe I should try posting things. I won't post these updates to the website since I want the website to be dedicated to programming, and the nature of this blog is a little bit personal.

So what kind of things I am planning to post here? Well I am thinking about some personal experiences. Or maybe some random stuff.

Me posting here doesn't mean I will be updating the website or answering VB.NET questions. However as soon as I can finish the issues I am having and have more time, I am going to go back to updating the website.

Thanks for reading this.

Wishing you all a wonderful day.