Saturday, September 3, 2011

MVC

Model–view–controller (MVC) is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" (the application logic for the user) from the user interface (input and presentation), permitting independent development, testing and maintenance of each (separation of concerns). The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]: Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller). View. The view manages the display of information. Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.
Figure 1 depicts the structural relationship between the three objects. It is important to note that both the view and the controller depend on the model. However, the model depends on neither the view nor the controller. This is one the key benefits of the separation. This separation allows the model to be built and tested independent of the visual presentation. The separation between view and controller is secondary in many rich-client applications, and, in fact, many user interface frameworks implement the roles as one object. In Web applications, on the other hand, the separation between view (the browser) and controller (the server-side components handling the HTTP request) is very well defined. Model-View-Controller is a fundamental design pattern for the separation of user interface logic from business logic. Unfortunately, the popularity of the pattern has resulted in a number of faulty descriptions. In particular, the term "controller" has been used to mean different things in different contexts. Fortunately, the advent of Web applications has helped resolve some of the ambiguity because the separation between the view and the controller is so apparent.
Courtesy :msdn

MVC Examples:
A Simple E-Commerce Storefront Application
ASP.NET MVC Source Code
Courtesy: ScottGu's Blog

ASP.NET MVC Tutorials
Courtesy: http://www.asp.net

Friday, September 2, 2011

Use .Net created dll in VB6?

There are the steps to follow:

1) Create a class library in VS choose whatever language you want either Vb.NEt or C#
2) Go to to Project Properties->ConfigurationProperties->build, check the Register for Com Interop check box. This creates the COM wrapper for your .NET assembly and hence need not use regasm.
3) Write whatever code you want, expose the classes publicly, expose the properties, functions you want publicly.

Now in your VB project, add the claslibrary.tlb created by the above program.
Now use the classes and functions as you want.

you should not have any problem.

OR

When you deploy a .NET DLL, and you want to use it with COM (such as VB),
you need to register it with "Regasm.exe your_aseembly_file /codebase".
you need to include the /codebase switch when registing assembly in folders
other than GAC.

To use the /codebase switch, the assembly must be strongly-named