Wednesday, March 25, 2009

Welcome a brand new starting series of posts: MVC Madness

Hi. A few months ago I've started to read about the ASP.NET MVC. And I loved what I saw there. I thought about comparing it to existing MVC frameworks in another languages and here we go, I've decided to make a series of posts with examples and snippets from each framework. Here what we have at the moment:
  • ASP.NET MVC 1.0 - the new released framework which allows us to have better control on page, cleaner HTML source, nice url formatting - routing, and all this is still ASP.NET
  • Symfony - a PHP framework which I will learn about, and you will obviously gonna help me with this.
  • Lift - also a new 1.0 framework which is based on Scala. Scala is a object-oriented and at the same time functionnal programming language which sits on top of Virtual Machine and lets you have a scalable application using the Scala itself and the libraries from the language which it exploits. For example Scala which sits on the top of Java VM, can use java libraries in Scala by importing them, and by that we achieve an interop language with objected-oriented and functionnal paradigm at the same time. Well some day I'll post particularily about Scala. So Lift is based on Scala and with this framework we can easy create a various range of Web 2.0 sites and by that I mean Ajax/COMET, jQuery and other technologies used in Web 2.0.
  • Spring - well, this framework is a widely known one. I wanted to present examples in Jakarta Struts, but I've decided that it will be better for me to learn something new, and particularily Spring. By the way, there are a lot of opinions on the Web that point us to idea that Struts has poorly implemented MVC. And that a better implementation is present in Spring. So I'm gonna give it a try.
May be there are languages and frameworks which I didn't cover yet, but you would like me to cover. If so let me know about it. I'll see what we can do. By the way, any examples of using MVC in desktop applications? So a little bit about the pattern itself. It is an old pattern. MVC was first described in 1979 by Trygve Reenskaug, who came from that interesting programming community of Smalltalk (we know all the other guys too, Kent Beck, Ward Cunningham, Martin Fowler, and others). It was introduced to separate different functional parts of application, and by that we achieve loused coupling of different parts of a system. So changing one part will not head to changing in all the parts. So what is it anyway?
  • Model - which is data, XML, object, whatever we handle and try visualize in our applications, web pages.
  • View - the presentation layer, window on the screen, our web page, UI elements which visualizes the Model. Note that we can have multiple views for a single model. We call it reusing the Model. That means that for having different views of the same data we don't need multiple tables/objects/XML tags/whatever. We can achieve we same effect using multiple Views.
  • Controller - as the name says, it controls the user input, events which happened on the View side and transmits these results to the Model.
How does it work together: Ok, here I'll give an example for you, let's say we have an Agenda - a web application. We have the database (which represents our Model) with the Users Table which contains the users id, user name and its password. And we also have the Events Table which contains event id, user id, the name of the event and the date. 1. User interacts with the View Now a user wants to add an event into his agenda. His view represents a table with a date column and an event column. If nothing is planned for a specific date he can select this date and plan an event on this date.
         Date                                         Event

               23th of March, 2009                   David's birthday
               24th of March, 2009                  
               25th of March, 2009                  
2. Now our Controller class obtains the user input and does the processing of the data, in our case it takes the name of the event and also the date out. 3. Our Controller transmits or notifies the Model about the results of his processing (in our case the name of the event and the date). Model reacts at this results in a way or another. In our case it inserts a new event into the events database. 4. The View reloads using indirectly(!) the updated Model. So, nor the Controller, neither the Model has the direct information about the View. In our case the page reloads with the event already set for that specific date. 5. The system waits for another user interactions which will restart this from the beginning. So this is an introductory post, there are a lot of deep things what I hope we will touch in our future examples. What's it for now. Waiting for your feedback and comments.

Monday, March 16, 2009

What is Udevi Community?

Ok, first of all what it's all about? Where from this funny name comes ? Udevi = U + dev + i = You can develop it! And the idea behind that is - we know you can do it, we know you can do a great app. And it doesn't matter the language in which you write, Python, Perl, Java, C# or Scala, and it doesn't matter the technology you are using or the application's level you are trying to build. You can develop it! You can do a simple calculator in Java or a big desktop app enabling rich user experience using JavaFX, or you can do the same thing using C# and WPF. What really matters in programming world is experience. You need to get up and realize that you can read lots of books and understand how everything underneath your code is working, but the theoretical knowledge isn't equal or doesn't compare with practical experience. While practicing, your skills become more and more sharpen, and you become more and more good at what you're supposed to be... a programmer, a developer which really can apply his vast amount of knowledge, and experience(!) to create, design, develop, produce an application/script/test/web page/etc. Ok, and what is this community about? Well, here is the most interesting point. We are trying to simulate real production environment and offer you the possibility to design an application from alpha to the release version, with all the iterations which you can see in real world: specs, conversation with clients, use cases, declaring bugs, resolving issues, trying to figure what you really want to do, talking with your team leader, creating points to discuss something specific. This is the simulation of the real world. And we do it for free, you will do it for experience, all your projects are yours, we won't use the results of these projects for our own sake. We will represent the clients, and the team leaders, you will try to make everything to match the specs. We might be able to help you, if you're:
  • a novice in programming world
  • a student which doesn't really knows how to make his first app
  • a guy trying to make something using a new technology
  • a person which has an idea, but who doesn't know how to do it
Well, and what do i need to do to apply? You need to:
  • Have a regular e-mail address (by this I mean an address where you check your mail often enough to communicate)
  • Have an IRC client (like mIRC)/ICQ/Yahoo! messenger/Skype for chating
  • Willing to achieve experience and work.
  • Have an established schedule, when you can work, when we can talk, when every kind of question could be addressed
When can I start?
  • You can start today if you want to (and I bet you want it).
  • We will be respecting your schedule and please respect ours.
I need to know more details. To find more details or to put a question contact me at monomachus85@yahoo.com or put a comment here.

Friday, March 13, 2009

Tip 001: Missing desktop icons in Windows Vista

Hi, today something happened with my Vista, and all the icons (not just Recycle Bin or My Computer ) from the desktop were missing, however they were displayed in Windows Explorer Folder, as well as the sidebar was displayed normally. I tried to google this thing and I've found a simple solution. So this are the steps you need to follow:
  1. Open Desktop item in Windows Explorer.
  2. Go to menu Tools -> Folder Options -> Tab View -> Hidden files and folders -> Select "Show hidden files and folders" -> Click "Apply" and after that "Ok" (Note: If you don't see menu Tools, press ALT tab on your keyboard)
  3. Find the file desktop.ini in your desktop folder, if there are many of these delete them all.
  4. Restart your Vista (after this step your icons should be back)
  5. Repeat step 2 to Hide hidden files and folders
That's all you got to do.